Example #1
0
            public void GivenANullEntityThrowArgumentNullException()
            {
                Action <string> callback = str => { };
                var             target   = new ActionObserver <string>(callback);

                Action act = () => target.OnNext(null);
            }
Example #2
0
            public void GivenAnEntityIsSuppliedThenCallbackIsInvoked()
            {
                var             callbackInvoked = false;
                Action <string> callback        = str => { callbackInvoked = true; };
                var             target          = new ActionObserver <string>(callback);

                target.OnNext("");

                callbackInvoked.Should().BeTrue();
            }
Example #3
0
            public void GivenOnCompleteHasBeenCalledThenCallbackIsNotInvoked()
            {
                var             callbackInvoked = false;
                Action <string> callback        = str => { callbackInvoked = true; };
                var             target          = new ActionObserver <string>(callback);

                target.OnCompleted();
                target.OnNext("");

                callbackInvoked.Should().BeFalse();
            }