Пример #1
0
        public void GetAssociatedBehaviorUsingMetaClass()
        {
            Machine hostmachine = new Machine();
            IClass hostklass = hostmachine.CreateClass("Rectangle");
            hostmachine.SetGlobalObject(hostklass.Name, hostklass);

            Machine machine = new Machine();
            IClass klass = machine.CreateClass("Rectangle");
            machine.SetGlobalObject(klass.Name, klass);

            var result = hostmachine.GetAssociatedBehavior(klass.Behavior);

            Assert.IsNotNull(result);
            Assert.AreSame(hostklass.Behavior, result);
        }