Пример #1
0
        public void ExecuteDefineClassCommand()
        {
            Context context = new Context();
            DefineClassCommand command = new DefineClassCommand("MyClass", null);
            command.Execute(context);
            var result = context.GetValue("MyClass");
            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(IClass));

            IClass klass = (IClass)result;
            Assert.AreEqual("MyClass", klass.Name);
        }
Пример #2
0
 public void CreateDefineClassCommand()
 {
     DefineClassCommand command = new DefineClassCommand("MyClass", null);
     Assert.AreEqual("MyClass", command.Name);
     Assert.IsNull(command.Command);
 }