Package org.growersnation.site.service.mongo

Examples of org.growersnation.site.service.mongo.DefaultSoilDataService


  @Test
  public void createSoilData_oneValidSoilData() {

    // Given
    SoilDataRepository soilDataRepository = new MongoSoilDataRepository(db);
    DefaultSoilDataService soilDataService = new DefaultSoilDataService(soilDataRepository);
    SoilDataReadService soilDataReadService = new MongoSoilDataReadService(db);

    SoilData soilData = SoilDataFaker.createValidSoilData();
    String objectId = soilDataService.save(soilData);

    // When
    long count = soilDataReadService.getNewestSoilDataCount();

    // Then
View Full Code Here


  @Test
  public void saveSoilData_oneValidSoilData() {

    // Given
    SoilDataRepository soilDataRepository = new MongoSoilDataRepository(db);
    DefaultSoilDataService soilDataService = new DefaultSoilDataService(soilDataRepository);
    SoilDataReadService soilDataReadService = new MongoSoilDataReadService(db);

    SoilData soilData = SoilDataFaker.createValidSoilData();

    // When
    String createdObjectId = soilDataService.save(soilData);
    String updatedObjectId = soilDataService.save(soilData);
    long count = soilDataReadService.getNewestSoilDataCount();

    // Then
    assertThat(createdObjectId).isNotNull();
    assertThat(updatedObjectId).isNotNull();
View Full Code Here

TOP

Related Classes of org.growersnation.site.service.mongo.DefaultSoilDataService

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.