forked from google/jsaction
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnullactionflow_test.js
More file actions
36 lines (31 loc) · 803 Bytes
/
nullactionflow_test.js
File metadata and controls
36 lines (31 loc) · 803 Bytes
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
// Copyright 2012 Google Inc. All rights reserved.
/**
* @fileoverview Unit tests for NullActionFlow
*
* @author izaakr@google.com (Izaak Rubin)
*/
/** @suppress {extraProvide} */
goog.provide('jsaction.NullActionFlowTest');
goog.setTestOnly('jsaction.NullActionFlowTest');
goog.require('goog.testing.jsunit');
goog.require('jsaction.NullActionFlow');
function testBranchRaisesError() {
var errorOnBranch = false;
var nullFlow = new jsaction.NullActionFlow;
try {
nullFlow.branch('branch');
} catch (e) {
errorOnBranch = true;
}
assertTrue(errorOnBranch);
}
function testDoneRaisesError() {
var errorOnDone = false;
var nullFlow = new jsaction.NullActionFlow;
try {
nullFlow.done('branch');
} catch (e) {
errorOnDone = true;
}
assertTrue(errorOnDone);
}