public void BindToDynamic() { var dynamicClass = new DynamicClass(); _vocale.Register(dynamicClass); Assert.True(_vocale.Exists("ADynamicCommand")); Assert.True(_vocale.Exists("AStaticCommand")); }
public void ExecuteDynamic() { var dynamicClass = new DynamicClass(); _vocale.Register(dynamicClass); var result = _vocale.Execute("ADynamicCommand", new object[3]) as String; Assert.AreEqual("dynamic", result); result = _vocale.Execute("AStaticCommand", new object[3]) as String; Assert.AreEqual("static", result); }
public void RemoveMultiple() { var dynamicClass = new DynamicClass(); _vocale.Register(dynamicClass); Assert.True(_vocale.Exists("AStaticCommand")); Assert.True(_vocale.Exists("ADynamicCommand")); _vocale.Remove("AStaticCommand"); Assert.False(_vocale.Exists("AStaticCommand")); _vocale.Remove("ADynamicCommand"); Assert.False(_vocale.Exists("ADynamicCommand")); }