From: Pieter v. Z. <pv...@us...> - 2005-08-10 08:14:10
|
Update of /cvsroot/coefficient/coefficient/src-test/za/org/coefficient/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8042/src-test/za/org/coefficient/core Added Files: ProjectTest.java Log Message: Added testcase to test Project class. Test a lot of properties in one test method. --- NEW FILE: ProjectTest.java --- /** * * * Coefficient - facilitates project based collaboration * Copyright (C) 2005, Meraka Insitute, Pieter van Zyl * PO Box 395 * Pretoria 0001, RSA * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package za.org.coefficient.core; import za.org.coefficient.testing.CoefficientTestCase; /** * @author pieter20 Aug 8, 2005 TestCase to test the Project class. */ public class ProjectTest extends CoefficientTestCase { /** * Aug 8, 2005 * * @author pieter20 * @param testName * The name of the current test */ public ProjectTest(String testName) { super(testName); } /* * * Start: testing the setting of project properties */ /** * Test setting the active status of a project * * @author pieter20 Aug 8, 2005 */ public void testSetActiveProject() { Project testProject = new Project(); testProject.setActive(true); assertTrue(testProject.getActive()); } /** * Test setting some of the properties of a project * * @author pieter20 Aug 8, 2005 */ public void testSettingProperties() { Project testProject = new Project(); testProject.setShortName("test"); assertEquals(testProject.getShortName(), "test"); testProject.setName("Testing Project"); assertEquals(testProject.getName(), "Testing Project"); testProject.setDescription("This project is used to test"); assertEquals(testProject.getDescription(), "This project is used to test"); testProject.setHomePage("none"); assertEquals(testProject.getHomePage(), "none"); testProject.setIsPublic(true); assertTrue(testProject.getIsPublic()); } /** * @author pieter20 Aug 8, 2005 * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub } } |