Ejemplo n.º 1
0
  @Test
  public void checkInputEmpty() {
    Object[] data = {""};
    ArrayList<String> choosenData = new ArrayList<String>();
    choosenData.add("Dummy");
    assertEquals(false, appManager.getBindingManager().checkInput(data, choosenData, true));

    Object[] data2 = {"Fritz"};
    assertEquals(true, appManager.getBindingManager().checkInput(data2, choosenData, true));
  }
Ejemplo n.º 2
0
 @Test
 public void checkInputChoose() {
   Object[] data = {"Heinz", "Klaus"};
   ArrayList<String> choosenData = new ArrayList<String>();
   choosenData.add("Dummy");
   assertEquals(true, appManager.getBindingManager().checkInput(data, choosenData, true));
 }
Ejemplo n.º 3
0
 @Test
 public void checkInputIllegal() {
   Object[] data = {"drop table kontakte;", "delete * from buchungszeilen;"};
   ArrayList<String> choosenData = new ArrayList<String>();
   choosenData.add("Dummy");
   assertEquals(false, appManager.getBindingManager().checkInput(data, choosenData, true));
 }
Ejemplo n.º 4
0
public class DataBindingTests {
  ApplicationManager appManager = ApplicationManager.getInstance();

  @Test
  public void checkInputEmpty() {
    Object[] data = {""};
    ArrayList<String> choosenData = new ArrayList<String>();
    choosenData.add("Dummy");
    assertEquals(false, appManager.getBindingManager().checkInput(data, choosenData, true));

    Object[] data2 = {"Fritz"};
    assertEquals(true, appManager.getBindingManager().checkInput(data2, choosenData, true));
  }

  @Test
  public void checkInputIllegal() {
    Object[] data = {"drop table kontakte;", "delete * from buchungszeilen;"};
    ArrayList<String> choosenData = new ArrayList<String>();
    choosenData.add("Dummy");
    assertEquals(false, appManager.getBindingManager().checkInput(data, choosenData, true));
  }

  @Test
  public void checkInputChoose() {
    Object[] data = {"Heinz", "Klaus"};
    ArrayList<String> choosenData = new ArrayList<String>();
    choosenData.add("Dummy");
    assertEquals(true, appManager.getBindingManager().checkInput(data, choosenData, true));
  }
}
Ejemplo n.º 5
0
  @BeforeClass
  public static void setUpBeforeClass() throws Exception {
    String[] args = {"config/app.properties"};

    ApplicationManager.getInstance().applicationStarted(args);
  }