Skip to content

Commit

Permalink
Sync tests for practice exercise crypto-square (#2532)
Browse files Browse the repository at this point in the history
[no imporant files changed]
  • Loading branch information
sanderploegsma authored Oct 25, 2023
1 parent 710caf3 commit b76610e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
16 changes: 13 additions & 3 deletions exercises/practice/crypto-square/.meta/tests.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
# This is an auto-generated file. Regular comments will be removed when this
# file is regenerated. Regenerating will not touch any manually added keys,
# so comments can be added in a "comment" key.
# This is an auto-generated file.
#
# Regenerating this file via `configlet sync` will:
# - Recreate every `description` key/value pair
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
# - Preserve any other key/value pair
#
# As user-added comments (using the # character) will be removed when this file
# is regenerated, comments can be added via a `comment` key.

[407c3837-9aa7-4111-ab63-ec54b58e8e9f]
description = "empty plaintext results in an empty ciphertext"

[aad04a25-b8bb-4304-888b-581bea8e0040]
description = "normalization results in empty plaintext"

[64131d65-6fd9-4f58-bdd8-4a2370fb481d]
description = "Lowercase"

Expand Down
1 change: 0 additions & 1 deletion exercises/practice/crypto-square/.meta/version

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ public void emptyPlaintextResultsInEmptyCiphertext() {
assertThat(cryptoSquare.getCiphertext()).isEqualTo(expectedOutput);
}

@Ignore("Remove to run test")
@Test
public void normalizationResultsInEmptyCiphertext() {
CryptoSquare cryptoSquare = new CryptoSquare("... --- ...");
String expectedOutput = "";

assertThat(cryptoSquare.getCiphertext()).isEqualTo(expectedOutput);
}

@Ignore("Remove to run test")
@Test
public void lettersAreLowerCasedDuringEncryption() {
Expand Down Expand Up @@ -62,7 +71,7 @@ public void eightCharacterPlaintextResultsInThreeChunksWithATrailingSpace() {
@Test
public void fiftyFourCharacterPlaintextResultsInSevenChunksWithTrailingSpaces() {
CryptoSquare cryptoSquare = new CryptoSquare("If man was meant to stay on the ground, god would have " +
"given us roots.");
"given us roots.");
String expectedOutput = "imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau ";

assertThat(cryptoSquare.getCiphertext()).isEqualTo(expectedOutput);
Expand Down

0 comments on commit b76610e

Please sign in to comment.