public void Should_throw_argument_exception_if_numbers_sequence_is_null_or_empty(int[] numbers) { // Arrange var sut = new CalculatorServcie(); // Act & Assert Assert.Throws <ArgumentException>(() => sut.GetStatistics(numbers)); }
public void Should_return_correct_elements_count(int[] numbers, int expectedResult) { // Arrange var sut = new CalculatorServcie(); // Act var statistics = sut.GetStatistics(numbers); // Assert statistics.Should().NotBeNull(); statistics.ElementsCount.Should().Be(expectedResult); }
public void Should_return_correct_average_value(int[] numbers, double expectedResult) { // Arrange var sut = new CalculatorServcie(); // Act var statistics = sut.GetStatistics(numbers); // Assert statistics.Should().NotBeNull(); statistics.AverageValue.Should().Be(expectedResult); }