Examples of Base


Examples of org.nutz.dao.test.meta.Base

  @Override
  protected void after() {}

  @Test
  public void fetch_links() {
    Base b = dao.fetchLinks(dao.fetch(Base.class, "red"), "country");
    assertEquals("China", b.getCountry().getName());
  }
View Full Code Here

Examples of org.nutz.dao.test.meta.Base

    assertEquals("China", b.getCountry().getName());
  }

  @Test
  public void delete_links() {
    Base b = dao.fetchLinks(dao.fetch(Base.class, "red"), "country");
    dao.deleteLinks(b, "country");
    assertEquals(1, dao.count(Country.class));
  }
View Full Code Here

Examples of org.nutz.dao.test.meta.Base

    assertEquals(1, dao.count(Country.class));
  }

  @Test
  public void delete_with() {
    Base b = dao.fetchLinks(dao.fetch(Base.class, "red"), "country");
    dao.deleteWith(b, "country");
    assertEquals(1, dao.count(Country.class));
    assertEquals(1, dao.count(Base.class));
  }
View Full Code Here

Examples of org.nutz.dao.test.meta.Base

    assertEquals(1, dao.count(Base.class));
  }

  @Test
  public void clear_links() {
    Base b = dao.fetch(Base.class, "red");
    dao.clearLinks(b, "country");
    assertEquals(1, dao.count(Country.class));
  }
View Full Code Here

Examples of org.nutz.dao.test.meta.Base

    assertEquals(1, dao.count(Country.class));
  }

  @Test
  public void update_links() {
    Base b = dao.fetchLinks(dao.fetch(Base.class, "red"), "country");
    int lv = b.getLevel();
    b.setLevel(45);
    b.getCountry().setName("ABC");
    dao.updateLinks(b, "country");
    b = dao.fetch(Base.class, "red");
    assertEquals(lv, b.getLevel());
    Country c = dao.fetch(Country.class, b.getCountryId());
    assertEquals("ABC", c.getName());
  }
View Full Code Here

Examples of org.nutz.dao.test.meta.Base

    assertEquals("ABC", c.getName());
  }

  @Test
  public void update_with() {
    Base b = dao.fetchLinks(dao.fetch(Base.class, "red"), "country");
    b.setLevel(6);
    b.getCountry().setName("ABC");
    dao.updateWith(b, "country");
    b = dao.fetch(Base.class, b.getName());
    assertEquals(6, b.getLevel());
    Country c = dao.fetch(Country.class, b.getCountryId());
    assertEquals("ABC", c.getName());
  }
View Full Code Here

Examples of org.nutz.dao.test.meta.Base

public class LinksGeneralTest extends DaoCase {

  @Test
  public void fetch_all_links() {
    pojos.initData();
    Base b = dao.fetchLinks(dao.fetch(Base.class, "red"), null);
    assertEquals("red", b.getName());
    assertEquals("China", b.getCountry().getName());
    assertEquals(6, b.getFighters().size());
    assertEquals(3, b.getPlatoons().size());
  }
View Full Code Here

Examples of org.nutz.dao.test.meta.Base

  @Test
  public void insert_links_with_exception() {
    try {
      pojos.init();
      Base b = Base.make("Red");
      dao.insert(b);
      b.setCountry(Country.make(Strings.dup('C', 52)));
      dao.insertLinks(b, "country");
      fail();
    }
    catch (Exception e) {
      assertTrue(true);
View Full Code Here

Examples of scalaSci.math.plot.plotObjects.Base

    addMouseWheelListener(this);
}

public abstract void initDrawer();
public void initBasenGrid(double[] min, double[] max, String[] axesScales, String[] axesLabels) {
    base = new Base(min, max, axesScales);
    grid = new BasePlot(base, axesLabels);
}
View Full Code Here

Examples of scalaSci.math.plot.plotObjects.Base

    addMouseWheelListener(this);
}

public abstract void initDrawer();
public void initBasenGrid(double[] min, double[] max, String[] axesScales, String[] axesLabels) {
    base = new Base(min, max, axesScales);
    grid = new BasePlot(base, axesLabels);
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.