Created
April 16, 2018 18:11
-
-
Save GeePawHill/8df213492ca4591753a2991b5d46990e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.geepawhill.contentment.fragments; | |
import static org.assertj.core.api.Assertions.assertThat; | |
import org.geepawhill.contentment.core.Context; | |
import org.geepawhill.contentment.rhythm.SimpleRhythm; | |
import org.junit.*; | |
public class SyncTest | |
{ | |
private SimpleRhythm rhythm; | |
private Context context; | |
private Sync sync; | |
@Before | |
public void before() | |
{ | |
context = new Context(); | |
rhythm = new SimpleRhythm(); | |
context.setRhythm(rhythm); | |
sync = new Sync(1); | |
} | |
@Test | |
public void continuesIfNotThereYet() | |
{ | |
assertThat(sync.interpolate(context, 0)).isTrue(); | |
} | |
@Test | |
public void finishesIfThere() | |
{ | |
rhythm.seekHard(2000); | |
assertThat(sync.interpolate(context, 0)).isFalse(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment