Examples of create()


Examples of com.puppetlabs.geppetto.forge.v2.service.ReleaseService.create()

public class ReleaseTestCreate extends ForgeAPITestBase {
  @Test
  public void testCreate() throws IOException {
    ReleaseService service = getTestUserForge().createReleaseService();
    byte[] releaseFile = TestDataProvider.getTestData(TEST_GZIPPED_RELEASE);
    Release newRelease = service.create(
      TEST_USER, TEST_MODULE, "Some notes about this release", new ByteArrayInputStream(releaseFile),
      releaseFile.length);
    assertNotNull("Null Release", newRelease);
    assertEquals("Incorrect release version", newRelease.getVersion(), TEST_RELEASE_VERSION);
  }

Examples of com.puppetlabs.xtext.dommodel.formatter.comments.ICommentContainerInformation.HashSLCommentContainer.create()

                xtextDocument.get(0, xtextDocument.getLength()), "\n", offsetOfNode - 1));

          CommentText commentText = commentProcessor.separateCommentFromContainer(
            issueString, mlContainer.create(posOnLine), "\n");
          TextFlow result = commentProcessor.formatComment(
            commentText, hashContainer.create(posOnLine), new CommentFormattingOptions(
              commentConfigurationProvider.get().getFormatterAdvice(CommentType.SingleLine),
              Integer.MAX_VALUE, 0, 1), formattingContextFactory.create(state, FormattingOption.Format));

          if(!endsWithBreak)
            result.appendBreak();

Examples of com.puppetlabs.xtext.dommodel.formatter.comments.ICommentContainerInformation.JavaLikeMLCommentContainer.create()

          int posOnLine = offsetOfNode -
              Math.max(0, 1 + CharSequences.lastIndexOf(
                xtextDocument.get(0, xtextDocument.getLength()), "\n", offsetOfNode - 1));

          CommentText commentText = commentProcessor.separateCommentFromContainer(
            issueString, mlContainer.create(posOnLine), "\n");
          TextFlow result = commentProcessor.formatComment(
            commentText, hashContainer.create(posOnLine), new CommentFormattingOptions(
              commentConfigurationProvider.get().getFormatterAdvice(CommentType.SingleLine),
              Integer.MAX_VALUE, 0, 1), formattingContextFactory.create(state, FormattingOption.Format));

Examples of com.rabbitmq.client.impl.FrameHandlerFactory.create()

            return conn;
        } else {
            IOException lastException = null;
            for (Address addr : addrs) {
                try {
                    FrameHandler handler = fhFactory.create(addr);
                    AMQConnection conn = new AMQConnection(params, handler);
                    conn.start();
                    return conn;
                } catch (IOException e) {
                    lastException = e;

Examples of com.rapidminer.example.table.DataRowFactory.create()

        DataRowFactory dataRowFactory = new DataRowFactory(DataRowFactory.TYPE_DOUBLE_ARRAY, '.');
        MemoryExampleTable memoryExampleTable = new MemoryExampleTable(attribute);

        for (Map.Entry<double[], String> entry : itemClassMap.entrySet()) {
            Double[] values = convertdoubleToDoubleArray(entry.getKey(), entry.getValue());
            DataRow rmRow = dataRowFactory.create(values, attribute);
            memoryExampleTable.addDataRow(rmRow);
        }

        ExampleSet newExampleSet = memoryExampleTable.createExampleSet();

Examples of com.rapleaf.jack.test_project.database_1.iface.ICommentPersistence.create()

    comments.deleteAll();
    Long userId = 1L;
    Long otherUserId = 2L;
    Comment c1 = comments.create("comment1", userId.intValue(), 1L, 0);
    Comment c2 = comments.create("comment2", userId.intValue(), 1L, 0);
    Comment c3 = comments.create("comment3", userId.intValue(), 1L, 0);
    Comment c4 = comments.create("comment4", otherUserId.intValue(), 1L, 0);
    Comment c5 = comments.create("comment5", 3, 1L, 0);

    Set<Long> commenterIds = new HashSet<Long>();
    commenterIds.add(userId);

Examples of com.rapleaf.jack.test_project.database_1.iface.IImagePersistence.create()

  public void testHasOne() throws Exception {
    IUserPersistence users = dbs.getDatabase1().users();
    User u1 = users.create("bryand", System.currentTimeMillis(), 5, System.currentTimeMillis() + 10, System.currentTimeMillis() + 20, "this is a relatively long string", new byte[]{5, 4, 3, 2, 1}, 1.2d, 3.4d, true);

    IImagePersistence images = dbs.getDatabase1().images();
    Image image = images.create((int)u1.getId());
    assertEquals(u1, image.getUser());
  }

  public void testHasMany() throws Exception {
    IUserPersistence users = dbs.getDatabase1().users();

Examples of com.rapleaf.jack.test_project.database_1.iface.IPostPersistence.create()

  public void testBelongsTo() throws Exception {
    IUserPersistence users = dbs.getDatabase1().users();
    User u1 = users.create("bryand", System.currentTimeMillis(), 5, System.currentTimeMillis() + 10, System.currentTimeMillis() + 20, "this is a relatively long string", new byte[]{5, 4, 3, 2, 1}, 1.2d, 3.4d, true);

    IPostPersistence posts = dbs.getDatabase1().posts();
    Post p1 = posts.create("title", System.currentTimeMillis(), (int)u1.getId(), 0l);
    assertEquals(u1, p1.getUser());
  }

  public void testHasOne() throws Exception {
    IUserPersistence users = dbs.getDatabase1().users();

Examples of com.rapleaf.jack.test_project.database_1.iface.IUserPersistence.create()

  }

  // this test is duplicated because of some weirdness with single quote escaping that appears contstrained to the mock mysql.
  public void testFindAllWithEscapedQuotesInStrings() throws Exception {
    IUserPersistence users = dbs.getDatabase1().users();
    User u1 = users.create("brya'nd", System.currentTimeMillis(), 5, System.currentTimeMillis() + 10, System.currentTimeMillis() + 20, "this is a relatively long string", new byte[]{5, 4, 3, 2, 1}, 1.2d, 3.4d, true);
    User u2 = users.create("thoma\"sk", null, 5, System.currentTimeMillis() + 10, System.currentTimeMillis() + 20, "this is a relatively long string", new byte[]{5, 4, 3, 2, 1}, 1.2d, 3.4d, true);

    assertEquals(Collections.singleton(u1), users.findAll("handle = 'brya\\'nd'"));
    assertEquals(Collections.singleton(u2), users.findAll("handle = 'thoma\"sk'"));
    assertEquals(Collections.singleton(u1), users.findAll("handle = 'brya\\'nd'"));

Examples of com.salesforce.ide.core.remote.ToolingStubExt.create()

            ToolingStubExt stub = factoryLocator.getToolingFactory().getToolingStubExt(project);

            MetadataContainer container = new MetadataContainer();
            container.setName(constructProjectIdentifier(project));
            SaveResult[] containerResults = stub.create(new SObject[] { container });

            if (containerResults[0].isSuccess()) {
                String containerId = containerResults[0].getId();
                SObject[] classMembers = createContainerMembers(containerId, list);
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.