Esempio n. 1
0
        public static IThenResult <object> ThenIsNot <TFixture>(this ITestDefinition <TFixture> result, object value)
        {
            var obj = result.Execute()();

            Test.AssertNotEqual(obj, value);
            return(MakeResult(obj));
        }
Esempio n. 2
0
        public static IThenResult <bool> ThenIsFalse(this ITestDefinition result)
        {
            var obj = (bool)result.Execute()();

            Test.AssertFalse(obj);
            return(MakeResult(obj));
        }
        public static void ThenReceived <TInterface>(this ITestDefinition result, TInterface theInterface, int count, Action <TInterface> theAction)
            where TInterface : class
        {
            result.Execute();

            theAction(theInterface.Received(count));
        }
Esempio n. 4
0
        public static IThenResult <TException> ThenExpectException <TException>(this ITestDefinition result) where TException : Exception
        {
            void Invoke()
            {
                result.Execute();
            }

            var ex = Test.AssertThrows <TException>(Invoke);

            return(MakeResult(ex));
        }
Esempio n. 5
0
 public static void ThenSuccess(this ITestDefinition result)
 {
     Test.AssertNoThrow(() => result.Execute());
 }