public async Task AssumesUnhealthyIfComponentCannotBeFoundInStatusBlob() { _storage .Setup(s => s.GetFileAsync(_config.ContainerName, _config.StatusBlobName)) .ReturnsAsync(TestResources.GetResourceStream(TestResources.PackagePublishingMissingStatus)); Assert.False(await _target.IsHealthyAsync()); }
public async Task ReturnsHealthyIfStatusBlobIndicatesHealthyComponent(string resourceName, bool expectsHealthy) { _storage .Setup(s => s.GetFileAsync(_config.ContainerName, _config.StatusBlobName)) .ReturnsAsync(TestResources.GetResourceStream(resourceName)); Assert.Equal(expectsHealthy, await _target.IsHealthyAsync()); }
public void LoadFull() { var replay = new Replay(); replay.Load(TestResources.GetResourceStream("aetrna - 07th Expansion - rog-unlimitation [AngelHoney] (2020-07-24) Osu.osr"), true); // Assert.NotNull(replay.Lifebar); If lifebar is null, it don't fall below his max value (1) Assert.NotNull(replay.Data); }
public void LoadHeader() { var replay = new Replay(); replay.Load(TestResources.GetResourceStream("aetrna - 07th Expansion - rog-unlimitation [AngelHoney] (2020-07-24) Osu.osr")); Assert.Equal("aetrna", replay.Username); Assert.Equal(Mods.DoubleTime | Mods.Hidden, replay.Mods); }