forked from exercism/scala
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update atbash-cipher to match latest canonical json.
Refs exercism#488
- Loading branch information
Showing
3 changed files
with
38 additions
and
15 deletions.
There are no files selected for viewing
32 changes: 18 additions & 14 deletions
32
exercises/atbash-cipher/src/test/scala/AtbashCipherTest.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,68 @@ | ||
import org.scalatest.{Matchers, FunSuite} | ||
|
||
/** @version 1.0.0 */ | ||
/** @version 1.1.0 */ | ||
class AtbashCipherTest extends FunSuite with Matchers { | ||
|
||
test("encode yes") { | ||
AtbashCipher.encode("yes") should be ("bvh") | ||
AtbashCipher.encode("yes") should be("bvh") | ||
} | ||
|
||
test("encode no") { | ||
pending | ||
AtbashCipher.encode("no") should be ("ml") | ||
AtbashCipher.encode("no") should be("ml") | ||
} | ||
|
||
test("encode OMG") { | ||
pending | ||
AtbashCipher.encode("OMG") should be ("lnt") | ||
AtbashCipher.encode("OMG") should be("lnt") | ||
} | ||
|
||
test("encode spaces") { | ||
pending | ||
AtbashCipher.encode("O M G") should be ("lnt") | ||
AtbashCipher.encode("O M G") should be("lnt") | ||
} | ||
|
||
test("encode mindblowingly") { | ||
pending | ||
AtbashCipher.encode("mindblowingly") should be ("nrmwy oldrm tob") | ||
AtbashCipher.encode("mindblowingly") should be("nrmwy oldrm tob") | ||
} | ||
|
||
test("encode numbers") { | ||
pending | ||
AtbashCipher.encode("Testing,1 2 3, testing.") should be ("gvhgr mt123 gvhgr mt") | ||
AtbashCipher.encode("Testing,1 2 3, testing.") should be( | ||
"gvhgr mt123 gvhgr mt") | ||
} | ||
|
||
test("encode deep thought") { | ||
pending | ||
AtbashCipher.encode("Truth is fiction.") should be ("gifgs rhurx grlm") | ||
AtbashCipher.encode("Truth is fiction.") should be("gifgs rhurx grlm") | ||
} | ||
|
||
test("encode all the letters") { | ||
pending | ||
AtbashCipher.encode("The quick brown fox jumps over the lazy dog.") should be ("gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt") | ||
AtbashCipher.encode("The quick brown fox jumps over the lazy dog.") should be( | ||
"gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt") | ||
} | ||
|
||
test("decode exercism") { | ||
pending | ||
AtbashCipher.decode("vcvix rhn") should be ("exercism") | ||
AtbashCipher.decode("vcvix rhn") should be("exercism") | ||
} | ||
|
||
test("decode a sentence") { | ||
pending | ||
AtbashCipher.decode("zmlyh gzxov rhlug vmzhg vkkrm thglm v") should be ("anobstacleisoftenasteppingstone") | ||
AtbashCipher.decode("zmlyh gzxov rhlug vmzhg vkkrm thglm v") should be( | ||
"anobstacleisoftenasteppingstone") | ||
} | ||
|
||
test("decode numbers") { | ||
pending | ||
AtbashCipher.decode("gvhgr mt123 gvhgr mt") should be ("testing123testing") | ||
AtbashCipher.decode("gvhgr mt123 gvhgr mt") should be("testing123testing") | ||
} | ||
|
||
test("decode all the letters") { | ||
pending | ||
AtbashCipher.decode("gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt") should be ("thequickbrownfoxjumpsoverthelazydog") | ||
AtbashCipher.decode("gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt") should be( | ||
"thequickbrownfoxjumpsoverthelazydog") | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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