forked from unimatrix/web
Extract DuneNPC with admin GUI and timed illuminated quest camps
This commit is contained in:
parent
f5bbe09227
commit
a4bb6c97e0
1 changed files with 740 additions and 83 deletions
|
|
@ -0,0 +1,23 @@
|
|||
package com.example.dunenpc;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import java.util.UUID;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
class SmugglerMissionsTest {
|
||||
@Test void realTimeDeadlineExpiresAtThirtyMinutesAndSurvivesOfflineElapsedTime() {
|
||||
long start = 1000000L;
|
||||
Smugglers.Contract contract = new Smugglers.Contract("water", 4, 41, UUID.randomUUID(), 0, 0,
|
||||
start + Smugglers.MISSION_MILLIS);
|
||||
assertFalse(contract.expired(start + 29 * 60 * 1000L));
|
||||
assertFalse(contract.expired(start + Smugglers.MISSION_MILLIS - 1));
|
||||
assertTrue(contract.expired(start + Smugglers.MISSION_MILLIS));
|
||||
assertTrue(contract.expired(start + 24 * 60 * 60 * 1000L));
|
||||
}
|
||||
@Test void deliveryNeedsDifferentTraderAndSixtyFourBlockRoute() {
|
||||
UUID source = UUID.randomUUID(), other = UUID.randomUUID();
|
||||
Smugglers.Contract contract = new Smugglers.Contract("spice", 64, 1392, source, 10, -20);
|
||||
assertFalse(Smugglers.validDestination(contract, source, 1000, 1000));
|
||||
assertFalse(Smugglers.validDestination(contract, other, 73, -20));
|
||||
assertTrue(Smugglers.validDestination(contract, other, 74, -20));
|
||||
assertTrue(Smugglers.validDestination(contract, other, 10, -84));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue

Staff