public void Sprint_Service_Get_Method_should_return_particular_particualr_sprint() { //Arrange var request = new Sprint(); request.SprintId = 1; var mockRepoReq = new Mock <ISprintRepository>(); //mocking RequestRepository mockRepoReq.Setup(x => x.Get(1)).Returns(request); //mocking GetAll() of RequestRepository SprintService obj = new SprintService(mockRepoReq.Object); //Act var res = obj.Get(1); //Assert Assert.Equal(res, request); }