Ejemplo n.º 1
0
 public static void assertEquals(String xmlA, String xmlB) {
   ComparableNode aNode = createXmlEqualComparableNode(new StringReader(xmlA));
   ComparableNode bNode = createXmlEqualComparableNode(new StringReader(xmlB));
   if (!aNode.equals(bNode)) {
     AssertAdapter.assertEquals(prepareXmlString(xmlA), prepareXmlString(xmlB));
   }
 }
Ejemplo n.º 2
0
 /**
  * Sets the knob position as a percentage (0-100) of the available range.
  *
  * @param percentage an int between 0 and 100
  */
 public void setRelativePosition(int percentage) {
   if (percentage < 0 || percentage > 100) {
     AssertAdapter.fail("Value must be within [0..100]");
   }
   int max = jSlider.getMaximum();
   int min = jSlider.getMinimum();
   int value = min + (percentage * (max - min)) / 100;
   jSlider.setValue(value);
 }