m2u-upass-admin / test / ContentCategoryTest.java @ 58:0f4d9c4cfc1e
History | View | Annotate | Download (1.93 KB)
1 | 0:ea666cc7880e | hadi | |
---|---|---|---|
2 | import net.penril.ib.content.ContentCategoryDAO; |
||
3 | import net.penril.ibss.core.OrganizationDAO; |
||
4 | import net.penril.ibss.core.UserProfileDAO; |
||
5 | |||
6 | import org.junit.After; |
||
7 | import org.junit.AfterClass; |
||
8 | import org.junit.Before; |
||
9 | import org.junit.BeforeClass; |
||
10 | import org.junit.Test; |
||
11 | |||
12 | import com.ib.ibss.hibernate.tables.DAOFactory; |
||
13 | |||
14 | /**
|
||
15 | * Copyright (M) 2009 Penril Datability (M) Sdn Bhd All rights reserved.
|
||
16 | *
|
||
17 | * This software is copyrighted. Under the copyright laws, this software
|
||
18 | * may not be copied, in whole or in part, without prior written consent
|
||
19 | * of Penril Datability (M) Sdn Bhd or its assignees. This software is
|
||
20 | * provided under the terms of a license between Penril Datability (M)
|
||
21 | * Sdn Bhd and the recipient, and its use is subject to the terms of that
|
||
22 | * license.
|
||
23 | */
|
||
24 | |||
25 | /**
|
||
26 | * PROGRAMMER: Danniell
|
||
27 | * CHANGE-NO:
|
||
28 | * TASK-NO:
|
||
29 | * DATE CREATED: Dec 8, 2010
|
||
30 | * TAG AS:
|
||
31 | * REASON(S):
|
||
32 | * MODIFICATION:
|
||
33 | */
|
||
34 | |||
35 | /**
|
||
36 | * <Class description>
|
||
37 | */
|
||
38 | public class ContentCategoryTest |
||
39 | { |
||
40 | public static ContentCategoryDAO dao; |
||
41 | |||
42 | /**
|
||
43 | * <Method description>
|
||
44 | *
|
||
45 | * @throws java.lang.Exception
|
||
46 | */
|
||
47 | @BeforeClass
|
||
48 | public static void setUpBeforeClass () throws Exception |
||
49 | { |
||
50 | } |
||
51 | |||
52 | /**
|
||
53 | * <Method description>
|
||
54 | *
|
||
55 | * @throws java.lang.Exception
|
||
56 | */
|
||
57 | @AfterClass
|
||
58 | public static void tearDownAfterClass () throws Exception |
||
59 | { |
||
60 | } |
||
61 | |||
62 | /**
|
||
63 | * <Method description>
|
||
64 | *
|
||
65 | * @throws java.lang.Exception
|
||
66 | */
|
||
67 | @Before
|
||
68 | public void setUp () throws Exception |
||
69 | { |
||
70 | DAOFactory factory = DAOFactory.instance (DAOFactory.HIBERNATE); |
||
71 | dao = factory.getContentCategoryDAO (); |
||
72 | } |
||
73 | |||
74 | /**
|
||
75 | * <Method description>
|
||
76 | *
|
||
77 | * @throws java.lang.Exception
|
||
78 | */
|
||
79 | @After
|
||
80 | public void tearDown () throws Exception |
||
81 | { |
||
82 | } |
||
83 | |||
84 | @Test
|
||
85 | public void getCategoryByContentIDTest() throws Exception |
||
86 | { |
||
87 | try
|
||
88 | { |
||
89 | dao.getCategoryByContentType (new Long(2)); |
||
90 | } |
||
91 | catch(Exception e) |
||
92 | { |
||
93 | e.printStackTrace (); |
||
94 | throw e;
|
||
95 | } |
||
96 | } |
||
97 | } |