Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
static void Main()
{
Test_PrimeFactorsOf14ShouldBe3();
Test_PrimeFactorsOf14ShouldBe1_2_7();
}
static void Test_PrimeFactorsOf14ShouldBe3()
{
var result = CalculatePrimeFactors(3);
if (!result.SequenceEqual(new[] { 3 }))
{
throw new Exception();
}
}
static void Test_PrimeFactorsOf14ShouldBe1_2_7()
{
var result = CalculatePrimeFactors(14);
if (!result.SequenceEqual(new[] { 1, 2, 7 }))
{
throw new Exception();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment