plectrum

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b0c76a5d4ca28fe3b127787fdcd237fe78649ceb
parent ad9d2f8941707b04b1d5fa706e9ffb8eb2df3145
Author: gstraube <gstraube@mailbox.org>
Date:   Sun, 14 Jun 2020 19:23:34 +0200

Adjust test (issue #30)

Diffstat:
Mapp/src/test/java/com/github/cythara/PitchComparatorTest.java | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/src/test/java/com/github/cythara/PitchComparatorTest.java b/app/src/test/java/com/github/cythara/PitchComparatorTest.java @@ -25,6 +25,7 @@ public class PitchComparatorTest { public void retrieveNote() { PowerMockito.mockStatic(MainActivity.class); Mockito.when(MainActivity.getCurrentTuning()).thenReturn(new GuitarTuning()); + Mockito.when(MainActivity.getReferencePitch()).thenReturn(440); Map<Float, PitchDifference> expectations = new HashMap<>(); expectations.put(20f, new PitchDifference(E2, -2451.3202694972874)); @@ -38,7 +39,7 @@ public class PitchComparatorTest { assertNotNull(expected); assertThat(actual.closest, is(expected.closest)); - assertThat(actual.deviation, closeTo(expected.deviation, 0.001)); + assertThat(actual.deviation, closeTo(expected.deviation, 0.01)); } } }