示例#1
0
  public static void assertEquals(ECReportSpec[] expected, ECReportSpec[] actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected.length, actual.length);
    for (ECReportSpec expectedReportSpec : expected) {
      boolean contains = false;
      for (ECReportSpec actualReportSpec : actual) {
        try {
          assertEquals(expectedReportSpec, actualReportSpec);
        } catch (Error e) {
          continue;
        }
        contains = true;
      }
      if (!contains) {
        throw new AssertionFailedError();
      }
    }
  }
示例#2
0
  public static void assertEquals(ECReport expected, ECReport actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected.getReportName(), actual.getReportName());
    assertEquals(expected.getAny(), actual.getAny());
    assertEquals(expected.getExtension(), actual.getExtension());

    List<ECReportGroup> expectedGroups = expected.getGroup();
    List<ECReportGroup> actualGroups = actual.getGroup();

    assertEquals(expectedGroups.size(), actualGroups.size());

    for (ECReportGroup expectedGroup : expectedGroups) {
      boolean contains = false;
      for (ECReportGroup actualGroup : actualGroups) {
        try {
          assertEquals(expectedGroup, actualGroup);
        } catch (Error e) {
          continue;
        }
        contains = true;
      }
      if (!contains) {
        throw new AssertionFailedError();
      }
    }
  }
示例#3
0
  public static void assertEquals(ECReportGroupList expected, ECReportGroupList actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected.getAny(), actual.getAny());
    assertEquals(expected.getExtension(), actual.getExtension());

    List<ECReportGroupListMember> expectedMembers = expected.getMember();
    List<ECReportGroupListMember> actualMembers = actual.getMember();

    assertEquals(expectedMembers.size(), actualMembers.size());

    for (ECReportGroupListMember expectedMember : expectedMembers) {
      boolean contains = false;
      for (ECReportGroupListMember actualMember : actualMembers) {
        try {
          assertEquals(expectedMember, actualMember);
        } catch (Error e) {
          continue;
        }
        contains = true;
      }
      if (!contains) {
        throw new AssertionFailedError();
      }
    }
  }
示例#4
0
  public static void assertEqualsReports(List<ECReport> expected, List<ECReport> actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected.size(), actual.size());
    for (ECReport expectedReport : expected) {
      boolean contains = false;
      for (ECReport actualReport : actual) {
        try {
          assertEquals(expectedReport, actualReport);
        } catch (Error e) {
          continue;
        }
        contains = true;
      }
      if (!contains) {
        throw new AssertionFailedError();
      }
    }
  }
示例#5
0
  public static void assertEqualsString(List<String> expected, List<String> actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected.size(), actual.size());
    for (String expectedString : expected) {
      boolean contains = false;
      for (String actualString : actual) {
        try {
          assertEquals(expectedString, actualString);
        } catch (Error e) {
          continue;
        }
        contains = true;
      }
      if (!contains) {
        throw new AssertionFailedError();
      }
    }
  }
示例#6
0
  public static void assertEquals(ECTime expected, ECTime actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected.getValue(), actual.getValue());
    assertEquals(expected.getUnit(), actual.getUnit());
  }
示例#7
0
  public static void assertEquals(ECReportGroupCount expected, ECReportGroupCount actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected.getAny(), actual.getAny());
    assertEquals(expected.getCount(), actual.getCount());
    assertEquals(expected.getExtension(), actual.getExtension());
  }
示例#8
0
  public static void assertEquals(ECFilterSpec expected, ECFilterSpec actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected.getExcludePatterns(), actual.getExcludePatterns());
    assertEquals(expected.getIncludePatterns(), actual.getIncludePatterns());
    assertEquals(expected.getAny(), actual.getAny());
    assertEquals(expected.getExtension(), actual.getExtension());
  }
示例#9
0
  public static void assertEquals(ECReports expected, ECReports actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected.getALEID(), actual.getALEID());
    assertEquals(expected.getSchemaURL(), actual.getSchemaURL());
    assertEquals(expected.getSpecName(), actual.getSpecName());
    assertEquals(expected.getAny(), actual.getAny());
    assertEquals(expected.getDate(), actual.getDate());
    assertEquals(expected.getECSpec(), actual.getECSpec());
    assertEquals(expected.getExtension(), actual.getExtension());
    assertEquals(expected.getReports().getReport(), actual.getReports().getReport());
    assertEquals(expected.getTerminationCondition(), actual.getTerminationCondition());
    assertEquals(expected.getTotalMilliseconds(), actual.getTotalMilliseconds());
  }
示例#10
0
  public static void assertEquals(ECReportSetSpec expected, ECReportSetSpec actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected.getSet(), actual.getSet());
  }
示例#11
0
  public static void assertEquals(String expected, String actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected, actual);
  }
示例#12
0
  public static void assertEquals(ECTrigger expected, ECTrigger actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected.get_value(), actual.get_value());
  }
示例#13
0
  public static void assertEquals(ECReportOutputSpec expected, ECReportOutputSpec actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected.isIncludeCount(), actual.isIncludeCount());
    assertEquals(expected.isIncludeEPC(), actual.isIncludeEPC());
    assertEquals(expected.isIncludeRawDecimal(), actual.isIncludeRawDecimal());
    assertEquals(expected.isIncludeRawHex(), actual.isIncludeRawHex());
    assertEquals(expected.isIncludeTag(), actual.isIncludeTag());
    assertEquals(expected.getAny(), actual.getAny());
    assertEquals(expected.getExtension(), actual.getExtension());
  }
示例#14
0
  public static void assertEquals(ECReportSpec expected, ECReportSpec actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected.getGroupSpec(), actual.getGroupSpec());
    assertEquals(expected.getAny(), actual.getAny());
    assertEquals(expected.getExtension(), actual.getExtension());
    assertEquals(expected.getFilterSpec(), actual.getFilterSpec());
    assertEquals(expected.getOutput(), actual.getOutput());
    assertEquals(expected.getReportName(), actual.getReportName());
    assertEquals(expected.getReportSet(), actual.getReportSet());
  }
示例#15
0
  public static void assertEquals(ECBoundarySpec expected, ECBoundarySpec actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected.getAny(), actual.getAny());
    assertEquals(expected.getDuration(), actual.getDuration());
    assertEquals(expected.getExtension(), actual.getExtension());
    assertEquals(expected.getRepeatPeriod(), actual.getRepeatPeriod());
    assertEquals(expected.getStableSetInterval(), actual.getStableSetInterval());
    assertEquals(expected.getStartTrigger(), actual.getStartTrigger());
    assertEquals(expected.getStopTrigger(), actual.getStopTrigger());
  }
示例#16
0
  public static void assertEquals(ECSpec expected, ECSpec actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected.getAny(), actual.getAny());
    assertEquals(expected.getBoundarySpec(), actual.getBoundarySpec());
    assertEquals(expected.getCreationDate(), actual.getCreationDate());
    assertEquals(expected.getExtension(), actual.getExtension());
    assertEquals(expected.getLogicalReaders(), actual.getLogicalReaders());
    assertEquals(expected.getReportSpecs(), actual.getReportSpecs());
    assertEquals(expected.getSchemaVersion(), actual.getSchemaVersion());
  }
示例#17
0
  public static void assertEquals(
      ECReportGroupListMember expected, ECReportGroupListMember actual) {

    if (expected == null || actual == null) {
      if (expected == null && actual == null) {
        return;
      } else {
        throw new AssertionFailedError();
      }
    }
    assertEquals(expected.getEpc(), actual.getEpc());
    assertEquals(expected.getRawDecimal(), actual.getRawDecimal());
    assertEquals(expected.getRawHex(), actual.getRawHex());
    assertEquals(expected.getTag(), actual.getTag());
    assertEquals(expected.getAny(), actual.getAny());
    assertEquals(expected.getExtension(), actual.getExtension());
  }