public void EventThisWillPayMoney() { var aspect = AspectFactory.Money(); var ev = Event.Create("this_will_pay_money", EventReturnMethod.Or); aspect.ReceiveEvent(ev); Assert.IsTrue(ev.ReturnValue); }
public void EventThisCanPayMoney() { var aspect = AspectFactory.Money(); var coin = new Item(_silver); coin.AddQuantity(100); var ch = new CharacterMockUp(); ch.Inventory.Add(coin); aspect.Host = ch; var ev = Event.Create("this_can_pay_money", EventReturnMethod.And, new EventArg("amount", 80)); aspect.ReceiveEvent(ev); Assert.IsTrue(ev.ReturnValue); var cantPay = Event.Create("this_can_pay_money", EventReturnMethod.And, new EventArg("amount", 120)); aspect.ReceiveEvent(cantPay); Assert.IsFalse(cantPay.ReturnValue); }
public void Money() { Assert.IsNotNull(AspectFactory.Money()); }