edu.vub.at.objects.mirrors
Class ReflectiveAccessTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byedu.vub.at.AmbientTalkTestCase
              extended byedu.vub.at.objects.mirrors.ReflectiveAccessTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
InvocationTest, MirageTest

public class ReflectiveAccessTest
extends AmbientTalkTestCase

ReflectiveAccessTest is a superclass to a framework of test cases geared towards exploiting the reflective machinery provided in the mirrors package to explore whether the mechanism works correctly and therefore allows one to access and invoke java fields and methods from within AmbientTalk (both at the base and meta-level) and to access and invoke Ambienttalk fields and methods through the mediation of Mirages. This file establishes a common vocabulary for these idiosyncratic tests and allows code reuse for commonly used features.

Author:
smostinc

Field Summary
protected  ATTable closures
           
protected  NATClosure echo_
           
protected  NATClosure fail
           
protected  ATBoolean False
           
protected  ATObject lexicalRoot
           
protected  NATClosure success
           
protected  NATClosure symbol
           
protected  ATBoolean True
           
 
Fields inherited from class edu.vub.at.AmbientTalkTestCase
ctx_, unittest_
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
ReflectiveAccessTest()
           
 
Method Summary
protected  void evaluateInput(java.lang.String input, ATContext ctx)
           
protected  void setUp()
          Initializes the lexical root for the purpose of this test.
 
Methods inherited from class edu.vub.at.AmbientTalkTestCase
tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fail

protected final NATClosure fail

success

protected final NATClosure success

symbol

protected final NATClosure symbol

echo_

protected final NATClosure echo_

True

protected final ATBoolean True

False

protected final ATBoolean False

lexicalRoot

protected ATObject lexicalRoot

closures

protected ATTable closures
Constructor Detail

ReflectiveAccessTest

public ReflectiveAccessTest()
Method Detail

evaluateInput

protected void evaluateInput(java.lang.String input,
                             ATContext ctx)
                      throws InterpreterException
Overrides:
evaluateInput in class AmbientTalkTestCase
Throws:
InterpreterException

setUp

protected void setUp()
              throws java.lang.Exception
Initializes the lexical root for the purpose of this test.

Overrides:
setUp in class AmbientTalkTestCase
Throws:
java.lang.Exception