Examples of Simple


Examples of com.asakusafw.compiler.windgate.testing.model.Simple

        assertThat(exporterPath, is(notNullValue()));
        Location exporterLocation = Location.fromPath(exporterPath, '/');
        assertThat(exporterLocation.isPrefix(), is(true));

        ModelOutput<Simple> source = tester.openOutput(Simple.class, importerLocation);
        Simple model = new Simple();
        model.setValueAsString("Hello1, world!");
        source.write(model);
        model.setValueAsString("Hello2, world!");
        source.write(model);
        model.setValueAsString("Hello3, world!");
        source.write(model);
        source.close();

        assertThat(tester.runStages(info), is(true));
View Full Code Here

Examples of com.asakusafw.testdriver.excel.Simple

        file.delete();

        DifferenceSinkFactory factory = repo.getDifferenceSinkFactory(file.toURI());
        DifferenceSink sink = factory.createSink(SIMPLE, new TestContext.Empty());
        try {
            Simple expected = new Simple();
            expected.text = "expected";
            Simple actual = new Simple();
            actual.text = "actual";
            sink.put(new Difference(
                    SIMPLE.toReflection(expected),
                    SIMPLE.toReflection(actual),
                    "testing"));
View Full Code Here

Examples of com.asakusafw.testdriver.testing.model.Simple

    private void put(BatchInfo info, String name, String... values) {
        try {
            Import importer = tester.getImporter(info, name);
            ModelOutput<Simple> output = tester.openOutput(Simple.class, importer);
            try {
                Simple model = new Simple();
                for (String value : values) {
                    model.setValueAsString(value);
                    output.write(model);
                }
            } finally {
                output.close();
            }
View Full Code Here

Examples of com.bansheeproject.builder.entity.test.Simple

 
  @Test
  public void sanityTest() {
   
    Parser parser = new Parser();
    Simple simple = new Simple();
   
   
   
    simple.stringValue = "stringValueContent";
   
View Full Code Here

Examples of com.chenlb.mmseg4j.example.Simple

public class SimpleSegTest extends TestCase {

  Simple segW;
  protected void setUp() throws Exception {
    segW = new Simple();
  }
View Full Code Here

Examples of com.claymus.site.module.page.layouts.Simple

          : module.getPageContents(str.split("/"), user);

      if(contentsData.size() == 0)
        contentsData.add(new Error404());

      PageLayout pageLayout = new Simple();

      List<Content> contentList = new LinkedList<Content>();
      for(ContentType contentData : contentsData)
        contentList.add(new Content(contentData, 0, pageLayout.getDefaultLocation()));

      page = new Page(uri, contentList.get(0).getName(), pageLayout);

      contents = new LinkedList<List<Content>>();
      contents.add(contentList);

    } else if((page = PageData.getPage(uri)) != null) { // User pages
      PageLayout pageLayout = page.getLayout();
      contents = new LinkedList<List<Content>>();
      for(String[] location : pageLayout.getLocations())
        contents.add(ContentData.getContents(page.getId(), location[1], userRoleKey));

    } else { // Error Pages
      PageLayout pageLayout = new Simple();

      Content content = new Content(new Error404(), 0, pageLayout.getDefaultLocation());
      List<Content> contentList = new LinkedList<Content>();
      contentList.add(content);

      page = new Page(uri, content.getName(), pageLayout);
View Full Code Here

Examples of org.apache.avro.test.Simple

  @Test(expected = Exception.class)
  public void testConnectionRefusedOneWay() throws IOException {
    Transceiver client = new HttpTransceiver(new URL("http://localhost:4444"));
    SpecificRequestor req = new SpecificRequestor(Simple.class, client);
    addRpcPlugins(req);
    Simple proxy = SpecificRequestor.getClient(Simple.class, (SpecificRequestor)req);
    proxy.ack();
  }
View Full Code Here

Examples of org.apache.deltaspike.data.test.domain.Simple

        return createSimple(name, null);
    }

    public Simple createSimple(String name, Integer counter)
    {
        Simple result = new Simple(name);
        result.setCounter(counter);
        entityManager.persist(result);
        entityManager.flush();
        return result;
    }
View Full Code Here

Examples of org.hibernate.test.legacy.Simple

    Iterator iter = s.createQuery( "select max(s.count) from Simple s" ).iterate();

    if ( getDialect() instanceof MySQLDialect ) assertTrue( iter.hasNext() && iter.next()==null );

    Simple simple = new Simple();
    simple.setName("Simple Dialect Function Test");
    simple.setAddress("Simple Address");
    simple.setPay(new Float(45.8));
    simple.setCount(2);
    s.save(simple, new Long(10) );

    // Test to make sure allocating an specified object operates correctly.
    assertTrue(
        s.createQuery( "select new org.hibernate.test.legacy.S(s.count, s.address) from Simple s" ).list().size() == 1
    );

    // Quick check the base dialect functions operate correctly
    assertTrue(
        s.createQuery( "select max(s.count) from Simple s" ).list().size() == 1
    );
    assertTrue(
        s.createQuery( "select count(*) from Simple s" ).list().size() == 1
    );

    if ( getDialect() instanceof Cache71Dialect) {
      // Check Oracle Dialect mix of dialect functions - no args (no parenthesis and single arg functions
      List rset = s.createQuery( "select s.name, sysdate, floor(s.pay), round(s.pay,0) from Simple s" ).list();
      assertNotNull("Name string should have been returned",(((Object[])rset.get(0))[0]));
      assertNotNull("Todays Date should have been returned",(((Object[])rset.get(0))[1]));
      assertEquals("floor(45.8) result was incorrect ", new Integer(45), ( (Object[]) rset.get(0) )[2] );
      assertEquals("round(45.8) result was incorrect ", new Float(46), ( (Object[]) rset.get(0) )[3] );

      simple.setPay(new Float(-45.8));
      s.update(simple);

      // Test type conversions while using nested functions (Float to Int).
      rset = s.createQuery( "select abs(round(s.pay,0)) from Simple s" ).list();
      assertEquals("abs(round(-45.8)) result was incorrect ", new Float(46), rset.get(0));

      // Test a larger depth 3 function example - Not a useful combo other than for testing
      assertTrue(
          s.createQuery( "select floor(round(sysdate,1)) from Simple s" ).list().size() == 1
      );

      // Test the oracle standard NVL funtion as a test of multi-param functions...
      simple.setPay(null);
      s.update(simple);
      Double value = (Double) s.createQuery("select mod( nvl(s.pay, 5000), 2 ) from Simple as s where s.id = 10").list().get(0);
      assertTrue( 0 == value.intValue() );
    }

View Full Code Here

Examples of org.jboss.test.aop.simpleejb.Simple

      try
      {
         Object obj = ctx.lookup("ejb/test/Simple");
         SimpleHome home = (SimpleHome)
                 PortableRemoteObject.narrow(obj, SimpleHome.class);
         Simple test = home.create();
         assertEquals(SimpleBeanInterceptor.RETURN_VALUE, test.getTest());
      }
      finally
      {
         ctx.close();
      }
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.