public async Task AddAdditionalWriterAsync() { TestHealthWriter newWriter = new TestHealthWriter(); await AppHealth.Current.Error.TrackAsync("WillNotBeRegisteredYet"); AppHealth.Current.AddWriter(newWriter); await AppHealth.Current.Error.TrackAsync("WillBeRegistered"); Assert.DoesNotContain("Error;WillNotBeRegisteredYet;", newWriter.Events); Assert.Contains("Error;WillBeRegistered;", newWriter.Events); }
public HealthTest() { _testWriter = new TestHealthWriter(); AppHealth.Current.AddWriter(_testWriter); }