Example #1
0
 public void CanGetDelegate()
 {
     var obj = new MockStructure();
     var suffix = new NoArgsSuffix<Encapsulation.Structure>(() => obj );
     var del = suffix.Get();
     Assert.IsNotNull(del);
 }
        public void CanGetDelegate()
        {
            var obj    = new MockStructure();
            var suffix = new NoArgsSuffix <Encapsulation.Structure>(() => obj);
            var del    = suffix.Get();

            Assert.IsNotNull(del);
        }
Example #3
0
        public void CanGetDelegateValue()
        {
            var obj = new MockStructure();
            var suffix = new NoArgsSuffix<Encapsulation.Structure>(() => obj );
            var del = suffix.Get();
            Assert.IsNotNull(del);

            cpu.PushStack(null);  // dummy variable for ReverseStackArgs to pop
            cpu.PushStack(new KOSArgMarkerType());
            del.Invoke(cpu);

            var value = del.Value;
            Assert.IsNotNull(value);
            Assert.AreSame(obj,value);
        }
        public void CanGetDelegateValue()
        {
            var obj    = new MockStructure();
            var suffix = new NoArgsSuffix <Encapsulation.Structure>(() => obj);
            var del    = suffix.Get();

            Assert.IsNotNull(del);

            cpu.PushStack(null);  // dummy variable for ReverseStackArgs to pop
            cpu.PushStack(new KOSArgMarkerType());
            del.Invoke(cpu);

            var value = del.Value;

            Assert.IsNotNull(value);
            Assert.AreSame(obj, value);
        }