~rolandkrueger.info/roklib/1.0.0

« back to all changes in this revision

Viewing changes to core-lib/src/test/java/info/rolandkrueger/roklib/webapps/data/test/GenericPersistableObjectTest.java

  • Committer: Roland
  • Date: 2011-03-23 19:05:28 UTC
  • Revision ID: mail@rolandkrueger.info-20110323190528-96q5mbmvjvnm9vy6
- reorganized project structure
- added RoKlib-Demo project

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * $Id: GenericPersistableObjectTest.java 144 2010-03-23 05:45:52Z roland $
3
 
 * Copyright (C) 2007 Roland Krueger
4
 
 * Created on 27.01.2010
5
 
 *
6
 
 * Author: Roland Krueger (www.rolandkrueger.info)
7
 
 *
8
 
 * This file is part of RoKlib.
9
 
 *
10
 
 * This library is free software; you can redistribute it and/or
11
 
 * modify it under the terms of the GNU Lesser General Public License
12
 
 * as published by the Free Software Foundation; either version 2.1 of
13
 
 * the License, or (at your option) any later version.
14
 
 *
15
 
 * This library is distributed in the hope that it will be useful, but
16
 
 * WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18
 
 * Lesser General Public License for more details.
19
 
 *
20
 
 * You should have received a copy of the GNU Lesser General Public
21
 
 * License along with this library; if not, write to the Free Software
22
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23
 
 * USA
24
 
 */
25
 
package info.rolandkrueger.roklib.webapps.data.test;
26
 
 
27
 
import static org.junit.Assert.*;
28
 
import info.rolandkrueger.roklib.webapps.data.GenericPersistableObject;
29
 
 
30
 
import org.junit.Test;
31
 
 
32
 
public class GenericPersistableObjectTest
33
 
{
34
 
  @Test
35
 
  public void testSetID ()
36
 
  {
37
 
    GenericPersistableObject<Long> testObj = new GenericPersistableObject<Long> ();
38
 
    testObj.setKey (12345L);
39
 
    assertEquals (12345L, testObj.getKey ());
40
 
    Long id = new Long (23L);
41
 
    testObj.setKey (id);
42
 
    assertTrue (testObj.getKey () == id);
43
 
  }
44
 
}