ThisToThat/ThisToThatTests/ToUInt64Tests.cs
/// <summary>
/// Makes multiple String to UInt64 or default conversions and asserts that the results are correct.
/// </summary>
Makes multiple String to UInt64 or default conversions and asserts that the results are correct.
Makes multiple String to UInt64 or default conversions and asserts that the results are correct .
[TestMethod, TestCategory("ToUInt64 tests")]
        public void TestStringToUInt64OrDefault()
        {
            UInt64 resultMin = "0".ToUInt64OrDefault();
            Assert.AreEqual(0UL, resultMin);
            UInt64 result42 = "42".ToUInt64OrDefault();
            Assert.AreEqual(42UL, result42);
            UInt64 resultMax = "18446744073709551615".ToUInt64OrDefault();
            Assert.AreEqual(18446744073709551615UL, resultMax);
            UInt64 resultFoo = "foo".ToUInt64OrDefault(86UL);
            Assert.AreEqual(86UL, resultFoo);
        }
[ TestMethod , TestCategory ( " " ) ] public void TestStringToUInt64OrDefault ( ) { UInt64 resultMin = " " . ToUInt64OrDefault ( ) ; Assert . AreEqual ( 0UL , resultMin ) ; UInt64 result42 = " " . ToUInt64OrDefault ( ) ; Assert . AreEqual ( 42UL , result42 ) ; UInt64 resultMax = " " . ToUInt64OrDefault ( ) ; Assert . AreEqual ( 18446744073709551615UL , resultMax ) ; UInt64 resultFoo = " " . ToUInt64OrDefault ( 86UL ) ; Assert . AreEqual ( 86UL , resultFoo ) ; }
Makes multiple String to UInt64 or default conversions and asserts that the results are correct.
Makes multiple String to UInt64 or default conversions and asserts that the results are correct .
// Test conversion of target type minimum value // Test conversion of fixed value (42) // Test conversion of target type maximum value // Test conversion of "foo"