public void CommandTest() { var unmapTestImnstance = new UnmapTestClass { TheCommand = TestCommandType.Restore }; var argumentMapper = new ArgumentMapper <UnmapTestClass>(); var unMap = argumentMapper.UnMap(unmapTestImnstance); Assert.AreEqual(@"-Restore", unMap); }
public void IntArgumentTest() { var unmapTestImnstance = new UnmapTestClass { IntArgument = 1234 }; var argumentMapper = new ArgumentMapper <UnmapTestClass>(); var unMap = argumentMapper.UnMap(unmapTestImnstance); Assert.AreEqual(@"IntArgument=""1234""", unMap); }
public void NoOptionTest() { var unmapTestImnstance = new UnmapTestClass { SimpleOption = false }; var argumentMapper = new ArgumentMapper <UnmapTestClass>(); var unMap = argumentMapper.UnMap(unmapTestImnstance); Assert.AreEqual(@"", unMap); }
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); }
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); }
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); }
public void ArgumentTest() { var unmapTestImnstance = new UnmapTestClass() { SimpleArgument = "TEstArg" }; var argumentMapper = new ArgumentMapper <UnmapTestClass>(); var unMap = argumentMapper.UnMap(unmapTestImnstance); Assert.AreEqual(@"SimpleArgument=""TEstArg""", unMap); }
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); }