Beispiel #1
0
        public void Should_render_value_of_existing_operation_context_property_using_provided_format()
        {
            token  = new OperationContextToken("D5");
            @event = @event.WithProperty(WellKnownProperties.OperationContext, 1);

            Render().Should().Be("00001");
        }
 public UseScope(ILog log, string scopeValue, AsyncLocal <UseScope> scope)
 {
     Log                   = log;
     this.scope            = scope;
     operationContextToken = new OperationContextToken(scopeValue);
     previousScopeValue    = scope.Value;
     scope.Value           = this;
 }
Beispiel #3
0
 public void Render_should_render_template_with_spaces_format()
 {
     token  = new OperationContextToken("wW");
     @event = @event.WithProperty(WellKnownProperties.OperationContext, "Operation {Name}");
     Render().Should().Be(" Operation Vostok ");
 }
Beispiel #4
0
        public void Should_not_insert_surrounding_spaces_around_missing_operation_context_property()
        {
            token = new OperationContextToken("wW");

            Render().Should().BeEmpty();
        }
Beispiel #5
0
 public void TestSetup()
 {
     token  = new OperationContextToken();
     @event = new LogEvent(LogLevel.Info, DateTimeOffset.Now, "Hello, {Name}!").WithProperty("Name", "Vostok");
 }