Skip to content

Instantly share code, notes, and snippets.

@alefcarlos
Created January 8, 2019 01:55
Show Gist options
  • Save alefcarlos/d3a633e474f2d5dfe2728232ab90a173 to your computer and use it in GitHub Desktop.
Save alefcarlos/d3a633e474f2d5dfe2728232ab90a173 to your computer and use it in GitHub Desktop.
using Shouldly;
using Xunit;
namespace Problems.Tests
{
public class ProblemsSolutionTests
{
/// <summary>
/// If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
// Find the sum of all the multiples of 3 or 5 below 1000.
/// </summary>
[Theory]
[InlineData(10, new int[] { 3, 5 }, 23)]
[InlineData(10, new int[] { 3 }, 18)]
public void SumOfMultiples_ShouldSuccess(int maxAmout, int[] possibleMultiples, int result)
{
Helpers.SumOfMultiples(maxAmout, possibleMultiples).ShouldBe(result);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment