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

            personExcludePropertyGetters.Name.Should().NotBeNullOrWhiteSpace();

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

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