Пример #1
0
            public void Should_Throw_If_PropertyValue_Is_Null()
            {
                // Given
                var adOperator = Substitute.For <IADOperator>();
                var fixture    = new UserFindFixture(adOperator);

                fixture.PropertyValue = null;

                // When
                var result = Record.Exception(() => fixture.FindAttributeValueByProperty());

                // Then
                result.ShouldBeType <ArgumentNullException>().ParamName.ShouldEqual("propertyValue");
            }
Пример #2
0
            public void Should_Throw_If_Organizational_Unit_Is_Null()
            {
                // Given
                var adOperator = Substitute.For <IADOperator>();
                var fixture    = new UserFindFixture(adOperator);

                fixture.OrganizationalUnit = null;

                // When
                var result = Record.Exception(() => fixture.FindByOrganizationUnit());

                // Then
                result.ShouldBeType <ArgumentNullException>().ParamName.ShouldEqual("organizationalUnit");
            }