public void Sprint_Service_CreateGroup_Method_should_return() { //Arrange List <SignalRMaster> requests = new List <SignalRMaster>(); var request = new SignalRMaster(); request.MemberId = 1; requests.Add(request); var mockRepoReq = new Mock <ISprintRepository>(); //mocking RequestRepository mockRepoReq.Setup(x => x.CreateGroup(It.IsAny <int>())).Returns(requests); //mocking GetAll() of RequestRepository SprintService obj = new SprintService(mockRepoReq.Object); //Act var res = obj.CreateGroup(It.IsAny <int>()); //Assert Assert.IsType <List <SignalRMaster> >(res); }