You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by ts...@apache.org on 2004/02/26 17:07:54 UTC
cvs commit: jakarta-tapestry/junit/src/org/apache/tapestry/junit/mock/c30 Two.java Home.java
tsvetelin 2004/02/26 08:07:54
Modified: junit/src/org/apache/tapestry/junit/valid MockForm.java
Added: junit/src/org/apache/tapestry/junit/mock/c30 Two.java
Home.java
Log:
Hidden component unit tests
Revision Changes Path
1.5 +9 -1 jakarta-tapestry/junit/src/org/apache/tapestry/junit/valid/MockForm.java
Index: MockForm.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/junit/src/org/apache/tapestry/junit/valid/MockForm.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- MockForm.java 19 Feb 2004 17:37:51 -0000 1.4
+++ MockForm.java 26 Feb 2004 16:07:54 -0000 1.5
@@ -243,6 +243,14 @@
{
}
+
+ /**
+ * @see org.apache.tapestry.IForm#addHiddenValue(java.lang.String, java.lang.String, java.lang.String)
+ */
+ public void addHiddenValue(String name, String id, String value) {
+
+ }
+
public String getMessage(String key)
{
1.1 jakarta-tapestry/junit/src/org/apache/tapestry/junit/mock/c30/Two.java
Index: Two.java
===================================================================
// Copyright 2004 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry.junit.mock.c30;
import org.apache.tapestry.html.BasePage;
/**
* Part of tests for the Hidden component.
*
* @author Tsvetelin Saykov
* @version $Id: Two.java,v 1.1 2004/02/26 16:07:54 tsvetelin Exp $
* @since 3.0
*
**/
public abstract class Two extends BasePage
{
public abstract String getValue();
public abstract void setValue(String normal);
public abstract String getHiddenID();
public abstract void setHiddenID(String hidden);
public abstract String getValueWithEncoding();
public abstract void setValueWithEncoding(String valueWithID);
}
1.1 jakarta-tapestry/junit/src/org/apache/tapestry/junit/mock/c30/Home.java
Index: Home.java
===================================================================
// Copyright 2004 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry.junit.mock.c30;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.html.BasePage;
/**
* Tests for the Hidden component.
*
* @author Tsvetelin Saykov
* @version $Id: Home.java,v 1.1 2004/02/26 16:07:54 tsvetelin Exp $
* @since 3.0
*
**/
public abstract class Home extends BasePage
{
public abstract String getValue();
public abstract void setValue(String value);
public abstract String getHiddenID();
public abstract void setHiddenID(String hiddenID);
public abstract String getValueWithID();
public abstract void setValueWithID(String valueWithID);
public abstract String getValueWithEncoding();
public abstract void setValueWithEncoding(String valueWithID);
public abstract Boolean getBooleanValue();
public abstract void setBooleanValue(Boolean value);
protected void finishLoad()
{
setValue("1234567890");
setHiddenID("0987654321");
setValueWithID("1234567890-with id");
setValueWithEncoding("1234567890-with encoding");
setBooleanValue(Boolean.FALSE);
}
public void formSubmit(IRequestCycle cycle)
{
Two page = (Two)cycle.getPage("Two");
page.setValue(getValue());
page.setHiddenID(getHiddenID());
page.setValueWithEncoding(getValueWithEncoding());
cycle.activate(page);
}
public void hiddenListener(IRequestCycle cycle)
{
//just a test for listener
}
public boolean getEncode(){
return false;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org