コード例 #1
0
ファイル: ExcludeTests.cs プロジェクト: vnvizitiu/AOP
        public void WhenAppliedToClassWithExcludeConstructorsFlagShouldNotLogConstructors()
        {
            // act
            PersonExcludeConstructors personExcludeConstructors = new PersonExcludeConstructors
            {
                Name = Guid.NewGuid().ToString()
            };

            personExcludeConstructors.Name.Should().NotBeNullOrWhiteSpace();

            // assert
            _logger.DebugCallCount.Should()
            .Be(6, "because we only hit the Entry, Success and Exit methods for the property getter and setter");
        }
コード例 #2
0
ファイル: ExcludeTests.cs プロジェクト: vnvizitiu/AOP
        public void WhenAppliedToClassWithExcludeConstructorsFlagShouldNotLogConstructors()
        {
            // act
            PersonExcludeConstructors personExcludeConstructors = new PersonExcludeConstructors
            {
                Name = Guid.NewGuid().ToString()
            };
            personExcludeConstructors.Name.Should().NotBeNullOrWhiteSpace();

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