diff options
Diffstat (limited to 'bundle-plugin/src/test/scala/com/yahoo/container/plugin/classanalysis/AnalyzeMethodBodyTest.scala')
-rw-r--r-- | bundle-plugin/src/test/scala/com/yahoo/container/plugin/classanalysis/AnalyzeMethodBodyTest.scala | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/bundle-plugin/src/test/scala/com/yahoo/container/plugin/classanalysis/AnalyzeMethodBodyTest.scala b/bundle-plugin/src/test/scala/com/yahoo/container/plugin/classanalysis/AnalyzeMethodBodyTest.scala deleted file mode 100644 index 43f52884f39..00000000000 --- a/bundle-plugin/src/test/scala/com/yahoo/container/plugin/classanalysis/AnalyzeMethodBodyTest.scala +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.container.plugin.classanalysis - -import org.scalatest.junit.{AssertionsForJUnit, JUnitSuite} -import sampleclasses._ -import TestUtilities._ -import org.junit.Test -import java.io.PrintStream - -import org.scalatest.Matchers - -/** - * Tests that classes used in method bodies are included in the imports list. - * @author tonytv - */ -class AnalyzeMethodBodyTest extends JUnitSuite with AssertionsForJUnit with Matchers { - @Test def require_that_class_of_locals_are_included() { - analyzeClass[Methods].referencedClasses should contain(name[Base]) - } - - @Test def require_that_class_of_locals_in_static_method_are_included() { - analyzeClass[Methods].referencedClasses should contain(name[Derived]) - } - - @Test def require_that_field_references_are_included() { - analyzeClass[Methods].referencedClasses should (contain (name[java.util.List[_]]) and contain (name[Fields])) - } - - @Test def require_that_class_owning_field_is_included() { - analyzeClass[Methods].referencedClasses should contain (name[System]) - } - - @Test def require_that_class_containing_method_is_included() { - analyzeClass[Methods].referencedClasses should contain (name[PrintStream]) - } - - @Test def require_that_element_of_new_multidimensional_array_is_included() { - analyzeClass[Methods].referencedClasses should contain (name[Interface1]) - } - - @Test def require_that_basic_arrays_are_not_included() { - analyzeClass[Methods].referencedClasses should not (contain("int[]")) - } - - @Test def require_that_container_generic_parameters_are_included() { - analyzeClass[Methods].referencedClasses should contain(name[Dummy]) - } - - @Test def require_that_class_owning_method_handler_is_included() { - analyzeClass[Methods].referencedClasses should contain(name[ClassWithMethod]) - } -} |