Created
February 15, 2015 00:14
-
-
Save JayBazuzi/115890d1949a7971e2e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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