コード例 #1
0
 /** Setup - For each test reset the various fields and states */
 @Before
 public void setUp() {
   comparisonResult = UNDEFINED;
   pointToPointFlow1.setPointToPointFlowProfile(pointToPointFlowProfile1);
   pointToPointFlow2.setPointToPointFlowProfile(pointToPointFlowProfile2);
   fromModule1 = null;
   fromModule2 = null;
   toModule1 = null;
   toModule2 = null;
 }
コード例 #2
0
  /** Test the compare method with PointToPointFlows that have NULL Profiles */
  @Test
  public void testCompareWithNullProfiles() {
    // Setup
    this.setModules(new Module(), new Module(), new Module(), new Module());
    pointToPointFlowProfile1 = null;
    pointToPointFlowProfile2 = null;
    pointToPointFlow1.setPointToPointFlowProfile(pointToPointFlowProfile1);
    pointToPointFlow2.setPointToPointFlowProfile(pointToPointFlowProfile2);

    // Test
    comparisonResult = comparator.compare(pointToPointFlow1, pointToPointFlow2);

    // Verify
    Assert.assertEquals(0, comparisonResult);
  }