Project

General

Profile

« Previous | Next » 

Revision 45978

View differences:

UserActionsTest.java
49 49
        user.setEmail("pkanakakis@di.uoa.gr");
50 50
        user.setPassword(DigestUtils.md5DigestAsHex( "1q2w3e4r".getBytes(Charset.forName("UTF-8"))));
51 51

  
52
        AffiliationPK afk = new AffiliationPK();
53
        afk.setUser(user);
54
        afk.setOrganization(org);
52

  
55 53
        Affiliation af = new Affiliation();
56
        af.setPk(afk);
57

  
54
        af.setOrganization(org);
58 55
        user.addUserAffiliation(af);
59 56

  
60 57
        try {
......
80 77
    @Transactional
81 78
    @Rollback(true)
82 79
    public void createPublicationAffiliation() {
83
        Organization org = new Organization();
80
       /* Organization org = new Organization();
84 81
        org.setId("1");
85 82
        try {
86 83
            om.saveOrganization(org);
......
90 87

  
91 88
        User user = new User();
92 89
        user.setEmail("pkanakakis@di.uoa.gr");
93
        user.setPassword(DigestUtils.md5DigestAsHex( "1q2w3e4r".getBytes(Charset.forName("UTF-8"))));
90
        user.setDepartment(DigestUtils.md5DigestAsHex( "1q2w3e4r".getBytes(Charset.forName("UTF-8"))));
94 91

  
95
        AffiliationPK afk = new AffiliationPK();
96
        afk.setUser(user);
97
        afk.setOrganization(org);
92

  
98 93
        Affiliation af = new Affiliation();
99
        af.setPk(afk);
94
        af.setOrganization(org);
100 95

  
101 96
        user.addUserAffiliation(af);
102 97

  
......
119 114
        List<Affiliation> afs = u.getAffiliations();
120 115
        for(Affiliation a: afs)
121 116
            assertEquals(a.getPublications().get(0).getId(),p.getId());
117
*/
122 118

  
123

  
124 119
    }
125 120

  
126 121
}

Also available in: Unified diff