Package org.springframework.data.repository.sample

Examples of org.springframework.data.repository.sample.Product


   */
  @Test
  public void findOneShouldDelegateToAppropriateRepository() {

    Mockito.reset(productRepository);
    Product product = new Product();
    when(productRepository.findOne(4711L)).thenReturn(product);

    assertThat(factory.getInvokerFor(Product.class).invokeFindOne(4711L), is((Object) product));
  }
View Full Code Here


    this.resource = mock(Resource.class);
  }

  @Test
  public void storesSingleObjectCorrectly() throws Exception {
    Product reference = new Product();
    setUpReferenceAndInititalize(reference);

    verify(productRepository).save(reference);
  }
View Full Code Here

  }

  @Test
  public void storesCollectionOfObjectsCorrectly() throws Exception {

    Product product = new Product();
    Collection<Product> reference = Collections.singletonList(product);

    setUpReferenceAndInititalize(reference);

    verify(productRepository, times(1)).save(product);
View Full Code Here

TOP

Related Classes of org.springframework.data.repository.sample.Product

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.