Jelajahi Sumber

refactor names

Gary Paduana 9 tahun lalu
induk
melakukan
b1a577c48f

+ 1 - 1
src/main/groovy/com/garypaduana/groovytools/algorithm/FermatsLittleTheorm.groovy → src/main/groovy/com/garypaduana/groovytools/algorithm/FermatsLittleTheorem.groovy

@@ -1,6 +1,6 @@
 package com.garypaduana.groovytools.algorithm
 
-class FermatsLittleTheorm{
+class FermatsLittleTheorem{
 
     /**
      * Implementation of Fermat's Little Theorm to determine if a

+ 3 - 3
src/main/test/com/garypaduana/groovytools/algorithm/TestFermatsLittleTheorm.groovy → src/main/test/com/garypaduana/groovytools/algorithm/TestFermatsLittleTheorem.groovy

@@ -3,18 +3,18 @@ package com.garypaduana.groovytools.algorithm
 import com.garypaduana.groovytools.system.Timing
 import spock.lang.Specification
 
-class TestFermatsLittleTheorm extends Specification{
+class TestFermatsLittleTheorem extends Specification{
 
     def "test with known prime"(){
         when:
-            def result = Timing.timeIt({FermatsLittleTheorm.probablyPrime(15485867)})
+            def result = Timing.timeIt({FermatsLittleTheorem.probablyPrime(15485867)})
         then:
             result.returnValue == true
     }
 
     def "test with known composite"(){
         when:
-            def result = Timing.timeIt({FermatsLittleTheorm.probablyPrime(2398932)})
+            def result = Timing.timeIt({FermatsLittleTheorem.probablyPrime(2398932)})
         then:
             result.returnValue == false
     }