Exemple #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);
        }
Exemple #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);
        }
Exemple #3
0
        public void NoOptionTest()
        {
            var unmapTestImnstance = new UnmapTestClass {
                SimpleOption = false
            };

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

            Assert.AreEqual(@"", unMap);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }