public void TestInternalErrorOnFetchAllPartitionsForTopic() { _cluster.Start(); Assert.That(async() => await _cluster.RequireAllPartitionsForTopic("nonexistingTopic"), Throws.TypeOf <TaskCanceledException>()); Assert.AreEqual(1, _internalErrors); }
public void TestBehaviorOnFetchAllPartitionsForMissingTopic() { const string missingTopic = "doesnotexist"; _cluster.Start(); Assert.That(async () => await _cluster.RequireAllPartitionsForTopic(missingTopic), Throws.TypeOf<KeyNotFoundException>()); _logger.Verify(l => l.LogError(It.IsAny<string>()), Times.Once); }