update precondition test
Equal models should 'give up' only to higher priority models
This commit is contained in:
parent
db13cd09cc
commit
96bfd4e027
|
@ -159,12 +159,14 @@ class RecordingPreconditionsTest {
|
||||||
when(mockita.toString()).thenReturn("Mockita Boobilicious");
|
when(mockita.toString()).thenReturn("Mockita Boobilicious");
|
||||||
when(mockita.isOnline(true)).thenReturn(true);
|
when(mockita.isOnline(true)).thenReturn(true);
|
||||||
when(mockita.getUrl()).thenReturn("http://localhost/mockita");
|
when(mockita.getUrl()).thenReturn("http://localhost/mockita");
|
||||||
|
when(mockita.getPriority()).thenReturn(0);
|
||||||
|
|
||||||
Model theOtherOne = mock(Model.class);
|
Model theOtherOne = mock(Model.class);
|
||||||
when(theOtherOne.getRecordUntil()).thenReturn(Instant.MAX);
|
when(theOtherOne.getRecordUntil()).thenReturn(Instant.MAX);
|
||||||
when(theOtherOne.toString()).thenReturn("The Other One");
|
when(theOtherOne.toString()).thenReturn("The Other One");
|
||||||
when(theOtherOne.isOnline(true)).thenReturn(true);
|
when(theOtherOne.isOnline(true)).thenReturn(true);
|
||||||
when(theOtherOne.getUrl()).thenReturn("http://localhost/theOtherOne");
|
when(theOtherOne.getUrl()).thenReturn("http://localhost/theOtherOne");
|
||||||
|
when(theOtherOne.getPriority()).thenReturn(10);
|
||||||
|
|
||||||
ModelGroup group = new ModelGroup();
|
ModelGroup group = new ModelGroup();
|
||||||
group.add(theOtherOne);
|
group.add(theOtherOne);
|
||||||
|
|
Loading…
Reference in New Issue