diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/imports/test/CheckRewritableImportSectionFactoryTest.xtend b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/imports/test/CheckRewritableImportSectionFactoryTest.xtend deleted file mode 100644 index 40b8fe54f8..0000000000 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/imports/test/CheckRewritableImportSectionFactoryTest.xtend +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2016 Avaloq Group AG and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Avaloq Group AG - initial API and implementation - *******************************************************************************/ - -package com.avaloq.tools.ddk.check.imports.test - -import com.avaloq.tools.ddk.check.core.test.AbstractCheckTestCase -import com.avaloq.tools.ddk.check.imports.CheckRewritableImportSectionFactory -import com.google.inject.Inject -import org.eclipse.emf.common.util.BasicEList -import org.eclipse.emf.common.util.URI -import org.eclipse.emf.ecore.EObject -import org.eclipse.xtext.resource.XtextResource -import org.eclipse.xtext.testing.XtextRunner -import org.junit.Test -import org.junit.runner.RunWith - -import static org.mockito.Mockito.mock -import static org.mockito.Mockito.when - -/** - * Tests for {@link CheckRewritableImportSectionFactoryTest}. - */ -@RunWith(XtextRunner) -class CheckRewritableImportSectionFactoryTest extends AbstractCheckTestCase { - - @Inject CheckRewritableImportSectionFactory factory; - - /** - * Test parse() when passed a null XtextResource - */ - @Test(expected=NullPointerException) - def void testParseWithNullXtextResource() { - factory.parse(null) - } - - /** - * Happy-path test for parse() - */ - @Test - def void testParseSuccessful() { - // ARRANGE - val mockResource = mock(XtextResource) - when(mockResource.contents).thenReturn(new BasicEList()); - val mockUri = mock(URI) - when(mockResource.URI).thenReturn(mockUri); - when(mockUri.trimFragment).thenReturn(mockUri) - - // ACT - val rewritableImportSection = factory.parse(mockResource) - - // ASSERT - assertNotNull("parse() should return an object", rewritableImportSection) - assertTrue("parse() should return a RewritableImportSection with sort=true", rewritableImportSection.sort) - } - -} diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/test/core/CheckCoreTestSuite.java b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/test/core/CheckCoreTestSuite.java index 7b24545733..dd15402859 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/test/core/CheckCoreTestSuite.java +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/test/core/CheckCoreTestSuite.java @@ -22,7 +22,6 @@ import com.avaloq.tools.ddk.check.core.test.IssueCodeToLabelMapGenerationTest; import com.avaloq.tools.ddk.check.core.test.ProjectBasedTests; import com.avaloq.tools.ddk.check.formatting.CheckFormattingTest; -import com.avaloq.tools.ddk.check.imports.test.CheckRewritableImportSectionFactoryTest; import com.avaloq.tools.ddk.check.validation.CheckApiAccessValidationsTest; import com.avaloq.tools.ddk.check.validation.CheckJavaValidatorUtilTest; import com.avaloq.tools.ddk.check.validation.CheckValidationTest; @@ -38,7 +37,6 @@ CheckScopingTest.class, CheckValidationTest.class, CheckJavaValidatorUtilTest.class, - CheckRewritableImportSectionFactoryTest.class, CheckFormattingTest.class, BugAig830.class, BugAig1314.class,