Skip to content

Instantly share code, notes, and snippets.

@JayBazuzi
Created February 15, 2015 00:14
Show Gist options
  • Save JayBazuzi/115890d1949a7971e2e2 to your computer and use it in GitHub Desktop.
Save JayBazuzi/115890d1949a7971e2e2 to your computer and use it in GitHub Desktop.
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