ThisToThat/ThisToThatTests/ToInt64Tests.cs
/// <summary>
/// Makes multiple String to Int64Nullable conversions and asserts that the results are correct.
/// </summary>
Makes multiple String to Int64Nullable conversions and asserts that the results are correct.
Makes multiple String to Int64Nullable conversions and asserts that the results are correct .
[TestMethod, TestCategory("ToInt64 tests")]
        public void TestStringToInt64Nullable()
        {
            Int64? resultMin = "-9223372036854775808".ToInt64Nullable();
            Assert.AreEqual(-9223372036854775808L, resultMin);
            Int64? result42 = "42".ToInt64Nullable();
            Assert.AreEqual(42L, result42);
            Int64? resultMax = "9223372036854775807".ToInt64Nullable();
            Assert.AreEqual(9223372036854775807L, resultMax);
            Int64? resultFoo = "foo".ToInt64Nullable();
            Assert.IsNull(resultFoo);
        }
[ TestMethod , TestCategory ( " " ) ] public void TestStringToInt64Nullable ( ) { Int64 ? resultMin = " " . ToInt64Nullable ( ) ; Assert . AreEqual ( - 9223372036854775808L , resultMin ) ; Int64 ? result42 = " " . ToInt64Nullable ( ) ; Assert . AreEqual ( 42L , result42 ) ; Int64 ? resultMax = " " . ToInt64Nullable ( ) ; Assert . AreEqual ( 9223372036854775807L , resultMax ) ; Int64 ? resultFoo = " " . ToInt64Nullable ( ) ; Assert . IsNull ( resultFoo ) ; }
Makes multiple String to Int64Nullable conversions and asserts that the results are correct.
Makes multiple String to Int64Nullable 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"