示例#1
0
        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");
        }
示例#2
0
        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);
        }