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); }
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); }
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); }
public Builder Value(params Number[] responseValues) { _value.UpdateInvocation(responseValues); return(this); }
public Builder ResponseTaskGeneric(params T[] responseValues) { _responseTaskGeneric.UpdateInvocation(responseValues); return(this); }
public Builder CountdownState(params ICountdownState[] responseValues) { _countdownState.UpdateInvocation(responseValues); return(this); }
public Builder CountDownForeColorWriter(params IWriteColor[] responseValues) { _countDownForeColorWriter.UpdateInvocation(responseValues); return(this); }
public Builder Remaining(params TimeInterval[] responseValues) { _remaining.UpdateInvocation(responseValues); return(this); }
public Builder LongBreakStartEnabled(params IEnabled[] responseValues) { _longBreakStartEnabled.UpdateInvocation(responseValues); return(this); }
public Builder CountDownTextWriter(params IWriteText[] responseValues) { _countDownTextWriter.UpdateInvocation(responseValues); return(this); }
public Builder SessionStartEnabled(params IEnabled[] responseValues) { _sessionStartEnabled.UpdateInvocation(responseValues); return(this); }
public Builder Invoke(TResponse response) { _invokeItem.UpdateInvocation(response); return(this); }
public Builder ResponseTaskType(params double[] responseValues) { _responseTaskType.UpdateInvocation(responseValues); return(this); }
public Builder Finished(params Bool[] responseValues) { _finished.UpdateInvocation(responseValues); return(this); }
public Builder SessionStartVisibility(params IVisibility[] responseValues) { _sessionStartVisibility.UpdateInvocation(responseValues); return(this); }
public Builder Last(params Bool[] responseValues) { _last.UpdateInvocation(responseValues); return(this); }
public Builder LongBreakStartVisibility(params IVisibility[] responseValues) { _longBreakStartVisibility.UpdateInvocation(responseValues); return(this); }
public Builder RawValue(params string[] returnValue) { _mockRawValue.UpdateInvocation(returnValue); return(this); }
public Builder ResponseType(params string[] responseValues) { _responseType.UpdateInvocation(responseValues); return(this); }