encho253

Untitled

Feb 5th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.47 KB | None | 0 0
  1.  [Test]
  2.         public void JoinToCourse_ShouldAddStudentToCourseSuccessfully_WitoutThrowException()
  3.         {
  4.             //Arrange
  5.             Mock<IStudent> mockedStudent = new Mock<IStudent>();
  6.             Mock<ICourse> mockedCourse = new Mock<ICourse>();
  7.  
  8.             //Act
  9.             mockedCourse.Object.JoinToCourse(mockedStudent.Object);
  10.  
  11.             //Assert
  12.             mockedCourse.Verify(x => x.JoinToCourse(It.IsAny<IStudent>()), Times.Exactly(1));
  13.         }
Advertisement
Add Comment
Please, Sign In to add comment