public void When_Serializing_A_Monitoring_Event() { _monitorEvent = _monitorEventMessageMapper.MapToRequest(_message); //_should_have_the_correct_instance_name _monitorEvent.InstanceName.Should().Be(InstanceName); //_should_have_the_correct_handler_name _monitorEvent.HandlerName.Should().Be(HandlerName); //_should_have_the_correct_handler_full_assembly_name _monitorEvent.HandlerFullAssemblyName.Should().Be(HandlerFullAssemblyName); //_should_have_the_correct_monitor_type _monitorEvent.EventType.Should().Be(MonitorEventType.EnterHandler); //_should_have_the_original_request_as_json _monitorEvent.RequestBody.Should().Be(_originalRequestAsJson); //_should_have_the_correct_event_time _monitorEvent.EventTime.AsUtc().Should().BeCloseTo(_at.AsUtc(), 1000); //_should_have_the_correct_time_elapsed _monitorEvent.TimeElapsedMs.Should().Be(_elapsedMilliseconds); }
public void When_Serializing_A_Monitoring_Event() { _monitorEvent = _monitorEventMessageMapper.MapToRequest(_message); //_should_have_the_correct_instance_name Assert.AreEqual(InstanceName, _monitorEvent.InstanceName); //_should_have_the_correct_handler_name Assert.AreEqual(HandlerName, _monitorEvent.HandlerName); //_should_have_the_correct_handler_full_assembly_name Assert.AreEqual(HandlerFullAssemblyName, _monitorEvent.HandlerFullAssemblyName); //_should_have_the_correct_monitor_type Assert.AreEqual(MonitorEventType.EnterHandler, _monitorEvent.EventType); //_should_have_the_original_request_as_json Assert.AreEqual(_originalRequestAsJson, _monitorEvent.RequestBody); //_should_have_the_correct_event_time Assert.AreEqual(_overrideTime, _monitorEvent.EventTime); //_should_have_the_correct_time_elapsed Assert.AreEqual(_elapsedMilliseconds, _monitorEvent.TimeElapsedMs); }