Skip to content
Snippets Groups Projects
Commit a76b4bff authored by Dennis Eisold's avatar Dennis Eisold
Browse files

Unit Test für Reflektor und Steckbrett

parent bb984ff2
No related branches found
No related tags found
No related merge requests found
package Enigma.model;
import org.junit.Assert;
import org.junit.Test;
public class ReflektorTest {
@Test
public void codiere() {
/*
Reflektor r = new Reflektor();
Assert.assertEquals('E', r.codiere('A'));
Assert.assertEquals('Z', r.codiere('D'));
Assert.assertEquals('X', r.codiere('H'));
Assert.assertEquals('O', r.codiere('Q'));
Assert.assertEquals('I', r.codiere('V'));
//Assert.assertNull(null, r.codiere(null));
*/
}
@Test
public void codiere2() {
/*
Reflektor r = new Reflektor();
Assert.assertEquals('A', r.codiere('E'));
Assert.assertEquals('D', r.codiere('Z'));
Assert.assertEquals('H', r.codiere('X'));
Assert.assertEquals('Q', r.codiere('O'));
Assert.assertEquals('V', r.codiere('I'));
*/
}
}
\ No newline at end of file
package Enigma.model;
import org.junit.Assert;
import org.junit.Test;
import static org.junit.Assert.*;
public class SteckbrettTest {
@Test
public void setzeVertauschung() {
/*Steckbrett sb = new Steckbrett();
sb.setzeVertauschung('A', 'G');
sb.setzeVertauschung('C', 'H');
Assert.assertEquals('H', sb.codiere('C'));
Assert.assertEquals('G', sb.codiere('A'));*/
}
@Test
public void codiere() {
/*Steckbrett sb = new Steckbrett();
sb.setzeVertauschung('A', 'G');
sb.setzeVertauschung('C', 'H');
Assert.assertEquals('H', sb.codiere('C'));
Assert.assertEquals('G', sb.codiere('A'));*/
}
@Test
public void codiere2() {
/*Steckbrett sb = new Steckbrett();
sb.setzeVertauschung('A', 'G');
sb.setzeVertauschung('C', 'H');
Assert.assertEquals('C', sb.codiere2('H'));
Assert.assertEquals('A', sb.codiere2('G'));*/
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment