Пример #1
0
        public void WhenAppliedToClassWithExcludePropertyFlagShouldNotLogProperty()
        {
            // act
            PersonExcludeProperty personExcludeProperty = new PersonExcludeProperty
            {
                Name = Guid.NewGuid().ToString()
            };
            personExcludeProperty.Name.Should().NotBeNullOrWhiteSpace();

            // assert
            _logger.DebugCallCount.Should()
                .Be(3, "because we only hit the Entry, Success and Exit methods for the constructor");
        }
Пример #2
0
        public void WhenAppliedToClassWithExcludePropertyFlagShouldNotLogProperty()
        {
            // act
            PersonExcludeProperty personExcludeProperty = new PersonExcludeProperty
            {
                Name = Guid.NewGuid().ToString()
            };

            personExcludeProperty.Name.Should().NotBeNullOrWhiteSpace();

            // assert
            _logger.DebugCallCount.Should()
            .Be(3, "because we only hit the Entry, Success and Exit methods for the constructor");
        }