Example #1
0
 [TestMethod] public void IntToBoolTest() => Assert.AreEqual(1, Transtyper.Transtype <int>(true));
Example #2
0
 [TestMethod] public void BoolToIntTest() => Assert.AreEqual(true, Transtyper.Transtype <bool>(1));
Example #3
0
 [TestMethod] public void IntToEnumTest() => Assert.AreEqual(E.A, Transtyper.Transtype <E>(1));
Example #4
0
 [TestMethod] public void EnumToIntTest() => Assert.AreEqual(3, Transtyper.Transtype <int>(E.C));
Example #5
0
 [TestMethod] public void StringToEnumTest() => Assert.AreEqual(E.B, Transtyper.Transtype <E>("B"));
Example #6
0
 [TestMethod] public void EnumToStringTest() => Assert.AreEqual("C", Transtyper.Transtype <string>(E.C));
Example #7
0
 [TestMethod] public void StringToVersionTest() => Assert.AreEqual(new Version(5, 6), Transtyper.Transtype <Version>("5.6"));
Example #8
0
 [TestMethod] public void VersionToStringTest() => Assert.AreEqual("7.8", Transtyper.Transtype <string>(new Version(7, 8)));
Example #9
0
 [TestMethod] public void BoolToStringTest() => Assert.AreEqual("False", Transtyper.Transtype <string>(false));
Example #10
0
 [TestMethod] public void StringToBool2Test() => Assert.AreEqual(false, Transtyper.Transtype <bool>("false"));
Example #11
0
 [TestMethod] public void StringToBoolTest() => Assert.AreEqual(true, Transtyper.Transtype <bool>("true"));
Example #12
0
 [TestMethod] public void IntToStringTest() => Assert.AreEqual("34", Transtyper.Transtype <string>(34));
Example #13
0
 [TestMethod] public void StringToIntTest() => Assert.AreEqual(12, Transtyper.Transtype <int>("12"));