Skip to content

Commit

Permalink
fix issue in unit tests where audio manager is not properly initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasstarsz committed May 12, 2022
1 parent 646fa22 commit 748f64a
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import javax.sound.sampled.UnsupportedAudioFileException;

import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

Expand All @@ -37,6 +38,16 @@ public static void onlyRunIfAudioOutputIsSupported() {
assumeTrue(EnvironmentHelper.DoesEnvironmentSupportAudioOutput);
}

@BeforeAll
public static void initAudioManager() {
FastJEngine.getAudioManager().init();
}

@AfterAll
public static void resetAudioManager() {
FastJEngine.getAudioManager().reset();
}

@Test
void checkMemoryAudioLoading_withPath_withWAVFormatAudio() {
MemoryAudio memoryAudio = GeneralAudioManager.loadMemoryAudio(TestAudioPath);
Expand Down

0 comments on commit 748f64a

Please sign in to comment.