My favorites | Sign in
Project Home Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/**
*
*/
package org.openiaml.model.tests.codegen.model0_5_3;

import java.util.Date;

import org.openiaml.model.tests.CodegenTestCase;

/**
* @example SyncWire,Label
* Connecting a hidden {@model Label} element with a {@model SyncWire}.
*
*/
public class HiddenFieldSyncWire extends CodegenTestCase {

@Override
protected void setUp() throws Exception {
super.setUp();
root = loadAndCodegen(getClass());
}

/**
* The home page can be accessed.
*
* @throws Exception
*/
public void testHome() throws Exception {
beginAtSitemapThenPage("Home");
assertNoProblem();
}

public void testInput() throws Exception {

beginAtSitemapThenPage("Home");
assertNoProblem();

// both fields are initially empty
{
String target = getLabelIDForText("input");
assertLabeledFieldEquals(target, "");
}
{
String target = getLabelIDForText("output");
assertLabeledFieldEquals(target, "");
}

// change 'input'
String input = new Date().toString();
{
String target = getLabelIDForText("input");
assertLabeledFieldEquals(target, "");
setLabeledFormElementField(target, input);
}

// changes output
{
String target = getLabelIDForText("output");
assertLabeledFieldEquals(target, input);
}
assertNoProblem();

// there is no label with the text anywhere
assertLabelTextNotPresent(input);

// change 'output'
String output = input.substring(5).toLowerCase() + " test";
assertNotEqual(input, output);
{
String target = getLabelIDForText("output");
assertLabeledFieldEquals(target, input);
setLabeledFormElementField(target, output);
}

// changes input
{
String target = getLabelIDForText("input");
assertLabeledFieldEquals(target, output);
}

assertNoProblem();

}

}

Change log

r3068 by soundasleep on Aug 8, 2011   Diff
improving modeldoc documentation across
inference rules, codegen templates, ecore,
and additional documentation includes
Go to: 
Project members, sign in to write a code review

Older revisions

r2394 by soundasleep on Jun 30, 2010   Diff
adding codegen test case for
HiddenFieldSyncWire
All revisions of this file

File info

Size: 1853 bytes, 85 lines
Powered by Google Project Hosting