Skip to content

Commit

Permalink
Make rest test methods working for all HelloSayer implementors
Browse files Browse the repository at this point in the history
  • Loading branch information
risik committed Jun 6, 2015
1 parent 68c287e commit ecea8e6
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ enum HelloSayerType {

@Theory
public void testCreating(
@ForAll String whom
) {
new HelloSayerInplace(whom);
@ForAll String whom,
@ForAll @ValuesOf HelloSayerType sayerType
) throws Exception {
getFactory(sayerType, whom);
}

@Theory
Expand All @@ -39,9 +40,10 @@ public void testWhomGetter(

@Theory
public void greetingString(
@ForAll String whom
) {
HelloSayer sayer = new HelloSayerInplace(whom);
@ForAll String whom,
@ForAll @ValuesOf HelloSayerType sayerType
) throws Exception {
HelloSayer sayer = getFactory(sayerType, whom);
assertEquals(String.format("Hello \"%s\"", whom), sayer.getGreetingString());
}

Expand Down

0 comments on commit ecea8e6

Please sign in to comment.