Ejemplo n.º 1
0
        public void LookupMethods()
        {
            BaseBehavior behavior = new BaseBehavior();

            Assert.IsNotNull(behavior.Lookup("lookup:"));
            Assert.IsNotNull(behavior.Lookup("allocate:"));
            Assert.IsNotNull(behavior.Lookup("delegated"));
            Assert.IsNotNull(behavior.Lookup("methodAt:put:"));
            Assert.IsNotNull(behavior.Lookup("vtable"));
        }
Ejemplo n.º 2
0
        public void AddAndLookupMethod()
        {
            BaseBehavior behavior = new BaseBehavior();
            MockMethod   method   = new MockMethod();

            behavior.Send("methodAt:put:", "aMethod", method);

            Assert.AreEqual(method, behavior.Lookup("aMethod"));
            Assert.AreEqual(method, behavior.Send("lookup:", "aMethod"));
        }
Ejemplo n.º 3
0
        public void LookupUnknownMethodReturnsNull()
        {
            BaseBehavior behavior = new BaseBehavior();

            Assert.IsNull(behavior.Lookup("unknown"));
        }
Ejemplo n.º 4
0
        public void ShouldRaiseIfSelectorIsNullWhenLookup()
        {
            BaseBehavior behavior = new BaseBehavior();

            behavior.Lookup(null);
        }