Package es.udc.tfg.journals.model.journal

Examples of es.udc.tfg.journals.model.journal.Journal


  @Before
  public void setUp() throws DuplicateInstanceException {
    user = userService.registerUser("userPassword", new UserDetails("name",
        "lastName", "user@udc.es", "user"));

    journal = journalService.createJournal(new Journal(
        "experimental research", "exp res",
        "http://www.blackwellpublishing.com/journal.asp?ref=0145-6008",
        0, 0));

    journalService.createJournal(new Journal("experimental research 2",
        "exp res",
        "http://www.blackwellpublishing.com/journal.asp?ref=0145-6008",
        0, 0));
  }
View Full Code Here


  @Autowired
  private KeywordWeightJournalDao kwjDao;

  @Before
  public void setUp() throws Exception {
    journalService.createJournal(new Journal("", null, null, null, null));
    keywordService.createKeywordWeightJournal(new KeywordWeightJournal(
        new KeywordWeight(10, new Keyword("etiqueta")), journalService
            .findJournalByName("")));
  }
View Full Code Here

  public void testCreateKeywordWeightJournalAndFindKewyword()
      throws DuplicateInstanceException, InstanceNotFoundException {
    User user = userService.registerUser("userPassword", new UserDetails(
        "name", "lastName", "user@udc.es", "user"));

    Journal j = new Journal("journal test", "jo tes", "http://url.test",
        50, 20);
    journalService.createJournal(j);

    Keyword k = new Keyword("etiqueta test");
View Full Code Here

  @Test
  public void testFindJournalsByKeywords() throws DuplicateInstanceException {
    User user = userService.registerUser("userPassword", new UserDetails(
        "name", "lastName", "user@udc.es", "user"));

    Journal j1 = new Journal("journal test 1", "jo tes",
        "http://url.test1", 50, 20);
    Journal j2 = new Journal("journal test 2", "jo tes",
        "http://url.test2", 30, 60);
    journalService.createJournal(j1);
    journalService.createJournal(j2);

    Keyword k1 = new Keyword("etiqueta test comun");
View Full Code Here

  @Test
  public void testFindKeywordsByJournal() throws DuplicateInstanceException {
    User user = userService.registerUser("userPassword", new UserDetails(
        "name", "lastName", "user@udc.es", "user"));

    Journal j1 = new Journal("journal test 1", "jo tes",
        "http://url.test1", 50, 20);
    journalService.createJournal(j1);

    Keyword k1 = new Keyword("etiqueta test comun");
    Keyword k2 = new Keyword("etiqueta test 2 journal");

    KeywordWeight kw1 = new KeywordWeight(0, user, k1);
    KeywordWeight kw2 = new KeywordWeight(100, user, k2);
    KeywordWeight kw3 = new KeywordWeight(50, user, k1);

    KeywordWeightJournal kwj1 = new KeywordWeightJournal(kw1, j1);
    KeywordWeightJournal kwj2 = new KeywordWeightJournal(kw2, j1);
    KeywordWeightJournal kwj3 = new KeywordWeightJournal(kw3, j1);

    keywordService.createKeywordWeightJournal(kwj1);
    keywordService.createKeywordWeightJournal(kwj2);
    keywordService.createKeywordWeightJournal(kwj3);

    List<String> keywords = keywordService.findKeywordsByJournal(j1
        .getJournalId());
    assertEquals(2, keywords.size());

    assertTrue(keywords.contains(WordUtils.capitalize(k1.getName())));
    assertTrue(keywords.contains(WordUtils.capitalize(k2.getName())));
View Full Code Here

  public void testCreateListOfKeywords() throws DuplicateInstanceException,
      InstanceNotFoundException {
    User user = userService.registerUser("userPassword", new UserDetails(
        "name", "lastName", "user@udc.es", "user"));

    Journal j1 = new Journal("journal test 1", "jo tes",
        "http://url.test1", 50, 20);
    journalService.createJournal(j1);

    String[] keys = "medicine, real time, left ventricular ".split(",");

    keywordService.createListOfKeywords(keys, user.getUserId(),
        j1.getJournalId(), 1);

  }
View Full Code Here

  @Autowired
  private JournalDao journalDao;

  @Before
  public void setUp() throws Exception {
    journalService.createJournal(new Journal("", null, null, null, null));
  }
View Full Code Here

  @Test(expected = InstanceNotFoundException.class)
  public void testCreateJournalAndFindJournalAndDeleteJournal()
      throws DuplicateInstanceException, InstanceNotFoundException {

    Journal journal = journalService.createJournal(new Journal(
        "experimental research", "exp res",
        "http://www.blackwellpublishing.com/journal.asp?ref=0145-6008",
        0, 0));

    Journal journal2 = journalService.findJournal(journal.getJournalId());

    /* Check data. */
    assertEquals(journal, journal2);

    journalService.deleteJournal(journal2.getJournalId());

    journalService.findJournal(journal2.getJournalId());
  }
View Full Code Here

    journalService.findJournal(journal2.getJournalId());
  }

  @Test(expected = DuplicateInstanceException.class)
  public void testCreateExistingJournal() throws DuplicateInstanceException {
    journalService.createJournal(new Journal("experimental research",
        "exp res",
        "http://www.blackwellpublishing.com/journal.asp?ref=0145-6008",
        0, 0));

    journalService
        .createJournal(new Journal(
            "experimental research",
            "exp res *2",
            "http://www.blackwellpublishing.com/journal.asp?ref=0145-6008___2",
            0, 0));
  }
View Full Code Here

            0, 0));
  }

  @Test
  public void testFindAllJournals() throws DuplicateInstanceException {
    journalService.createJournal(new Journal("experimental research",
        "exp res",
        "http://www.blackwellpublishing.com/journal.asp?ref=0145-6008",
        0, 0));
    journalService.createJournal(new Journal("arid zone research", null,
        "http://www.ceps.com.tw/ec/ecjnlintro.aspx?jnliid=1968", 0, 0));
    journalService.createJournal(new Journal(
        "critical reviews in food science and nutrition",
        "crit rev food sci nutr", null, 0, 0));

    List<Journal> journals = journalDao.findAll();
View Full Code Here

TOP

Related Classes of es.udc.tfg.journals.model.journal.Journal

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.