Exemplo n.º 1
0
  /** @throws Exception */
  public void testBaseWill7() throws Exception {
    PreCheckParser parser = new PreCheckParser();

    Prerequisite prereq = parser.parse("CHECKBASE", "1,Will=7", false, false);

    assertEquals(
        "<prereq kind=\"checkbase\" key=\"Will\" operator=\"GTEQ\" operand=\"7\" >\n"
            + "</prereq>\n",
        prereq.toString());
  }
Exemplo n.º 2
0
  /** @throws Exception */
  public void testFort3() throws Exception {
    PreCheckParser parser = new PreCheckParser();

    Prerequisite prereq = parser.parse("CHECK", "1,Fortitude=3", false, false);

    assertEquals(
        "<prereq kind=\"check\" key=\"Fortitude\" operator=\"GTEQ\" operand=\"3\" >\n"
            + "</prereq>\n",
        prereq.toString());
  }
Exemplo n.º 3
0
  /** @throws Exception */
  public void testBaseFort4Will7() throws Exception {
    PreCheckParser parser = new PreCheckParser();

    Prerequisite prereq = parser.parse("CHECKBASE", "1,Fortitude=4,Will=7", false, false);

    assertEquals(
        "<prereq operator=\"GTEQ\" operand=\"1\" >\n"
            + "<prereq kind=\"checkbase\" count-multiples=\"true\" key=\"Fortitude\" operator=\"GTEQ\" operand=\"4\" >\n"
            + "</prereq>\n"
            + "<prereq kind=\"checkbase\" count-multiples=\"true\" key=\"Will\" operator=\"GTEQ\" operand=\"7\" >\n"
            + "</prereq>\n"
            + "</prereq>\n",
        prereq.toString());
  }