public void CloneTest() { var health = AspectFactory.Health(); var clone = health.Clone(); Assert.IsNotNull(clone); }
public void DeserializeReturnsSelfTest() { var health = AspectFactory.Health(); health.Restore = new Action(() => {}); var self = health.Deserialize(JsonConvert.DeserializeObject("{}")); Assert.IsNotNull(self); }
public void GainHealth_IncreasesHealthByAmount() { var aspect = AspectFactory.Health(); aspect.Wounds = 100; aspect.GainHealth(60); Assert.AreEqual(40, aspect.Wounds); }
public void SerializeTest() { var complex = AspectFactory.Complex(); complex.stats = AspectFactory.Stats(); complex.health = AspectFactory.Health(); var data = complex.Serialize(); Assert.IsNotNull(data["stats"]); Assert.IsNotNull(data["health"]); }
public void MaxHealthLaunchesQueryEvent() { var eventList = new List <Event>(); var mockSelf = new Mock <Character>(); mockSelf.Setup(self => self.ReceiveEvent(It.IsAny <Event>())) .Callback <Event>(eventList.Add); var health = AspectFactory.Health(); health.Host = mockSelf.Object; var max = health.Max; mockSelf.VerifyAll(); Assert.AreEqual("query_max_health", eventList[0].Name); }
public void HealthTest() { Assert.IsNotNull(AspectFactory.Health()); }