public void TestCompleteVerbShouldFindWholeVerb() { Thing thisThing = new Thing("nothing"); Func <bool> lookAction = new Func <bool>(() => { return(true); }); thisThing.AddVerb("look", new Thing.AllowUseAloneDelegate(lookAction)); Assert.IsTrue(thisThing.AllowUseAlone("look")); }
public void TestCompleteVerbShouldFindPartialVerb() { Thing thisThing = new Thing("nothing"); Func <bool> lookAction = new Func <bool>(() => { Messages.Action("{D0 v0look}", thisThing); return(true); }); thisThing.AddVerb("l", new Thing.AllowUseAloneDelegate(lookAction)); Assert.IsTrue(thisThing.AllowUseAlone("l")); }