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

            personExcludeStaticConstructor.Name.Should().NotBeNullOrWhiteSpace();

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

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