use of org.altbeacon.beacon.simulator.StaticBeaconSimulator in project android-beacon-library by AltBeacon.
the class BeaconSimulatorTest method testSetBeaconsNull.
@Test
public void testSetBeaconsNull() {
StaticBeaconSimulator staticBeaconSimulator = new StaticBeaconSimulator();
staticBeaconSimulator.setBeacons(null);
assertEquals("getBeacons should return null", staticBeaconSimulator.getBeacons(), null);
}
use of org.altbeacon.beacon.simulator.StaticBeaconSimulator in project android-beacon-library by AltBeacon.
the class BeaconSimulatorTest method testSetBeaconsEmpty.
@Test
public void testSetBeaconsEmpty() {
StaticBeaconSimulator staticBeaconSimulator = new StaticBeaconSimulator();
ArrayList<Beacon> beacons = new ArrayList<Beacon>();
staticBeaconSimulator.setBeacons(beacons);
assertEquals("getBeacons should match values entered with setBeacons even when empty", staticBeaconSimulator.getBeacons(), beacons);
}
use of org.altbeacon.beacon.simulator.StaticBeaconSimulator in project android-beacon-library by AltBeacon.
the class BeaconSimulatorTest method testSetBeacons.
@Test
public void testSetBeacons() {
StaticBeaconSimulator staticBeaconSimulator = new StaticBeaconSimulator();
byte[] beaconBytes = hexStringToByteArray("02011a1bff1801beac2f234454cf6d4a0fadf2f4911ba9ffa600010002c509");
Beacon beacon = new AltBeaconParser().fromScanData(beaconBytes, -55, null);
ArrayList<Beacon> beacons = new ArrayList<Beacon>();
beacons.add(beacon);
staticBeaconSimulator.setBeacons(beacons);
assertEquals("getBeacons should match values entered with setBeacons", staticBeaconSimulator.getBeacons(), beacons);
}
Aggregations