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