From 57732a41cb708d73c752c54dc6f58ad5389e7aa0 Mon Sep 17 00:00:00 2001 From: Sander Ploegsma Date: Mon, 23 Oct 2023 10:02:26 +0200 Subject: [PATCH] Sync tests for practice exercise `crypto-square` --- .../practice/crypto-square/.meta/tests.toml | 16 +++++++++++++--- exercises/practice/crypto-square/.meta/version | 1 - .../src/test/java/CryptoSquareTest.java | 11 ++++++++++- 3 files changed, 23 insertions(+), 5 deletions(-) delete mode 100644 exercises/practice/crypto-square/.meta/version diff --git a/exercises/practice/crypto-square/.meta/tests.toml b/exercises/practice/crypto-square/.meta/tests.toml index 054544573..085d142ea 100644 --- a/exercises/practice/crypto-square/.meta/tests.toml +++ b/exercises/practice/crypto-square/.meta/tests.toml @@ -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" diff --git a/exercises/practice/crypto-square/.meta/version b/exercises/practice/crypto-square/.meta/version deleted file mode 100644 index 944880fa1..000000000 --- a/exercises/practice/crypto-square/.meta/version +++ /dev/null @@ -1 +0,0 @@ -3.2.0 diff --git a/exercises/practice/crypto-square/src/test/java/CryptoSquareTest.java b/exercises/practice/crypto-square/src/test/java/CryptoSquareTest.java index c26f59d53..34d95d679 100644 --- a/exercises/practice/crypto-square/src/test/java/CryptoSquareTest.java +++ b/exercises/practice/crypto-square/src/test/java/CryptoSquareTest.java @@ -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() { @@ -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);