@@ -0,0 +1,2513 @@
+package com.thedesertmonk.plugin.hydrogen.test.contributions.configuration.launch.tab;%0A%0Aimport static org.mockito.Mockito.verify;%0Aimport static org.mockito.Mockito.verifyZeroInteractions;%0A%0Aimport org.eclipse.swt.events.ModifyEvent;%0Aimport org.eclipse.swt.events.SelectionEvent;%0Aimport org.eclipse.swt.widgets.Composite;%0Aimport org.eclipse.swt.widgets.Event;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport org.mockito.Mockito;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0A%0Aimport com.thedesertmonk.plugin.hydrogen.core.contributions.configuration.launch.tab.HydrogenLaunchConfigurationTab;%0Aimport com.thedesertmonk.plugin.hydrogen.core.contributions.configuration.launch.tab.HydrogenLaunchConfigurationTabChangeListener;%0A%0A/**%0A * Test class for %7B@link HydrogenLaunchConfigurationTabChangeListener%7D%0A *%0A * @author Andrew Vojak%0A */%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class HydrogenLaunchConfigurationTabChangeListenerTest %7B%0A%0A%09@Mock%0A%09private HydrogenLaunchConfigurationTab tab;%0A%0A%09private SelectionEvent selectionEvent;%0A%09private ModifyEvent modifyEvent;%0A%0A%09/**%0A%09 * Setup mocks.%0A%09 */%0A%09@Before%0A%09public void setup() %7B%0A%09%09final Event event = new Event();%0A%09%09event.widget = Mockito.mock(Composite.class);%0A%09%09selectionEvent = new SelectionEvent(event);%0A%09%09modifyEvent = new ModifyEvent(event);%0A%09%7D%0A%0A%09/**%0A%09 * Tests that the constructor throws an exception when the given%0A%09 * %7B@link HydrogenLaunchConfigurationTab%7D is %7B@code null%7D.%0A%09 */%0A%09@Test(expected = IllegalArgumentException.class)%0A%09public void testConstructor_NullTab() %7B%0A%09%09new HydrogenLaunchConfigurationTabChangeListener((HydrogenLaunchConfigurationTab) null);%0A%09%7D%0A%0A%09/**%0A%09 * Tests%0A%09 * %7B@link HydrogenLaunchConfigurationTabChangeListener#widgetSelected(SelectionEvent)%7D.%0A%09 */%0A%09@Test%0A%09public void testWidgetSelected() %7B%0A%09%09new HydrogenLaunchConfigurationTabChangeListener(tab).widgetSelected(selectionEvent);%0A%09%09verify(tab).onContentChanged();%0A%09%7D%0A%0A%09/**%0A%09 * Tests%0A%09 * %7B@link HydrogenLaunchConfigurationTabChangeListener#widgetDefaultSelected(SelectionEvent)%7D.%0A%09 */%0A%09@Test%0A%09public void testWidgetDefaultSelected() %7B%0A%09%09new HydrogenLaunchConfigurationTabChangeListener(tab).widgetDefaultSelected(selectionEvent);%0A%09%09verifyZeroInteractions(tab);%0A%09%7D%0A%0A%09/**%0A%09 * Tests%0A%09 * %7B@link HydrogenLaunchConfigurationTabChangeListener#modifyText(ModifyEvent)%7D.%0A%09 */%0A%09@Test%0A%09public void testModifyText() %7B%0A%09%09new HydrogenLaunchConfigurationTabChangeListener(tab).modifyText(modifyEvent);%0A%09%09verify(tab).onContentChanged();%0A%09%7D%0A%0A%7D%0A

Increase code coverage