File tree Expand file tree Collapse file tree
core-java-modules/core-java-os/src/test/java/com/baeldung/example/soundapi Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public class AppTest {
1717 SoundRecorder soundRecorder = new SoundRecorder ();
1818
1919 @ Test
20- public void when_run_save_SoundClip () {
20+ public void Given_SoundRecorderObject_When_Run_Then_ThrowsNoException () {
2121
2222 soundRecorder .build (af );
2323 try {
@@ -31,13 +31,13 @@ public void when_run_save_SoundClip() {
3131 }
3232
3333 @ Test
34- public void when_run_get_targetdataline () {
34+ public void Given_AudioFormatObject_When_NotNull_Then_ReturnsTargetDataLine () {
3535 soundRecorder .setFormat (af );
3636 Assertions .assertDoesNotThrow (() -> soundRecorder .getTargetDataLineForRecord ());
3737 }
3838
3939 @ Test
40- public void when_run_build_byte_ouptstream () {
40+ public void Given_TargetLineDataObject_When_Run_Then_GeneratesOutputStream () {
4141
4242 soundRecorder .setFormat (af );
4343 ByteArrayOutputStream out = new ByteArrayOutputStream ();
@@ -52,7 +52,7 @@ public void when_run_build_byte_ouptstream() {
5252 }
5353
5454 @ Test
55- public void when_run_then_save_file () {
55+ public void Given_AudioInputStream_When_NotNull_Then_SaveToWavFile () {
5656 soundRecorder .setFormat (af );
5757 soundRecorder .build (af );
5858 try {
You can’t perform that action at this time.
0 commit comments