PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Tests/YEDSubjectNodeTest.j

http://github.com/rheimbuch/YED
Unknown | 27 lines | 21 code | 6 blank | 0 comment | 0 complexity | 98768e89db2ab32e047cd228329de54e MD5 | raw file
 1@import "../YEDNode.j"
 2@import "../YEDSubjectNode.j"
 3@import "../YEDOperationNode.j"
 4
 5@implementation YEDSubjectNodeTest : OJTestCase
 6
 7- (void)testYEDSubjectNodeShouldNotConnectToAnotherYEDSubjectNode
 8{
 9    var node1 = [YEDSubjectNode node],
10        node2 = [YEDSubjectNode node];
11    
12    [self assertFalse:([node1 canConnectTo:node2])
13          message:"A subject node1 should not connect to another subject node2"];
14    
15    [self assertFalse:([node2 canConnectTo:node1])
16          message:"A subject node2 should not connect to another subject node1"];
17}
18
19- (void)testYEDSubjectNodeShouldConnectToAYEDOperationNode
20{
21    var node1 = [YEDSubjectNode node],
22        node2 = [YEDOperationNode node];
23    
24    [self assertTrue:([node1 canConnectTo:node2])
25          message:"A Subject node can connect to an operation node"];
26}
27@end