public void SubstituesPort() { var coreParams = new CoreProcessParams("dir", "--port {Port}", 80); Assert.True(coreParams.IsValid); Assert.Equal("--port 80", coreParams.SubstitutedArguments); }
public void DoesNotAcceptInvalidPortNumber() { Assert.Throws <ArgumentOutOfRangeException>(() => { var p = new CoreProcessParams("dir", "args", -1); }); Assert.Throws <ArgumentOutOfRangeException>(() => { var p = new CoreProcessParams("dir", "args", 1000000); }); }
public void DoesNotRequirePortWhenTheMacroIsNotThere() { var coreParams = new CoreProcessParams("dir", "--some --args", null); Assert.True(coreParams.IsValid); }