2
* $Id: GenericPersistableObjectTest.java 144 2010-03-23 05:45:52Z roland $
3
* Copyright (C) 2007 Roland Krueger
4
* Created on 27.01.2010
6
* Author: Roland Krueger (www.rolandkrueger.info)
8
* This file is part of RoKlib.
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.
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.
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
25
package info.rolandkrueger.roklib.webapps.data.test;
27
import static org.junit.Assert.*;
28
import info.rolandkrueger.roklib.webapps.data.GenericPersistableObject;
30
import org.junit.Test;
32
public class GenericPersistableObjectTest
35
public void testSetID ()
37
GenericPersistableObject<Long> testObj = new GenericPersistableObject<Long> ();
38
testObj.setKey (12345L);
39
assertEquals (12345L, testObj.getKey ());
40
Long id = new Long (23L);
42
assertTrue (testObj.getKey () == id);