org.apache.tapestry.enhance
Class TestEnhancementOperation

java.lang.Object
  extended by BaseComponentTestCase
      extended by org.apache.tapestry.enhance.TestEnhancementOperation

public class TestEnhancementOperation
extends BaseComponentTestCase

Tests for EnhancementOperationImpl.

Since:
4.0
Author:
Howard M. Lewis Ship

Nested Class Summary
static class TestEnhancementOperation.ExistingAbstractMethodFixture
           
static class TestEnhancementOperation.Fixture
           
static class TestEnhancementOperation.GetClassReferenceFixture
           
static class TestEnhancementOperation.MissingConstructorFixture
           
static class TestEnhancementOperation.UnclaimedAbstractPropertiesFixture
           
static class TestEnhancementOperation.ValidatingComponent
           
 
Constructor Summary
TestEnhancementOperation()
           
 
Method Summary
 void getExistingAbstractMethod()
           
protected  void setUp()
           
 void test_Check_Implements_Class_Implements()
           
 void test_Check_Implements_No_Interface()
           
 void test_Claim_Readonly_Property_Claimed()
           
 void test_Claim_Readonly_Property_Does_Not_Exist()
           
 void test_Claim_Readonly_Property_Has_Setter()
           
 void test_Claimed_Property()
           
 void test_Constructor_And_Accessors()
           
 void test_Find_Unclaimed_Abstract_Properties()
           
 void test_Get_Class_Reference()
          On this test, instead of mocking up everything, we actually use the raw implementations to construct a new class; the class gets a class reference passed to it in its constructor.
 void test_Get_Property_Type()
           
 void testAddField()
           
 void testAddInjectedField()
           
 void testAddMethod()
           
 void testAddMethodDuplicate()
           
 void testCheckImplementsMatchAddedInterfaces()
           
 void testCheckImplementsNoMatchForAddedInterfaces()
           
 void testComponentConstructorFailure()
          Really a test for ComponentConstructorImpl; test_Get_Class_Reference() tests the success case, just want to fill in the failure.
 void testConstructorFailure()
           
 void testConvertTypeName()
           
 void testGetAccessorMethodName()
           
 void testGetArrayClassReference()
           
 void testGetExistingMethod()
           
 void testGetExistingProtectedMethod()
           
 void testGetNewMethod()
           
 void testPropertyInheritedFromInterface()
          This seems to pass on the command line, but fail inside Eclipse.
 void testValidatePropertyMatches()
           
 void testValidatePropertyMismatch()
           
 void testValidatePropertyNew()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestEnhancementOperation

public TestEnhancementOperation()
Method Detail

setUp

protected void setUp()
              throws Exception
Throws:
Exception

test_Claimed_Property

public void test_Claimed_Property()

test_Claim_Readonly_Property_Does_Not_Exist

public void test_Claim_Readonly_Property_Does_Not_Exist()

test_Claim_Readonly_Property_Claimed

public void test_Claim_Readonly_Property_Claimed()

test_Claim_Readonly_Property_Has_Setter

public void test_Claim_Readonly_Property_Has_Setter()

test_Constructor_And_Accessors

public void test_Constructor_And_Accessors()

test_Check_Implements_No_Interface

public void test_Check_Implements_No_Interface()

test_Check_Implements_Class_Implements

public void test_Check_Implements_Class_Implements()

testCheckImplementsNoMatchForAddedInterfaces

public void testCheckImplementsNoMatchForAddedInterfaces()

testCheckImplementsMatchAddedInterfaces

public void testCheckImplementsMatchAddedInterfaces()

testValidatePropertyNew

public void testValidatePropertyNew()

testValidatePropertyMatches

public void testValidatePropertyMatches()

testValidatePropertyMismatch

public void testValidatePropertyMismatch()

testConvertTypeName

public void testConvertTypeName()

testAddField

public void testAddField()

testAddInjectedField

public void testAddInjectedField()

testAddMethod

public void testAddMethod()

testAddMethodDuplicate

public void testAddMethodDuplicate()

testGetAccessorMethodName

public void testGetAccessorMethodName()

test_Get_Class_Reference

public void test_Get_Class_Reference()
                              throws Exception
On this test, instead of mocking up everything, we actually use the raw implementations to construct a new class; the class gets a class reference passed to it in its constructor.

Throws:
Exception

testGetArrayClassReference

public void testGetArrayClassReference()
                                throws Exception
Throws:
Exception

testComponentConstructorFailure

public void testComponentConstructorFailure()
Really a test for ComponentConstructorImpl; test_Get_Class_Reference() tests the success case, just want to fill in the failure.


test_Get_Property_Type

public void test_Get_Property_Type()

test_Find_Unclaimed_Abstract_Properties

public void test_Find_Unclaimed_Abstract_Properties()

testGetNewMethod

public void testGetNewMethod()

testGetExistingMethod

public void testGetExistingMethod()

testGetExistingProtectedMethod

public void testGetExistingProtectedMethod()

getExistingAbstractMethod

public void getExistingAbstractMethod()

testPropertyInheritedFromInterface

public void testPropertyInheritedFromInterface()
This seems to pass on the command line, but fail inside Eclipse. I think Eclipse's Java compiler works a little different from Java's ... in this example (TODO: Create test fixture classes for this test) the getTarget() method doesn't show up as a declared public method when Eclipse compiles the code, but does when JDK compiles the code.


testConstructorFailure

public void testConstructorFailure()


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.