Example #1
0
        public void CommandTest()
        {
            var unmapTestImnstance = new UnmapTestClass {
                TheCommand = TestCommandType.Restore
            };

            var argumentMapper = new ArgumentMapper <UnmapTestClass>();
            var unMap          = argumentMapper.UnMap(unmapTestImnstance);

            Assert.AreEqual(@"-Restore", unMap);
        }
Example #2
0
        public void IntArgumentTest()
        {
            var unmapTestImnstance = new UnmapTestClass {
                IntArgument = 1234
            };

            var argumentMapper = new ArgumentMapper <UnmapTestClass>();
            var unMap          = argumentMapper.UnMap(unmapTestImnstance);

            Assert.AreEqual(@"IntArgument=""1234""", unMap);
        }
Example #3
0
        public void NoOptionTest()
        {
            var unmapTestImnstance = new UnmapTestClass {
                SimpleOption = false
            };

            var argumentMapper = new ArgumentMapper <UnmapTestClass>();
            var unMap          = argumentMapper.UnMap(unmapTestImnstance);

            Assert.AreEqual(@"", unMap);
        }
Example #4
0
        public void NamedArgumentTest()
        {
            var unmapTestImnstance = new UnmapTestClass {
                NamedArgument = "dödl"
            };

            var argumentMapper = new ArgumentMapper <UnmapTestClass>();
            var unMap          = argumentMapper.UnMap(unmapTestImnstance);

            Assert.AreEqual(@"MyArg=""dödl""", unMap);
        }
Example #5
0
        public void LargeNumberTest()
        {
            var unmapTestImnstance = new UnmapTestClass()
            {
                LargeNumber = long.MaxValue
            };

            var argumentMapper = new ArgumentMapper <UnmapTestClass>();
            var unMap          = argumentMapper.UnMap(unmapTestImnstance);

            Assert.AreEqual(string.Format("LargeNumber=\"{0}\"", long.MaxValue), unMap);
        }
Example #6
0
        public void FullArgumentsTest()
        {
            var unmapTestImnstance = new UnmapTestClass()
            {
                TheCommand = TestCommandType.Backup, SimpleArgument = "TheArgument", SimpleOption = true
            };

            var argumentMapper = new ArgumentMapper <UnmapTestClass>();
            var unMap          = argumentMapper.UnMap(unmapTestImnstance);

            Assert.AreEqual(@"-Backup SimpleArgument=""TheArgument"" -so", unMap);
        }
Example #7
0
        public void ArgumentTest()
        {
            var unmapTestImnstance = new UnmapTestClass()
            {
                SimpleArgument = "TEstArg"
            };

            var argumentMapper = new ArgumentMapper <UnmapTestClass>();
            var unMap          = argumentMapper.UnMap(unmapTestImnstance);

            Assert.AreEqual(@"SimpleArgument=""TEstArg""", unMap);
        }
Example #8
0
        public void NullTest()
        {
            var unmapTestImnstance = new UnmapTestClass()
            {
                NamedArgument = null, SimpleOption = false, TheCommand = TestCommandType.None, SimpleArgument = null
            };

            var argumentMapper = new ArgumentMapper <UnmapTestClass>();
            var unMap          = argumentMapper.UnMap(unmapTestImnstance);

            Assert.AreEqual("", unMap);
        }