コード例 #1
0
        public void Callback_ShouldSetCallback(
            ObservableCommandBuilderOptions <string, object> sut,
            object expected)
        {
            //arrange
            object actual = null;

            //act
            sut.Do(o => actual = o);

            //assert
            sut.DoObserver().OnNext(expected);
            actual.Should().Be(expected);
        }
コード例 #2
0
        public void OnError_ShouldSetOnError(
            ObservableCommandBuilderOptions <string, object> sut,
            Action <Exception> action,
            Exception expected)
        {
            //arrange
            Exception actual = null;

            //act
            sut.Do(o => { }, e => actual = e);
            sut.DoObserver().OnError(expected);

            //assert
            actual.Should().Be(expected);
        }
コード例 #3
0
		public void OnError_ShouldSetOnError(
		  ObservableCommandBuilderOptions<string, object> sut,
			Action<Exception> action,
			Exception expected)
		{
			//arrange
			Exception actual = null;

			//act
			sut.Do(o => { }, e => actual = e);
			sut.DoObserver().OnError(expected);

			//assert
			actual.Should().Be(expected);
		}
コード例 #4
0
		public void Callback_ShouldSetCallback(
		  ObservableCommandBuilderOptions<string, object> sut,
			object expected)
		{
			//arrange
			object actual = null;

			//act
			sut.Do(o => actual = o);

			//assert
			sut.DoObserver().OnNext(expected);
			actual.Should().Be(expected);
		}