public void IsEmptyGivesFalseIfBeaconDataSizeIsNotEqualToZero() { // given var target = new BeaconCache(); target.AddActionData(1, 1000L, "a"); target.AddEventData(1, 1000L, "b"); // then Assert.That(target.IsEmpty(1), Is.False); }
public void IsEmptyGivesTrueIfBeaconDoesNotContainActiveData() { // given var target = new BeaconCache(); target.AddActionData(1, 1000L, "a"); target.AddEventData(1, 1000L, "b"); target.GetNextBeaconChunk(1, "prefix", 0, '&'); // then Assert.That(target.IsEmpty(1), Is.True); }
public void IsEmptyGivesTrueIfBeaconDoesNotExistInCache() { // given var target = new BeaconCache(); target.AddActionData(1, 1000L, "a"); target.AddActionData(1, 1001L, "iii"); target.AddEventData(1, 1000L, "b"); target.AddEventData(1, 1001L, "jjj"); // then Assert.That(target.IsEmpty(666), Is.True); }
public void IsEmptyGivesTrueIfBeaconDoesNotExistInCache() { // given var keyOne = new BeaconKey(1, 0); var keyTwo = new BeaconKey(666, 0); var target = new BeaconCache(logger); target.AddActionData(keyOne, 1000L, "a"); target.AddActionData(keyOne, 1001L, "iii"); target.AddEventData(keyOne, 1000L, "b"); target.AddEventData(keyOne, 1001L, "jjj"); // then Assert.That(target.IsEmpty(keyTwo), Is.True); }
public void IsEmptyGivesTrueIfBeaconDoesNotContainActiveData() { // given var key = new BeaconKey(1, 0); var target = new BeaconCache(logger); target.AddActionData(key, 1000L, "a"); target.AddEventData(key, 1000L, "b"); target.PrepareDataForSending(key); target.GetNextBeaconChunk(key, "prefix", 0, '&'); // then Assert.That(target.IsEmpty(key), Is.True); }