public void Test_OnUpdate() { var ddn = new NodeDestroyer (); var node = new Node ("DeadSoul"); ddn.Reserve (node, 100); ddn.OnUpdate (33); Assert.AreEqual (100, ddn.GetReservation (0).PurgeTime); Assert.AreEqual (67, ddn.GetReservation (0).LifeTime); }
public void Test_Reserve() { var ddn = new NodeDestroyer (); var node = new Node ("DeadSoul"); ddn.Reserve (node, 100); Assert.AreEqual (1, ddn.ReservationCount); Assert.AreEqual (1, ddn.Reserves.Count ()); Assert.AreEqual (node, ddn.GetReservation (0).Node); Assert.AreEqual (100, ddn.GetReservation (0).PurgeTime); }