Skip to content

Commit

Permalink
Merge pull request #3 from bugix/fix_guitar
Browse files Browse the repository at this point in the history
Add failing test for #1
  • Loading branch information
bugix authored Apr 12, 2023
2 parents 325647e + 371cc73 commit 2d38604
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/example/beatlessonggenerator/Guitar.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class Guitar implements SoundGenerator {

@Override
public String generate(int bar) {
return "huuuuuummmmmmmmmmmmmmm";
return "Dudelidudeli didididid";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;

import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

@Slf4j
Expand Down Expand Up @@ -38,4 +39,10 @@ void happyTest() {
assertTrue(true);
}

@Test
void testGuitar() {
var guitar = applicationContext.getBean(Guitar.class);
assertNotEquals("huuuuuummmmmmmmmmmmmmm", guitar.generate(1));
}

}

0 comments on commit 2d38604

Please sign in to comment.