예제 #1
0
        public void SubstituesPort()
        {
            var coreParams = new CoreProcessParams("dir", "--port {Port}", 80);

            Assert.True(coreParams.IsValid);
            Assert.Equal("--port 80", coreParams.SubstitutedArguments);
        }
예제 #2
0
        public void DoesNotAcceptInvalidPortNumber()
        {
            Assert.Throws <ArgumentOutOfRangeException>(() =>
            {
                var p = new CoreProcessParams("dir", "args", -1);
            });

            Assert.Throws <ArgumentOutOfRangeException>(() =>
            {
                var p = new CoreProcessParams("dir", "args", 1000000);
            });
        }
예제 #3
0
        public void DoesNotRequirePortWhenTheMacroIsNotThere()
        {
            var coreParams = new CoreProcessParams("dir", "--some --args", null);

            Assert.True(coreParams.IsValid);
        }