public void Instantiates_With_The_Given_Data(DiagnosticLevel level, Action <DiagnosticEventArgs> handler) { var d = new DiagnosticFactory(level, handler); Assert.Equal(level, d.GetProperty <DiagnosticLevel>("MinimumLevel")); Assert.Equal(handler, d.GetProperty <Action <DiagnosticEventArgs> >("EventHandler")); }
public void Instantiates_With_The_Given_Data(object source, DiagnosticLevel level, Action <DiagnosticGeneratedEventArgs> handler) { var d = new DiagnosticFactory(source, level, handler); Assert.Equal(source, d.GetProperty <object>("Source")); Assert.Equal(level, d.GetProperty <DiagnosticLevel>("MinimumLevel")); Assert.Equal(handler, d.GetProperty <Action <DiagnosticGeneratedEventArgs> >("EventHandler")); }