public void CleaningEventTest() { CleaningEvent ce = new CleaningEvent(); ce.Time = 5; ce.ToClean = new Room(); Assert.AreEqual(ce.Time, 5); Assert.AreEqual(ce.ToClean.GetType(), typeof(Room)); }
public void HandleEvent(CleaningEvent evt) { foreach (var asset in evt.Assets) { asset.State = AssetState.Available; asset.History.Add(new AssetEventInfo { AssetId = asset.Id, EventId = evt.Id, EventType = AssetEventType.Collected, }); _assets.Update(asset, commit: false); } _events.Add(evt); }