Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 4
0
 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);
 }
Esempio n. 7
0
 public Builder CountDownForeColorWriter(params IWriteColor[] responseValues)
 {
     _countDownForeColorWriter.UpdateInvocation(responseValues);
     return(this);
 }
Esempio n. 8
0
 public Builder Remaining(params TimeInterval[] responseValues)
 {
     _remaining.UpdateInvocation(responseValues);
     return(this);
 }
Esempio n. 9
0
 public Builder LongBreakStartEnabled(params IEnabled[] responseValues)
 {
     _longBreakStartEnabled.UpdateInvocation(responseValues);
     return(this);
 }
Esempio n. 10
0
 public Builder CountDownTextWriter(params IWriteText[] responseValues)
 {
     _countDownTextWriter.UpdateInvocation(responseValues);
     return(this);
 }
Esempio n. 11
0
 public Builder SessionStartEnabled(params IEnabled[] responseValues)
 {
     _sessionStartEnabled.UpdateInvocation(responseValues);
     return(this);
 }
Esempio n. 12
0
 public Builder Invoke(TResponse response)
 {
     _invokeItem.UpdateInvocation(response);
     return(this);
 }
 public Builder ResponseTaskType(params double[] responseValues)
 {
     _responseTaskType.UpdateInvocation(responseValues);
     return(this);
 }
Esempio n. 14
0
 public Builder Finished(params Bool[] responseValues)
 {
     _finished.UpdateInvocation(responseValues);
     return(this);
 }
Esempio n. 15
0
 public Builder SessionStartVisibility(params IVisibility[] responseValues)
 {
     _sessionStartVisibility.UpdateInvocation(responseValues);
     return(this);
 }
Esempio n. 16
0
 public Builder Last(params Bool[] responseValues)
 {
     _last.UpdateInvocation(responseValues);
     return(this);
 }
Esempio n. 17
0
 public Builder LongBreakStartVisibility(params IVisibility[] responseValues)
 {
     _longBreakStartVisibility.UpdateInvocation(responseValues);
     return(this);
 }
Esempio n. 18
0
 public Builder RawValue(params string[] returnValue)
 {
     _mockRawValue.UpdateInvocation(returnValue);
     return(this);
 }
 public Builder ResponseType(params string[] responseValues)
 {
     _responseType.UpdateInvocation(responseValues);
     return(this);
 }