Пример #1
0
        public void Invoke_ShouldReturnValuePassedIntoUpdateInvocation()
        {
            // Arrange
            string expected = "result";
            MockMethodWithResponse <string> subject = new MockMethodWithResponse <string>("methodName");

            subject.UpdateInvocation(expected);

            // Act
            string actual = subject.Invoke();

            // Assert
            actual.Should().Be(expected);
        }
Пример #2
0
        public void Invoke_ShouldReturnSameValueWhenInvokedMultipleTimesAndSetupWithOneResponse()
        {
            // Arrange
            string expected = "result";
            MockMethodWithResponse <string> subject = new MockMethodWithResponse <string>("methodName");

            subject.UpdateInvocation(expected);

            // Act
            string actual1 = subject.Invoke();
            string actual2 = subject.Invoke();
            string actual3 = subject.Invoke();


            // Assert
            actual1.Should().Be(expected);
            actual2.Should().Be(expected);
            actual3.Should().Be(expected);
        }
Пример #3
0
        public void Invoke_ShouldReturnValuesInOrderPassedIntoUpdateInvocationWhenInvokedMultipleTimes()
        {
            // Arrange
            string expected1 = "result1";
            string expected2 = "result2";
            string expected3 = "result3";
            MockMethodWithResponse <string> subject = new MockMethodWithResponse <string>("methodName");

            subject.UpdateInvocation(expected1, expected2, expected3);

            // Act
            string actual1 = subject.Invoke();
            string actual2 = subject.Invoke();
            string actual3 = subject.Invoke();

            // Assert
            actual1.Should().Be(expected1);
            actual2.Should().Be(expected2);
            actual3.Should().Be(expected3);
        }
Пример #4
0
 public Builder Value(params Number[] responseValues)
 {
     _value.UpdateInvocation(responseValues);
     return(this);
 }
 public Builder ResponseTaskGeneric(params T[] responseValues)
 {
     _responseTaskGeneric.UpdateInvocation(responseValues);
     return(this);
 }
Пример #6
0
 public Builder CountdownState(params ICountdownState[] responseValues)
 {
     _countdownState.UpdateInvocation(responseValues);
     return(this);
 }
Пример #7
0
 public Builder CountDownForeColorWriter(params IWriteColor[] responseValues)
 {
     _countDownForeColorWriter.UpdateInvocation(responseValues);
     return(this);
 }
Пример #8
0
 public Builder Remaining(params TimeInterval[] responseValues)
 {
     _remaining.UpdateInvocation(responseValues);
     return(this);
 }
Пример #9
0
 public Builder LongBreakStartEnabled(params IEnabled[] responseValues)
 {
     _longBreakStartEnabled.UpdateInvocation(responseValues);
     return(this);
 }
Пример #10
0
 public Builder CountDownTextWriter(params IWriteText[] responseValues)
 {
     _countDownTextWriter.UpdateInvocation(responseValues);
     return(this);
 }
Пример #11
0
 public Builder SessionStartEnabled(params IEnabled[] responseValues)
 {
     _sessionStartEnabled.UpdateInvocation(responseValues);
     return(this);
 }
Пример #12
0
 public Builder Invoke(TResponse response)
 {
     _invokeItem.UpdateInvocation(response);
     return(this);
 }
 public Builder ResponseTaskType(params double[] responseValues)
 {
     _responseTaskType.UpdateInvocation(responseValues);
     return(this);
 }
Пример #14
0
 public Builder Finished(params Bool[] responseValues)
 {
     _finished.UpdateInvocation(responseValues);
     return(this);
 }
Пример #15
0
 public Builder SessionStartVisibility(params IVisibility[] responseValues)
 {
     _sessionStartVisibility.UpdateInvocation(responseValues);
     return(this);
 }
Пример #16
0
 public Builder Last(params Bool[] responseValues)
 {
     _last.UpdateInvocation(responseValues);
     return(this);
 }
Пример #17
0
 public Builder LongBreakStartVisibility(params IVisibility[] responseValues)
 {
     _longBreakStartVisibility.UpdateInvocation(responseValues);
     return(this);
 }
Пример #18
0
 public Builder RawValue(params string[] returnValue)
 {
     _mockRawValue.UpdateInvocation(returnValue);
     return(this);
 }
 public Builder ResponseType(params string[] responseValues)
 {
     _responseType.UpdateInvocation(responseValues);
     return(this);
 }