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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/**
*
*/
package org.openiaml.model.tests.codegen.model0_5;

import net.sourceforge.jwebunit.api.IElement;

/**
*
*
*/
public class MapTextFieldInput extends MapsCodegenTestCase {

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

protected boolean doCheckPoints() {
return false;
}

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

/**
*
* @implementation Map
* A {@model Map} that is uninitialised will normally display anyway, at
* any location.
*
* @throws Exception
*/
public void testHasMap() throws Exception {
beginAtSitemapThenPage("Home");

IElement map = assertHasMap("Target Map");

// but no map points are generated yet
assertHasNoMapPoint("Target Map");
assertHasNoMapPoint(map, "Target Map");
}

/**
*
* @example Map,SetWire
* A {@model Map} may be updated directly by a {@model InputTextField}
* through a {@model SetWire}.
*
* @throws Exception
*/
public void testUpdateMap() throws Exception {
beginAtSitemapThenPage("Home");

// fill in text field
{
String target = getLabelIDForText("select address");
assertLabeledFieldEquals(target, "");
setLabeledFormElementField(target, "Wellington, New Zealand");
}

assertNoProblem();

// the map point now exists
IElement map = assertHasMap("Target Map");
IElement point1 = assertHasMapPoint("Target Map");
IElement point2 = assertHasMapPoint(map, "Target Map");
assertEquals(point1, point2);
}

/**
* We can update the address twice.
*
* @throws Exception
*/
public void testUpdateTwice() throws Exception {
testUpdateMap();

// fill in text field
{
String target = getLabelIDForText("select address");
assertLabeledFieldEquals(target, "Wellington, New Zealand");
setLabeledFormElementField(target, "Auckland, New Zealand");
}

assertNoProblem();

// the map point now exists
IElement map = assertHasMap("Target Map");
IElement point1 = assertHasMapPoint("Target Map");
IElement point2 = assertHasMapPoint(map, "Target Map");
assertEquals(point1, point2);
}

}

Change log

r3163 by soundasleep on Apr 4, 2012   Diff
spellchecking throughout project
Go to: 
Project members, sign in to write a code review

Older revisions

r2551 by soundasleep on Jan 16, 2011   Diff
adding additional LoginHandler
constraints
adding more modeldoc comments
r1849 by soundasleep on Apr 7, 2010   Diff
adding an inference test case for
MapTextFieldInput
adding a codegen test case for
MapTextFieldInput
Maps that do not contain any MapPoints
...
All revisions of this file

File info

Size: 2388 bytes, 103 lines
Powered by Google Project Hosting