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