public void CompanyDataConflictsAsync_ShouldReturnFalse_IfNoCompanyExistsWithProvidedVatOrName() { //Arrange const string EXISTING_NAME = "Some NAME"; const string EXISTING_VAT = "Some VAT"; var companyCommandMock = new Mock <ICompanyCommand>(); var companyQueryMock = new Mock <ICompanyQuery>(); companyQueryMock .Setup(i => i.GetByNameAsync(EXISTING_NAME)) .ReturnsAsync((CompanyEntity)null); companyQueryMock .Setup(i => i.GetByVatAsync(EXISTING_VAT)) .ReturnsAsync((CompanyEntity)null); //Act var companyService = new CompanyService(companyCommandMock.Object, companyQueryMock.Object); var result = companyService.CompanyDataConflictsAsync(EXISTING_NAME, EXISTING_VAT).Result; //Assert Assert.IsFalse(result); }