Package org.openengsb.core.ekb.persistence.query.edb.models.TestModel2

Examples of org.openengsb.core.ekb.persistence.query.edb.models.TestModel2.ENUM


     */
    Atom[] getWmState(Display display, Window win) {
  ArrayList<Atom> res = new ArrayList<Atom>();
  Window.PropertyReply rep = win.property(false, netWmState, Atom.ATOM,
    0, 5);
  Enum enm = rep.items();
  while (enm.more()) {
      Atom atom = (Atom) Atom.intern(display, enm.next_integer());
      res.add(atom);
      logger.fine("WM State: " + win + " " + atom);
  }
  if (res.size() > 0) {
      return res.toArray(new Atom[res.size()]);
View Full Code Here


  Atom res = null;
  Window.PropertyReply rep = win.property(false, windowTypes[0],
    Atom.ATOM, 0, 1);

  if (rep.length() == 1) {
      Enum enm = rep.items();
      res = (Atom) Atom.intern(display, enm.next_integer(), true);
  } else {
      /** if not set by application assume NORMAL TYPE */
      res = (Atom) Atom.intern(display, "_NET_WM_WINDOW_TYPE_NORMAL");
  }
  logger.fine("WM Type: " + win + " " + res);
View Full Code Here

 
    /**
     *
     */
    public Enum rectangles () {
      return new Enum (this, 32, rectangle_count ()) {
        @Override
        public Object next () {
          int x = this.read2 (0);
          int y = this.read2 (2);
          int width = this.read2 (4);
View Full Code Here

        assertThat(model.getEnumeration(), is(ENUM.A));
    }

    @Test
    public void testGetModelWithImplementedClass_shouldWork() throws Exception {
        TestModel2 model = service.getModel(TestModel2.class, "testoidimpl");

        assertThat(model.getName(), is("testname"));
        assertThat(model.getId(), is("testid"));
        assertThat(model.getDate(), instanceOf(Date.class));
        assertThat(model.getEnumeration(), is(ENUM.A));
    }
View Full Code Here

        assertThat(model.getEnumeration(), is(ENUM.A));
    }

    @Test
    public void testListAsParameterWithImplementedClass_shouldWork() throws Exception {
        TestModel2 model = service.getModel(TestModel2.class, "testoidimpl");
        List<String> testList = model.getList();
        assertThat(testList.size(), is(3));
        assertThat(testList.get(0), is("blub"));
        assertThat(testList.get(1), is("blab"));
        assertThat(testList.get(2), is("blob"));

        List<String> temp = new ArrayList<String>();
        temp.add("test1");
        temp.add("test2");
        temp.add("test3");
        model.setList(temp);
        testList = model.getList();
       
        assertThat(testList.size(), is(3));
        assertThat(testList.get(0), is("test1"));
        assertThat(testList.get(1), is("test2"));
        assertThat(testList.get(2), is("test3"));
View Full Code Here

        assertThat(testList.get(2), is("test3"));
    }

    @Test
    public void testComplexAsParameterWithImplementedClass_shouldWork() throws Exception {
        TestModel2 model = service.getModel(TestModel2.class, "testoidimpl");
        SubModel sub = model.getSub();
        assertThat(sub.getId(), is("testid"));
        assertThat(sub.getValue(), is("testvalue"));

        sub.setId("blabla");
        sub.setValue("blublub");
View Full Code Here

        assertThat(sub.getValue(), is("blublub"));
    }

    @Test
    public void testListOfComplexAsParameterWithImplementedClass_shouldWork() throws Exception {
        TestModel2 model = service.getModel(TestModel2.class, "testoidimpl");

        List<SubModel> sub = model.getSubs();
        assertThat(sub.get(0).getId(), is("AAAAA"));
        assertThat(sub.get(0).getValue(), is("BBBBB"));
        assertThat(sub.get(1).getId(), is("CCCCC"));
        assertThat(sub.get(1).getValue(), is("DDDDD"));
    }
View Full Code Here

        assertThat(sub.getValue(), is("blublub"));
    }

    @Test
    public void testInteractionWithEnumValuesWithRealImplementation_shouldWork() throws Exception {
        TestModel2 model = service.getModel(TestModel2.class, "testoidimpl");

        ENUM temp = model.getEnumeration();
        model.setEnumeration(ENUM.B);
        assertThat(temp, is(ENUM.A));
        assertThat(model.getEnumeration(), is(ENUM.B));
    }
View Full Code Here

    @Test
    public void testInteractionWithEnumValuesWithRealImplementation_shouldWork() throws Exception {
        TestModel2 model = service.getModel(TestModel2.class, "testoidimpl");

        ENUM temp = model.getEnumeration();
        model.setEnumeration(ENUM.B);
        assertThat(temp, is(ENUM.A));
        assertThat(model.getEnumeration(), is(ENUM.B));
    }
View Full Code Here

    @Test
    public void testInteractionWithEnumValuesWithProxiedInterface_shouldWork() throws Exception {
        TestModel model = service.getModel(TestModel.class, "testoid");

        ENUM temp = model.getEnumeration();
        model.setEnumeration(ENUM.B);
        assertThat(temp, is(ENUM.A));
        assertThat(model.getEnumeration(), is(ENUM.B));
    }
View Full Code Here

TOP

Related Classes of org.openengsb.core.ekb.persistence.query.edb.models.TestModel2.ENUM

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.