public void GivenNoRestrictionsSetupThenEmptyResultsReturned() { // Arrange var noRestrictions = ImmutableList <Restriction> .Empty; var salesArea = Fixture.Create <SalesArea>(); var sut = new RestrictionChecker( noRestrictions, null, null, null, null, null); // Act var result = sut.CheckRestrictions( null, null, null, salesArea, null, null); // Assert AssertNoRestrictionsToCheck(sut); _ = result.Should().BeEmpty("no restrictions found"); }
public void NullSalesAreaObjectThrowsException() { // Arrange /* Empty */ // Act Action act = () => { var result = _sut.CheckRestrictions( null, null, null, null, null, null); }; // Assert _ = act.Should() .Throw <ArgumentNullException>(null) .WithMessage("*Parameter *salesArea*", null); }