|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase org.shapelogic.euler.ProjectEuler1Test
public class ProjectEuler1Test
First part of implementation of Project Euler.
See: http://projecteuler.net.
Constructor Summary | |
---|---|
ProjectEuler1Test()
|
Method Summary | |
---|---|
static boolean |
palindrome(int input)
|
static long |
productWithPower(java.util.Map<java.lang.Integer,java.lang.Integer> factorsWithPower)
Calculated the product of factors uplifted to a power. |
static int |
rankOfDivisor(int input,
int divisor)
Number of this the divisor is dividable into the input. |
void |
testPalindrome()
|
void |
testProblem1()
Problem 1. |
void |
testProblem10()
Problem 10. |
void |
testProblem2()
Problem 2. |
void |
testProblem3()
Problem 3. |
void |
testProblem4()
Problem 4. |
void |
testProblem5()
Problem 5. |
void |
testProblem6()
Problem 6. |
void |
testProblem7()
Problem 7. |
void |
testProblem8()
Problem 8. |
void |
testProblem9()
Problem 9. |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ProjectEuler1Test()
Method Detail |
---|
public void testProblem1()
public void testProblem2()
public void testProblem3()
public void testProblem4()
public static boolean palindrome(int input)
public void testPalindrome()
public static long productWithPower(java.util.Map<java.lang.Integer,java.lang.Integer> factorsWithPower)
factorsWithPower
- the key is the factor and the value is the power.public static int rankOfDivisor(int input, int divisor)
input
- number to testdivisor
-
public void testProblem5()
public void testProblem6()
public void testProblem7()
public void testProblem8()
public void testProblem9()
public void testProblem10()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |