/*
 *  Draco Econometrics
 *  Copyright (C) 2006-2009 Approximatrix, LLC
 *  http://www.approximatrix.com
 *  
 *  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 com.approximatrix.draco.editor.wizard;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import com.approximatrix.draco.application.plugin.PluginType;

public class PluginWizardDataTest {

	private PluginWizardData pwd = null;
	
	@Before
	public void setUp() throws Exception {
		pwd = new PluginWizardData();
	}

	@After
	public void tearDown() throws Exception {
		pwd = null;
	}

	@Test
	public void testGetVisibleName() {
		pwd.setVisibleName("Visible Name");
		assertNotNull(pwd.getVisibleName());
		assertEquals("Visible Name",pwd.getVisibleName());
	}

	@Test
	public void testGetClassName() {
		pwd.setClassName("ClassName");
		assertNotNull(pwd.getClassName());
		assertEquals("ClassName",pwd.getClassName());
		
		pwd.setClassName("With Spaces ");
		assertEquals("With_Spaces",pwd.getClassName());
	}

	@Test
	public void testGetModuleName() {
		assertNull(pwd.getModuleName());
		pwd.setModuleName("ModuleName");
		assertNotNull(pwd.getModuleName());
		assertEquals("ModuleName",pwd.getModuleName());
		
		pwd.setModuleName("With Spaces .");
		assertEquals("With_Spaces__",pwd.getModuleName());
	}

	@Test
	public void testGetPluginType() {
		assertNotNull(pwd.getPluginType());
		pwd.setPluginType(PluginType.analysis);
		assertEquals(PluginType.analysis,pwd.getPluginType());
	}

	@Test
	public void testGetVColumns() {
		assertNotNull(pwd.getVColumns());
	}

	@Test
	public void testGetOptions() {
		assertNotNull(pwd.getOptions());
	}

}
