public void SearchSimilarDoctors_exactMatch() { SearchSimilarDoctors_exactMatchSetup(); var response = _controller.SearchSimilarDoctors(PostBody()); //verify return 2 objects response.Count().ShouldBeEquivalentTo(1); //verify exact match response.FirstOrDefault().ShouldBeEquivalentTo(PostBody()); //verify really call the queries _dapperMock.Verify(d => d.Query <Doctor>("RdssqlServerConnection", "GetDoctors", null), Times.Once); _dapperMock.Verify(d => d.Query <Specialties>("RdssqlServerConnection", "GetSpecialtiesByDoctorId", It.IsAny <object>()), Times.Once); }