Ejemplo n.º 1
0
        public Task Result_With_Error_Using_Invalid_Cast_Expects_Cast_Exception()
        {
            const int identity = 1;

            return(Assert.ThrowsAsync <InvalidCastException>(async() =>
                                                             await AssertionUtilities.GetProgramAsync(identity).CastError <string>()));
        }
Ejemplo n.º 2
0
        public void Result_With_Value_Using_Invalid_Cast_Expects_No_Exception()
        {
            const int identity = 0;

            AssertionUtilities
            .GetProgramAsync(identity)
            .CastError <string>()
            .AssertValue(0);
        }
Ejemplo n.º 3
0
        public void Result_With_Error_Using_Valid_Cast_Expects_Value_As_Int()
        {
            const int identity = 1;

            AssertionUtilities
            .GetProgramAsync(identity)
            .CastError <int>()
            .AssertError(identity);
        }