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
/**
*
*/
package org.openiaml.model.tests.codegen.model0_4;

import java.util.Date;

import org.eclipse.core.resources.IFile;
import org.openiaml.model.tests.CodegenTestCase;

/**
* SetWires operating on a remote object.
*
* @implementation SetWire
* If a {@model InputTextField} is connected to another with
* a {@model SetWire} on a different page, changes in the source
* InputTextField will update the target InputTextField.
*
* @author jmwright
*
*/
public class SetWireRemote extends CodegenTestCase {

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

/**
* Check the initial state of the application.
*
* @throws Exception
*/
public void testInitial() throws Exception {
IFile sitemap = beginAtSitemapThenPage("Home");
String source = getLabelIDForText("source");
assertLabeledFieldEquals(source, "");

gotoSitemapThenPage(sitemap, "page2");
String target = getLabelIDForText("target");
assertLabeledFieldEquals(target, "");
}

/**
* Test that setting 'source' will set 'target'.
*/
public void testSetSourceTarget() throws Exception {
IFile sitemap = beginAtSitemapThenPage("Home");

String test1 = "test1 " + new Date();
String source = getLabelIDForText("source");
assertLabeledFieldEquals(source, "");
setLabeledFormElementField(source, test1);

gotoSitemapThenPage(sitemap, "page2");
String target = getLabelIDForText("target");
assertLabeledFieldEquals(target, test1);
}

/**
* Test that setting 'target' will not set 'source'.
*/
public void testSetTargetNotSource() throws Exception {
IFile sitemap = beginAtSitemapThenPage("page2");

String test1 = "test1 " + new Date();
String target = getLabelIDForText("target");
assertLabeledFieldEquals(target, "");
setLabeledFormElementField(target, test1);

gotoSitemapThenPage(sitemap, "Home");
String source = getLabelIDForText("source");
assertLabeledFieldEquals(source, "");
}

}

Change log

r1561 by soundasleep on Feb 22, 2010   Diff
replacing '@operational' modeldoc tag with
'@implementation'
fixing some broken '@link' javadoc tags,
which were causing problems with generated
modeldoc
modeldoc no longer displays Operational
Semantics unless there are some
Go to: 
Project members, sign in to write a code review

Older revisions

r1231 by soundasleep on Sep 30, 2009   Diff
adding operational semantics and
examples to most other model 0.4
codegen test cases
r992 by soundasleep on Aug 13, 2009   Diff
SetWire codegen tests now pass
adding inference test for SetWire
SetWire is now also a
WireEdgeDestination
r991 by soundasleep on Aug 12, 2009   Diff
adding failing SetWire test cases
All revisions of this file

File info

Size: 2097 bytes, 77 lines
Powered by Google Project Hosting