Package org.springframework.nanotrader.data.domain

Examples of org.springframework.nanotrader.data.domain.Accountprofile


  public void testfindAccountProfile() {
    Account account = accountDataOnDemand.getRandomAccount();
    entityManager.clear(); // force reload
   
    account = accountRepository.findOne(account.getAccountid());
    Accountprofile profile = tradingService.findAccountProfile(account.getProfileProfileid().getProfileid());
    assertEquals(account.getProfileProfileid().toString(), profile.toString());
    assertTrue(profile.getAccounts().contains(account));
  }
View Full Code Here


    assertTrue(profile.getAccounts().contains(account));
  }

  @Test
  public void testsaveNewAccountProfile() {
    Accountprofile profile = accountprofileDataOnDemand.getNewTransientAccountprofile(100);
    Account account = accountDataOnDemand.getNewTransientAccount(100);
    profile.setAccounts(Collections.singleton(account));
    tradingService.saveAccountProfile(profile);
    entityManager.flush();
    entityManager.clear(); // force reload

    Accountprofile newProfile = tradingService.findAccountProfile(profile.getProfileid());
    account = newProfile.getAccounts().iterator().next();
    assertEquals(account.getProfileProfileid().toString(), newProfile.toString());
  }
View Full Code Here

  }

  @Test
  public void testUpdateAccountProfile() {
    Account account = accountDataOnDemand.getRandomAccount();
    Accountprofile profile = account.getProfileProfileid();
    profile.setAddress("changed");
    tradingService.updateAccountProfile(profile, profile.getUserid() );
    entityManager.flush();
    entityManager.clear(); // force reload

    Accountprofile newProfile = tradingService.findAccountProfile(profile.getProfileid());
    assertEquals(profile.toString(), newProfile.toString());
  }
View Full Code Here

TOP

Related Classes of org.springframework.nanotrader.data.domain.Accountprofile

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.