Examples of create()


Examples of com.jcabi.github.Releases.create()

     */
    @Test
    public void canFetchNonEmptyListOfReleases() throws Exception {
        final Releases releases = MkReleasesTest.repo().releases();
        final String tag = "v1.0";
        releases.create(tag);
        MatcherAssert.assertThat(
            // @checkstyle MultipleStringLiterals (1 line)
            releases.iterate().iterator().next().json().getString("tag_name"),
            Matchers.equalTo(tag)
        );

Examples of com.jcabi.github.Repos.create()

     * @throws Exception If some problem inside
     */
    @Test
    public void works() throws Exception {
        final Repos repos = new MkRepos(new MkStorage.InFile(), "jeff");
        final Repo repo = repos.create(
            Json.createObjectBuilder().add("name", "test").build()
        );
        MatcherAssert.assertThat(
            repo.coordinates(),
            Matchers.hasToString("jeff/test")

Examples of com.kurento.kmf.media.factory.MediaPipelineFactory.create()

  @Override
  public void onContentRequest(final HttpPlayerSession session)
      throws Exception {
    MediaPipelineFactory mpf = session.getMediaPipelineFactory();
    MediaPipeline mp = mpf.create();
    session.releaseOnTerminate(mp);

    PlayerEndpoint playerEndpoint = mp.newPlayerEndpoint(

    VideoURLs.map.get("zbar")).build();

Examples of com.linkedin.restli.examples.greetings.client.AnnotatedComplexKeysBuilders.create()

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestOptionsDataProvider")
  public void testPromiseCreate(RestliRequestOptions requestOptions) throws RemoteInvocationException
  {
    final AnnotatedComplexKeysBuilders builders = new AnnotatedComplexKeysBuilders(requestOptions);
    testCreateMainOldBuilders(builders.create(), builders.get());
  }

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestOptionsDataProvider")
  public void testPromiseCreateId(RestliRequestOptions requestOptions) throws RemoteInvocationException
  {

Examples of com.linkedin.restli.examples.greetings.client.AnnotatedComplexKeysRequestBuilders.create()

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestOptionsDataProvider")
  public void testPromiseCreateId(RestliRequestOptions requestOptions) throws RemoteInvocationException
  {
    final AnnotatedComplexKeysRequestBuilders builders = new AnnotatedComplexKeysRequestBuilders(requestOptions);
    testCreateMainNewBuilders(builders.create(), builders.get());
  }

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestOptionsDataProvider")
  public void testBatchCreate(RestliRequestOptions requestOptions) throws RemoteInvocationException
  {

Examples of com.linkedin.restli.examples.greetings.client.ComplexKeysBuilders.create()

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestOptionsDataProvider")
  public void testCreate(RestliRequestOptions requestOptions) throws RemoteInvocationException
  {
    final ComplexKeysBuilders builders = new ComplexKeysBuilders(requestOptions);
    testCreateMainOldBuilders(builders.create(), builders.get());
  }

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestOptionsDataProvider")
  public void testCreateId(RestliRequestOptions requestOptions) throws RemoteInvocationException
  {

Examples of com.linkedin.restli.examples.greetings.client.ComplexKeysRequestBuilders.create()

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestOptionsDataProvider")
  public void testCreateId(RestliRequestOptions requestOptions) throws RemoteInvocationException
  {
    final ComplexKeysRequestBuilders builders = new ComplexKeysRequestBuilders(requestOptions);
    testCreateMainNewBuilders(builders.create(), builders.get());
  }

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestOptionsDataProvider")
  public void testPromiseCreate(RestliRequestOptions requestOptions) throws RemoteInvocationException
  {

Examples of com.linkedin.restli.examples.greetings.client.GreetingsBuilders.create()

    greeting.setMessage("Hello there!");
    greeting.setTone(Tone.FRIENDLY);

    final GreetingsBuilders builders = new GreetingsBuilders(requestOptions);

    Request<EmptyRecord> createRequest = builders.create().input(greeting).build();
    Response<EmptyRecord> response = restClient.sendRequest(createRequest).getResponse();
    Assert.assertNull(response.getHeader(RestConstants.HEADER_CONTENT_TYPE));
    @SuppressWarnings("unchecked")
    CreateResponse<Long> createResponse = (CreateResponse<Long>)response.getEntity();
    long id = createResponse.getId();

Examples of com.linkedin.restli.examples.greetings.client.GreetingsRequestBuilders.create()

    greeting.setMessage("Hello there!");
    greeting.setTone(Tone.FRIENDLY);

    final GreetingsRequestBuilders builders = new GreetingsRequestBuilders(requestOptions);

    CreateIdRequest<Long, Greeting> createRequest = builders.create().input(greeting).build();
    Response<IdResponse<Long>> response = restClient.sendRequest(createRequest).getResponse();
    Assert.assertNull(response.getHeader(RestConstants.HEADER_CONTENT_TYPE));
    @SuppressWarnings("unchecked")
    long id = response.getEntity().getId();
    @SuppressWarnings("deprecation")

Examples of com.linkedin.restli.examples.greetings.client.SubgreetingsBuilders.create()

    greeting.setTone(Tone.FRIENDLY);

    final SubgreetingsBuilders builders = new SubgreetingsBuilders(requestOptions);

    //POST
    Request<EmptyRecord> createRequest = builders.create().input(greeting).build();
    Response<EmptyRecord> response = REST_CLIENT.sendRequest(createRequest).getResponse();
    Assert.assertNull(response.getHeader(RestConstants.HEADER_CONTENT_TYPE));
    @SuppressWarnings("unchecked")
    CreateResponse<Long> createResponse = (CreateResponse<Long>)response.getEntity();
    long id = createResponse.getId();
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.