예제 #1
0
        public void EmptyArgsListReturnsTest0()
        {
            var options = new InputOptions(null);

            Assert.Equal(0, options.GetInt("test"));
            Assert.True(options.ValidOptions);
        }
예제 #2
0
        public void CheckOutOfBoundsArgumentsReturnInvalidOption()
        {
            string[] array   = new string[] { "-p" };
            var      options = new InputOptions(array);

            Assert.False(options.ValidOptions);
            Assert.Equal(60, options.GetInt("ping"));
        }
예제 #3
0
        public void ShortTestOptionReturnsPing1()
        {
            string[] array   = new string[] { "-t" };
            var      options = new InputOptions(array);

            Assert.Equal(1, options.GetInt("test"));
            Assert.True(options.ValidOptions);
        }