package aufgabe4; import org.junit.Test; import static aufgabe4.Verschluesselung.entschluesseln; import static aufgabe4.Verschluesselung.verschluesseln; /** * Generic test class testing * _ _ _ _ * __ ___ __(_) |_| |_ ___ _ __ | |__ _ _ * \ \ /\ / / '__| | __| __/ _ \ '_ \ | '_ \| | | | * \ V V /| | | | |_| || __/ | | | | |_) | |_| | * \_/\_/ |_| |_|\__|\__\___|_| |_| |_.__/ \__, | * |___/ * ____ __ __ _ * / ___|_ _____ _ __ \ \ / /__ __ _ ___| | * \___ \ \ / / _ \ '_ \ \ \ / / _ \ / _` |/ _ \ | * ___) \ V / __/ | | | \ V / (_) | (_| | __/ | * |____/ \_/ \___|_| |_| \_/ \___/ \__, |\___|_| * |___/ * Licensed under the GPLv2 License, Version 2.0 (the "License"); * Copyright (c) Sven Vogel */ public class TestGeheimtextVerschiebung { @Test public void test() { var text = "IchBinEinText"; var map = new char[] {'v', 'u', 'b', 'y', 'd', 'f', 'k', 'g', 'h', 'i', 'j', 'c', 'q', 'l', 'm', 'n', 'o', 'p', 'r', 's', 'e', 't', 'a', 'w', 'x', 'z'}; var chiffre = new GeheimtextalphabetVerschiebung(map); var encrypted = verschluesseln(text, chiffre); System.out.println(encrypted); var decrypted = entschluesseln(encrypted, chiffre); System.out.println(decrypted); } }