ThisToThat/ThisToThatTests/ToUInt32Tests.cs
/// <summary>
/// Makes multiple String to UInt32 or default conversions and asserts that the results are correct.
/// </summary>
Makes multiple String to UInt32 or default conversions and asserts that the results are correct.
Makes multiple String to UInt32 or default conversions and asserts that the results are correct .
[TestMethod, TestCategory("ToUInt32 tests")]
        public void TestStringToUInt32OrDefault()
        {
            UInt32 resultMin = "0".ToUInt32OrDefault();
            Assert.AreEqual(0u, resultMin);
            UInt32 result42 = "42".ToUInt32OrDefault();
            Assert.AreEqual(42u, result42);
            UInt32 resultMax = "4294967295".ToUInt32OrDefault();
            Assert.AreEqual(4294967295u, resultMax);
            UInt32 resultFoo = "foo".ToUInt32OrDefault(86u);
            Assert.AreEqual(86u, resultFoo);
        }
[ TestMethod , TestCategory ( " " ) ] public void TestStringToUInt32OrDefault ( ) { UInt32 resultMin = " " . ToUInt32OrDefault ( ) ; Assert . AreEqual ( 0u , resultMin ) ; UInt32 result42 = " " . ToUInt32OrDefault ( ) ; Assert . AreEqual ( 42u , result42 ) ; UInt32 resultMax = " " . ToUInt32OrDefault ( ) ; Assert . AreEqual ( 4294967295u , resultMax ) ; UInt32 resultFoo = " " . ToUInt32OrDefault ( 86u ) ; Assert . AreEqual ( 86u , resultFoo ) ; }
Makes multiple String to UInt32 or default conversions and asserts that the results are correct.
Makes multiple String to UInt32 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"