Example #1
0
        public void WhenAppliedToClassWithExcludePropertiesAndConstructorsFlagShouldNotLogPropertiesAndConstructor()
        {
            // act
            PersonExcludePropertyConstructors personExcludePropertyConstructors = new PersonExcludePropertyConstructors
            {
                Name = Guid.NewGuid().ToString()
            };

            personExcludePropertyConstructors.Name.Should().NotBeNullOrWhiteSpace();

            // assert
            _logger.DebugCallCount.Should()
            .Be(0, "because we do not hit the Debug method for constructors and properties");
        }
Example #2
0
        public void WhenAppliedToClassWithExcludePropertiesAndConstructorsFlagShouldNotLogPropertiesAndConstructor()
        {
            // act
            PersonExcludePropertyConstructors personExcludePropertyConstructors = new PersonExcludePropertyConstructors
            {
                Name = Guid.NewGuid().ToString()
            };
            personExcludePropertyConstructors.Name.Should().NotBeNullOrWhiteSpace();

            // assert
            _logger.DebugCallCount.Should()
                .Be(0, "because we do not hit the Debug method for constructors and properties");
        }