コード例 #1
0
ファイル: CastErrorTests.cs プロジェクト: inputfalken/Lemonad
        public void Result_With_Value_Using_Invalid_Cast_Expects_No_Exception()
        {
            const int identity = 0;

            AssertionUtilities
            .GetProgram(identity)
            .CastError <string>()
            .AssertValue(0);
        }
コード例 #2
0
ファイル: CastErrorTests.cs プロジェクト: inputfalken/Lemonad
        public void Result_With_Error_Using_Valid_Cast_Expects_Value_As_Int()
        {
            const int identity = 1;

            AssertionUtilities
            .GetProgram(identity)
            .CastError <int>()
            .AssertError(identity);
        }
コード例 #3
0
ファイル: CastErrorTests.cs プロジェクト: inputfalken/Lemonad
        public void Result_With_Error_Using_Invalid_Cast_Expects_Cast_Exception()
        {
            const int identity = 1;

            Assert.Throws <InvalidCastException>(() => AssertionUtilities.GetProgram(identity).CastError <string>());
        }