public void EmptyForecastSourcesAreNotAllowed() { var forecastSources = Unique.EmptyForecastSources(); const string expectedMessage = "At least one forecast source is required."; var expectedValue = forecastSources; Asserts.Exception <ArgumentOutOfRangeException>( () => GetForecast(forecastSources), e => { Assert.IsTrue(e.Message.StartsWith(expectedMessage), $"{e.Message} does not start with {expectedMessage}"); CollectionAssert.AreEqual(expectedValue, (ICollection)e.ActualValue); }); }