Skip to content

Commit

Permalink
Corrigindo, renomeando e incluindo testes para o Translator.
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagomagnusss committed Oct 21, 2020
1 parent c69c643 commit cc85a86
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/syntext/TestTranslator.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package syntext;

import static org.junit.jupiter.api.Assertions.assertEquals;

import org.jfugue.pattern.Pattern;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

class TestTranslator
{

private static Translator uut;

@BeforeEach
void setUp()
throws Exception
{
uut = new Translator();
}

@Test
void testParse()
{
Pattern pt = uut.translate( "ABCuDEFaaG bcdefAB,CDE5FG A9BCD;EFG" );
String expect = "A5 B5 C5 I7 D5 E5 F5 F5 F5 G5 :CON(7,120) I7 R R R R R A5 B5 I20 R C5 D5 E5 I25 F5 G5 :CON(7,60) I7 A5 I16 B5 C5 D5 I76 I20 R E5 F5 G5 ";
assertEquals( expect, pt.toString() );
}

}

0 comments on commit cc85a86

Please sign in to comment.