public async void FindExactAsync_GivenCategoryExists_ReturnsCategory() { var categoryToReturn = new CategoryDTO { Id = 1, Name = "This is the first" }; categoryRepositoryMock.Setup(c => c.FindAsync("This is the first")).ReturnsAsync(categoryToReturn); using (var logic = new CategoryLogic(categoryRepositoryMock.Object, projectRepositoryMock.Object)) { var result = await logic.FindExactAsync("This is the first"); Assert.Equal(categoryToReturn, result); categoryRepositoryMock.Verify(c => c.FindAsync("This is the first")); } }