Пример #1
0
            public void ShouldReturnFalse_WhenReducerFunctionIsNotRegistered()
            {
                var testSubject = new MultiActionReducerTestSubject();

                var unsupportedAction = new UnsupportedAction();

                Assert.False(testSubject.ShouldReduceStateForAction(unsupportedAction));
            }
Пример #2
0
            public void ShouldThrowInvalidOperationException_WhenNoReducerFunctionIsRegisteredForActionType()
            {
                var testSubject = new MultiActionReducerTestSubject();

                var state             = new MultiActionReducerTestState(42);
                var unsupportedAction = new UnsupportedAction();

                Assert.Throws <InvalidOperationException>(() =>
                                                          state = testSubject.Reduce(state, unsupportedAction));
            }