Author: [email protected] Date: Thu Apr 28 15:26:08 2011 New Revision: 1064 Log: [AMDATUOPENSOCIAL-40] Added basic unit test
Added: trunk/amdatu-opensocial/opensocial-gadgetmanagement/src/test/ trunk/amdatu-opensocial/opensocial-gadgetmanagement/src/test/java/ trunk/amdatu-opensocial/opensocial-gadgetmanagement/src/test/java/org/ trunk/amdatu-opensocial/opensocial-gadgetmanagement/src/test/java/org/amdatu/ trunk/amdatu-opensocial/opensocial-gadgetmanagement/src/test/java/org/amdatu/opensocial/ trunk/amdatu-opensocial/opensocial-gadgetmanagement/src/test/java/org/amdatu/opensocial/gadgetmanagement/ trunk/amdatu-opensocial/opensocial-gadgetmanagement/src/test/java/org/amdatu/opensocial/gadgetmanagement/GadgetManagementTest.java Added: trunk/amdatu-opensocial/opensocial-gadgetmanagement/src/test/java/org/amdatu/opensocial/gadgetmanagement/GadgetManagementTest.java ============================================================================== --- (empty file) +++ trunk/amdatu-opensocial/opensocial-gadgetmanagement/src/test/java/org/amdatu/opensocial/gadgetmanagement/GadgetManagementTest.java Thu Apr 28 15:26:08 2011 @@ -0,0 +1,39 @@ +/* + Copyright (C) 2010 Amdatu.org + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +package org.amdatu.opensocial.gadgetmanagement; + +import org.junit.Assert; +import org.junit.Test; + +public class GadgetManagementTest { + + /** + * This is a very basic test. + * @throws Exception + */ + @Test + public void test() throws Exception { + GadgetCategory category = new GadgetCategory("test", "test category"); + Assert.assertEquals(category.getId(), "test"); + Assert.assertEquals(category.getName(), "test category"); + + GadgetDefinition gadgetDef = new GadgetDefinition("http://dummyurl.com", category, false); + Assert.assertEquals(gadgetDef.getUrl(), "http://dummyurl.com"); + Assert.assertEquals(gadgetDef.getCategory(), category); + Assert.assertEquals(gadgetDef.isDefaultVisible(), false); + } +} _______________________________________________ Amdatu-commits mailing list [email protected] http://lists.amdatu.org/mailman/listinfo/amdatu-commits
