edu.vub.at.objects.natives
Class CustomFieldsTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byedu.vub.at.AmbientTalkTest
              extended byedu.vub.at.objects.natives.CustomFieldsTest
All Implemented Interfaces:
junit.framework.Test

public class CustomFieldsTest
extends AmbientTalkTest

Tests custom fields that can be added to an object.

Author:
tvcutsem

Nested Class Summary
 
Nested classes inherited from class edu.vub.at.AmbientTalkTest
AmbientTalkTest.Actorscript
 
Field Summary
private  AGSymbol foo_
           
private  ATObject testField_
           
private  NATObject testHost_
           
 
Fields inherited from class edu.vub.at.AmbientTalkTest
ctx_
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
CustomFieldsTest()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 void setUp()
           
 void testCloneFieldReinit()
          Tests whether the fields of clones are properly re-initialized
 void testCustomDuplicate()
          Tests that duplicate slots are still trapped, even with custom fields
 void testCustomFieldAddition()
          Tests whether a custom field can be added to a native object
 void testCustomFieldRead()
          Tests whether a custom field can be read via readField
 void testCustomFieldWrite()
          Tests whether a custom field can be written via writeField
 void testFieldListing()
          Tests whether custom fields appear in the listFields table
 void testNativeFieldAdd()
          Tests whether native fields added to another object are not added as custom fields, but again as native fields
 
Methods inherited from class edu.vub.at.AmbientTalkTest
actorTest, evalActor, evalAndCompareTo, evalAndCompareTo, evalAndReturn, evalAndTestException, evalInActor, evalSnippet, printedEquals
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, 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

testHost_

private NATObject testHost_

testField_

private ATObject testField_

foo_

private AGSymbol foo_
Constructor Detail

CustomFieldsTest

public CustomFieldsTest()
Method Detail

main

public static void main(java.lang.String[] args)

setUp

public void setUp()
           throws InterpreterException
Throws:
InterpreterException

testCustomFieldAddition

public void testCustomFieldAddition()
                             throws java.lang.Exception
Tests whether a custom field can be added to a native object

Throws:
java.lang.Exception

testCustomFieldRead

public void testCustomFieldRead()
                         throws java.lang.Exception
Tests whether a custom field can be read via readField

Throws:
java.lang.Exception

testCustomFieldWrite

public void testCustomFieldWrite()
                          throws java.lang.Exception
Tests whether a custom field can be written via writeField

Throws:
java.lang.Exception

testCustomDuplicate

public void testCustomDuplicate()
                         throws java.lang.Exception
Tests that duplicate slots are still trapped, even with custom fields

Throws:
java.lang.Exception

testFieldListing

public void testFieldListing()
                      throws java.lang.Exception
Tests whether custom fields appear in the listFields table

Throws:
java.lang.Exception

testCloneFieldReinit

public void testCloneFieldReinit()
                          throws java.lang.Exception
Tests whether the fields of clones are properly re-initialized

Throws:
java.lang.Exception

testNativeFieldAdd

public void testNativeFieldAdd()
                        throws java.lang.Exception
Tests whether native fields added to another object are not added as custom fields, but again as native fields

Throws:
java.lang.Exception