示例#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"));