public async Task UsageCoversForOtherThanSuppliersAsync_NoRequirements_ShouldReturnFalse() { using (var context = new PreservationContext(_dbContextOptions, _plantProvider, _eventDispatcher, _currentUserProvider)) { var reqIds = new List <int>(); var dut = new RequirementDefinitionValidator(context); var result = await dut.UsageCoversForOtherThanSuppliersAsync(reqIds, default); Assert.IsFalse(result); } }
public async Task UsageCoversForOtherThanSuppliersAsync_UsageForSupplierAndOtherAndForAllRequirement_ShouldReturnTrue() { using (var context = new PreservationContext(_dbContextOptions, _plantProvider, _eventDispatcher, _currentUserProvider)) { var reqIds = new List <int> { _reqDefForSupplier.Id, _reqDefForOther.Id, _reqDefForAll.Id }; var dut = new RequirementDefinitionValidator(context); var result = await dut.UsageCoversForOtherThanSuppliersAsync(reqIds, default); Assert.IsTrue(result); } }