public async Task AddCategory_IfNewItem_AddItem() { //Arrange var expectedCategoryName = "expected"; MakeMockAddForRepository(); // Act // Run method which should be tested var result = await _controller.AddCategoryAsync(expectedCategoryName); //Assert Assert.Equal(expectedCategoryName, result.Name); _repositoryMock.VerifyAll(); }