Package org.springframework.data.elasticsearch.entities

Examples of org.springframework.data.elasticsearch.entities.Car


  @Test
  public void shouldMapJsonStringToObject() throws IOException {
    //Given

    //When
    Car result = entityMapper.mapToObject(JSON_STRING, Car.class);

    //Then
    assertThat(result.getName(), is(CAR_NAME));
    assertThat(result.getModel(), is(CAR_MODEL));
  }
View Full Code Here


    //Given
    GetResponse response = mock(GetResponse.class);
    when(response.getSourceAsString()).thenReturn(createJsonCar("Ford", "Grat"));

    //When
    Car result = resultMapper.mapResult(response, Car.class);

    //Then
    assertThat(result, notNullValue());
    assertThat(result.getModel(), is("Grat"));
    assertThat(result.getName(), is("Ford"));
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.elasticsearch.entities.Car

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.