Пример #1
0
 public void BindToDynamic()
 {
     var dynamicClass = new DynamicClass();
     _vocale.Register(dynamicClass);
     Assert.True(_vocale.Exists("ADynamicCommand"));
     Assert.True(_vocale.Exists("AStaticCommand"));
 }
Пример #2
0
 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);
 }
Пример #3
0
        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);
        }
Пример #4
0
        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"));
        }
Пример #5
0
 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"));
 }