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

import org.openiaml.model.tests.CodegenTestCase;

import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;

/**
* Tests a failing operation.
*
* @author jmwright
*
*/
public class FailingOperation extends CodegenTestCase {

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

/**
* @implementation ExecutionEdge,CancelNode An {@model ExecutionEdge operation flow} that goes to a {@model CancelNode failure node} will cause the operation to fail.
* @throws Exception
*/
public void testFailingOperation() throws Exception {
try {
beginAtSitemapThenPage("page");
fail("We should not be able to load page 'page'");
} catch (FailingHttpStatusCodeException e) {
// we should instantly have an exception occur
// expected
checkExceptionContains(e, "an expected failure message");

assertTextPresent("an expected failure message");
assertProblem();
}
}

}

Change log

r1592 by soundasleep on Feb 24, 2010   Diff
adding specific checks for exception
messages thrown
updating test model which was not updated
correctly
Go to: 
Project members, sign in to write a code review

Older revisions

r1584 by soundasleep on Feb 23, 2010   Diff
adding missing @Override annotations
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
...
r1221 by soundasleep on Sep 29, 2009   Diff
changing '@semantics' to '@inference'
and '@operational'
adding modeldoc for SplitNode and
JoinNode
All revisions of this file

File info

Size: 1086 bytes, 42 lines
Powered by Google Project Hosting