├── .github
└── workflows
│ ├── ci.yml
│ ├── test-eap.yml
│ └── test.yml
├── .gitignore
├── .run
├── UT only.xml
└── check.run.xml
├── .travis.yml
├── CONTRIBUTING.md
├── LICENSE.md
├── README.md
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── print_surefire_reports.sh
├── settings.gradle
├── src
├── main
│ ├── java
│ │ └── com
│ │ │ └── weirddev
│ │ │ └── testme
│ │ │ └── intellij
│ │ │ ├── HackedRuntimeInstance.java
│ │ │ ├── TestMeBundle.java
│ │ │ ├── TestMePluginRegistration.java
│ │ │ ├── action
│ │ │ ├── CreateTestMeAction.java
│ │ │ ├── GotoTestOrCodeActionExt.java
│ │ │ ├── GotoTestOrCodeHandlerExt.java
│ │ │ ├── TestMeAction.java
│ │ │ ├── TestMeActionHandler.java
│ │ │ ├── TestMeAdditionalAction.java
│ │ │ ├── TestMeCreator.java
│ │ │ └── helpers
│ │ │ │ ├── ClassNameSelection.java
│ │ │ │ ├── GeneratedClassNameResolver.java
│ │ │ │ └── TargetDirectoryLocator.java
│ │ │ ├── builder
│ │ │ ├── MethodFactory.java
│ │ │ └── MethodReferencesBuilder.java
│ │ │ ├── cache
│ │ │ ├── Cache.java
│ │ │ └── LruCache.java
│ │ │ ├── configuration
│ │ │ ├── TestMeConfig.java
│ │ │ ├── TestMeConfigPersistent.java
│ │ │ └── TestMeWebHelpProvider.java
│ │ │ ├── generator
│ │ │ ├── CodeRefactorUtil.java
│ │ │ ├── MockBuilderFactory.java
│ │ │ ├── TestBuilderUtil.java
│ │ │ ├── TestClassElementsLocator.java
│ │ │ ├── TestMeGenerator.java
│ │ │ ├── TestMeResourceLoader.java
│ │ │ ├── TestTemplateContextBuilder.java
│ │ │ └── VelocityInitializer.java
│ │ │ ├── icon
│ │ │ ├── IconRegistry.java
│ │ │ ├── IconTokensReplacer.java
│ │ │ ├── IconTokensReplacerImpl.java
│ │ │ ├── IconizedLabel.java
│ │ │ ├── Icons.java
│ │ │ ├── TemplateIcons.java
│ │ │ └── TemplateNameFormatter.java
│ │ │ ├── intention
│ │ │ └── CreateTestForMethodIntention.java
│ │ │ ├── template
│ │ │ ├── FileTemplateConfig.java
│ │ │ ├── FileTemplateContext.java
│ │ │ ├── TemplateDescriptor.java
│ │ │ ├── TemplateRegistry.java
│ │ │ ├── TemplateRole.java
│ │ │ ├── TypeDictionary.java
│ │ │ └── context
│ │ │ │ ├── DiClassAnnotationEnum.java
│ │ │ │ ├── DiFieldAnnotationEnum.java
│ │ │ │ ├── Field.java
│ │ │ │ ├── Language.java
│ │ │ │ ├── Method.java
│ │ │ │ ├── MethodCall.java
│ │ │ │ ├── MethodCallArgument.java
│ │ │ │ ├── MockBuilder.java
│ │ │ │ ├── MockitoMockBuilder.java
│ │ │ │ ├── Param.java
│ │ │ │ ├── ParameterizedTestComponents.java
│ │ │ │ ├── PowerMockBuilder.java
│ │ │ │ ├── Reference.java
│ │ │ │ ├── StringUtils.java
│ │ │ │ ├── SyntheticParam.java
│ │ │ │ ├── TestBuilder.java
│ │ │ │ ├── TestBuilderTypes.java
│ │ │ │ ├── TestMeTemplateParams.java
│ │ │ │ ├── TestSubjectInspector.java
│ │ │ │ ├── Type.java
│ │ │ │ └── impl
│ │ │ │ ├── GroovyTestBuilderImpl.java
│ │ │ │ ├── JavaTestBuilderImpl.java
│ │ │ │ ├── LangTestBuilder.java
│ │ │ │ ├── LangTestBuilderFactory.java
│ │ │ │ ├── ScalaTestBuilder.java
│ │ │ │ └── TestBuilderImpl.java
│ │ │ ├── ui
│ │ │ ├── customizedialog
│ │ │ │ ├── CustomizeTestDialog.java
│ │ │ │ └── FileTemplateCustomization.java
│ │ │ ├── model
│ │ │ │ └── TestMeFileTemplate.java
│ │ │ ├── popup
│ │ │ │ ├── ConfigurationLinkAction.java
│ │ │ │ ├── TestMeActionCellRenderer.java
│ │ │ │ └── TestMePopUpHandler.java
│ │ │ ├── settings
│ │ │ │ ├── TestMeConfigurable.java
│ │ │ │ ├── TestMeSettingsForm.form
│ │ │ │ └── TestMeSettingsForm.java
│ │ │ └── template
│ │ │ │ ├── ExportableFileTemplateSettings.java
│ │ │ │ ├── FTManager.java
│ │ │ │ ├── FileTemplateConfigurable.java
│ │ │ │ ├── FileTemplateHighlighter.java
│ │ │ │ ├── FileTemplateLoadResult.java
│ │ │ │ ├── FileTemplateSettings.java
│ │ │ │ ├── FileTemplateTab.java
│ │ │ │ ├── FileTemplateTabAsList.java
│ │ │ │ ├── FileTemplateTextLexer.flex
│ │ │ │ ├── FileTemplateTokenType.java
│ │ │ │ ├── FileTemplatesLoader.java
│ │ │ │ ├── TestMeTemplateManager.java
│ │ │ │ ├── TestTemplatesConfigurable.java
│ │ │ │ ├── UrlUtil.java
│ │ │ │ └── _FileTemplateTextLexer.java
│ │ │ └── utils
│ │ │ ├── AccessLevelReflectionUtils.java
│ │ │ ├── ClassNameUtils.java
│ │ │ ├── JavaPsiTreeUtils.java
│ │ │ ├── JavaTypeUtils.java
│ │ │ ├── Node.java
│ │ │ ├── PropertyUtils.java
│ │ │ ├── ResourceLoader.java
│ │ │ ├── TemplateFileNameFormatter.java
│ │ │ ├── TestFileTemplateUtil.java
│ │ │ ├── TestFileUpdateInfo.java
│ │ │ ├── TestFileUpdateUtil.java
│ │ │ ├── TestSubjectResolverUtils.java
│ │ │ ├── TypeUtils.java
│ │ │ └── UrlClassLoaderUtils.java
│ └── resources
│ │ ├── META-INF
│ │ ├── plugin-groovy.xml
│ │ ├── plugin-scala.xml
│ │ ├── plugin.xml
│ │ └── pluginIcon.svg
│ │ ├── fileTemplates
│ │ ├── internal
│ │ │ └── velocity_implicit.vm
│ │ ├── testMeIncludes
│ │ │ ├── TestMe Footer.java.ft
│ │ │ ├── TestMe common macros.java.ft
│ │ │ ├── TestMe macros.groovy.ft
│ │ │ ├── TestMe macros.java.ft
│ │ │ ├── TestMe macros.scala.ft
│ │ │ └── default.html
│ │ ├── testMeTests
│ │ │ ├── Groovy, JUnit4 & Mockito.groovy.ft
│ │ │ ├── Groovy, Spock & Mockito.groovy.ft
│ │ │ ├── JUnit4 & Mockito.java.ft
│ │ │ ├── JUnit4 & Powermock.java.ft
│ │ │ ├── JUnit5 & Mockito.java.ft
│ │ │ ├── Parameterized Groovy, Spock & Mockito.groovy.ft
│ │ │ ├── Specs2 & Mockito.scala.ft
│ │ │ ├── TestNG & Mockito.java.ft
│ │ │ └── default.html
│ │ └── velocity.properties
│ │ ├── icons
│ │ ├── TestMe.png
│ │ ├── groovy.png
│ │ ├── junit.png
│ │ ├── junit5.png
│ │ ├── junit_dark.png
│ │ ├── mockito.png
│ │ ├── powermock.png
│ │ ├── scala.png
│ │ └── testNG.png
│ │ ├── intentionDescriptions
│ │ ├── CreateTestForMethodIntention
│ │ │ ├── after.java.template
│ │ │ ├── before.java.template
│ │ │ └── description.html
│ │ └── CreateTestMeAction
│ │ │ ├── after.java.template
│ │ │ ├── before.java.template
│ │ │ └── description.html
│ │ └── messages
│ │ └── TestMeBundle.properties
└── test
│ ├── groovy
│ └── com
│ │ └── weirddev
│ │ └── testme
│ │ └── intellij
│ │ ├── IconTokensReplacerTest.groovy
│ │ ├── generator
│ │ ├── MockBuilderFactoryTest.groovy
│ │ └── TestTemplateContextBuilderTest.groovy
│ │ ├── icon
│ │ └── TemplateNameFormatterTest.groovy
│ │ ├── template
│ │ ├── TemplateRegistryTest.groovy
│ │ └── context
│ │ │ ├── GroovyTestBuilderImplTest.groovy
│ │ │ ├── JavaTestBuilderImplTest.groovy
│ │ │ ├── LanguageTest.groovy
│ │ │ ├── MockitoMockBuilderTest.groovy
│ │ │ ├── StringUtilsTest.groovy
│ │ │ └── TypeTest.groovy
│ │ └── utils
│ │ ├── ClassNameUtilsSpec.groovy
│ │ ├── ClassNameUtilsTest.groovy
│ │ ├── TemplateFileNameFormatterTest.groovy
│ │ └── TypeUtilsTest.groovy
│ └── java
│ └── com
│ └── weirddev
│ └── testme
│ └── intellij
│ ├── BaseIJIntegrationTest.java
│ ├── LightJavaCodeInsightFixtureTestCase.java
│ ├── TestMeAdditionalActionJunit4Test.java
│ ├── action
│ ├── GotoTestOrCodeHandlerExtTest.java
│ ├── TestMeActionHandlerTest.java
│ └── TestMeActionTest.java
│ ├── generator
│ ├── OptionalPluginTestDependency.java
│ ├── TestMeGeneratorGroovyJunit4Test.java
│ ├── TestMeGeneratorJunit4PowerMockTest.java
│ ├── TestMeGeneratorJunit4Test.java
│ ├── TestMeGeneratorJunit5Test.java
│ ├── TestMeGeneratorSpecs2Test.java
│ ├── TestMeGeneratorSpockParameterizedTest.java
│ ├── TestMeGeneratorSpockTest.java
│ ├── TestMeGeneratorTestBase.java
│ └── TestMeGeneratorTestNgTest.java
│ └── utils
│ └── TestSubjectResolverUtilsTest.java
├── testData
├── commonSrc
│ ├── DeadOrAlive.java
│ ├── Fire.java
│ ├── Flames.java
│ ├── Hunter.java
│ ├── HunterImpl.java
│ ├── com
│ │ └── example
│ │ │ ├── SelfReferringType.java
│ │ │ ├── beans
│ │ │ ├── BeanByCtor.java
│ │ │ ├── BeanThere.java
│ │ │ ├── BigBean.java
│ │ │ ├── ConvertedBean.java
│ │ │ ├── InheritingBean.java
│ │ │ ├── JavaBean.java
│ │ │ ├── Result.java
│ │ │ ├── ResultPage.java
│ │ │ ├── SettersOverCtors.java
│ │ │ └── Spiral.java
│ │ │ ├── common
│ │ │ └── LogSupport.scala
│ │ │ ├── dependencies
│ │ │ ├── AbstractParent.java
│ │ │ ├── ChildWithSetters.java
│ │ │ ├── Logger.java
│ │ │ ├── MasterInterface.java
│ │ │ ├── SelfishService.java
│ │ │ └── TimeMachine.scala
│ │ │ ├── foes
│ │ │ ├── Ace.java
│ │ │ ├── BeanDependsOnInterface.java
│ │ │ ├── Fear.java
│ │ │ ├── Fire.java
│ │ │ ├── FireBall.java
│ │ │ ├── Ice.java
│ │ │ └── Pokemon.java
│ │ │ ├── groovies
│ │ │ ├── Groove.groovy
│ │ │ ├── ImGroovy.groovy
│ │ │ └── ImGroovyWithTupleCtor.groovy
│ │ │ ├── hole
│ │ │ └── Fire.java
│ │ │ ├── parents
│ │ │ └── impl
│ │ │ │ ├── AbstactFoo.java
│ │ │ │ ├── FooInterface.java
│ │ │ │ ├── FooInterfaceExt.java
│ │ │ │ └── FooParent.java
│ │ │ ├── scala
│ │ │ ├── CaseClass.scala
│ │ │ ├── DayInAWeek.scala
│ │ │ ├── Planet.scala
│ │ │ ├── SolarSystemPlanets.scala
│ │ │ └── WeekDay.scala
│ │ │ ├── services
│ │ │ ├── FooType.java
│ │ │ ├── Result.java
│ │ │ └── impl
│ │ │ │ ├── ContainNestedPropertyWithCtor.java
│ │ │ │ ├── DelegateCtor.java
│ │ │ │ ├── DoneThat.java
│ │ │ │ ├── FooBro.groovy
│ │ │ │ ├── FooConverterAbs.java
│ │ │ │ └── Many.java
│ │ │ ├── util
│ │ │ ├── FooUtils.java
│ │ │ └── List.java
│ │ │ └── warriers
│ │ │ ├── FearFighter.java
│ │ │ ├── FooFighter.java
│ │ │ ├── TechFighter.java
│ │ │ └── impl
│ │ │ ├── FearFighterImpl.java
│ │ │ ├── FinalCountdown.java
│ │ │ ├── FooFighterImpl.java
│ │ │ └── TechFighterImpl.java
│ └── javax
│ │ └── inject
│ │ ├── Inject.java
│ │ └── Singleton.java
├── testMeAdditionalAction
│ ├── innerClass
│ │ ├── com
│ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ └── test
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── PublicInnerClassTest.java
│ ├── innerOfInnerClass
│ │ ├── com
│ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ └── test
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── InnerOfInnerClassTest.java
│ ├── innerOfInnerStaticClass
│ │ ├── com
│ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ └── test
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── InnerOfInnerStaticClassTest.java
│ ├── innerStaticClass
│ │ ├── com
│ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ └── test
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── InnerStaticClassTest.java
│ ├── innerStaticClassWithMember
│ │ ├── com
│ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ └── test
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── InnerStaticClassWithMemberTest.java
│ └── innerStaticOfInnerStaticClass
│ │ ├── com
│ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── Foo.java
│ │ └── test
│ │ └── com
│ │ └── example
│ │ └── services
│ │ └── impl
│ │ └── InnerStaticOfInnerStaticClassTest.java
├── testMeGenerator
│ ├── arrays
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ ├── testJunit5
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testSpecs2
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.scala
│ │ └── testTestNg
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ ├── avoidInfiniteRecursionSelfReferences
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── bean
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ ├── testSpecs2
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.scala
│ │ └── testSpock
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── collections
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ └── testSpecs2
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.scala
│ ├── constants
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ └── testSpecs2
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.scala
│ ├── constructors
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── ctorOverProps
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ └── testSpock
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── ctorOverSetters
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── ctorWhenNoMocks
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── date
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── declareSpecificTestMethodIgnoreThrownExceptionTypes
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ └── testPowerMock
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ ├── declareSpecificTestMethodThrownExceptionTypes
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ └── testPowerMock
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ ├── defaultPackage
│ │ ├── src
│ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── FooTest.groovy
│ ├── directlyReferencedPropertiesNotIgnored
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── beans
│ │ │ │ └── Foo.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── beans
│ │ │ └── FooTest.groovy
│ ├── enum
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── enumSubject
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── fileTemplateCustomization
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ ├── testJunit5
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testPowerMock
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testSpock
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ └── testTestNg
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ ├── generics
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ ├── testSpock
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ └── testSpockParameterized
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── genericsTypeCollision
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── groovy
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foovy.groovy
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FoovyTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FoovyTest.groovy
│ ├── ignoreUnusedCtorArguments
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── ignoreUnusedCtorArgumentsIdentifyMethodReference
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── ignoreUnusedCtorArgumentsInGroovy
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.groovy
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── ignoreUnusedCtorArgumentsWhenDelegatedCalls
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── ignoreUnusedCtorArgumentsWhenDelegatedCallsInGroovy
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.groovy
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── ignoreUnusedCtorArgumentsWhenNestedProps
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── ignoreUnusedProperties
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── ignoreUnusedPropertiesInGroovy
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.groovy
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── ignoreUnusedPropertiesWhenInherited
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── inheritance
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── inheritanceIgnored
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── javaCallsGroovy
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── miscReplacementTypes
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── mockFieldsInDependencyInjection
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ ├── testJunit5
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testPowerMock
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testSpock
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ └── testTestNg
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ ├── mockFieldsInDiWithCtor
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ ├── testJunit5
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testSpock
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ └── testTestNg
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ ├── mockFieldsInDiWithSetter
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ ├── testJunit5
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testSpock
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ └── testTestNg
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ ├── mockReturned
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ ├── testJunit5
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testSpecs2
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.scala
│ │ ├── testSpock
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ └── testTestNg
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ ├── nestedClassParams
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── noFormatting
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── overloading
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── overrideAbstract
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── overrideAbstractIgnoreInherited
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── paramsConstructors
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── paramsConstructorsNoFqnReplacement
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── primitiveCallTypes
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── renderInternalMethodCallStubs
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ └── testPowerMock
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ ├── renderInternalMethodCallStubsIgnored
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ └── testPowerMock
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ ├── renderInternalMethodCallStubsIgnoredThrowExceptions
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ └── testPowerMock
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ ├── renderInternalMethodCallStubsThrowExceptions
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ └── testPowerMock
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ ├── replacedInterface
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── scalaCaseClass
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── UseCase.scala
│ │ └── testSpecs2
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── UseCaseTest.scala
│ ├── scalaDependencyReturnsFuture
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.scala
│ │ └── testSpecs2
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.scala
│ ├── scalaEnumeration
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.scala
│ │ └── testSpecs2
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.scala
│ ├── scalaFuture
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.scala
│ │ └── testSpecs2
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.scala
│ ├── scalaGenerics
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTrait.scala
│ │ └── testSpecs2
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.scala
│ ├── scalaObject
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.scala
│ │ └── testSpecs2
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.scala
│ ├── scalaRequireExecutionContext
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.scala
│ │ └── testSpecs2
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.scala
│ ├── scalaSealedCaseClassEnum
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.scala
│ │ └── testSpecs2
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.scala
│ ├── scalaWithDependencies
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.scala
│ │ └── testSpecs2
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.scala
│ ├── settersOverCtor
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── simpleClass
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ ├── testJunit5
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testPowerMock
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testSpecs2
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.scala
│ │ └── testTestNg
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ ├── static
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── staticFieldless
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── typeInDefaultPackageCollision
│ │ ├── src
│ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── FooTest.groovy
│ ├── typeNameCollision
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── utilWithoutAccessableCtor
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ ├── testJunit5
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testTestNg
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ ├── variousFieldTypes
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ ├── testJunit5
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testPowerMock
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testSpecs2
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.scala
│ │ └── testTestNg
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ ├── variousTypesOfArguments
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ └── testSpecs2
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.scala
│ ├── verifyMethodCall
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ ├── testGroovy
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.groovy
│ │ ├── testJunit5
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testTestNg
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ ├── withFinalTypeDependency
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ ├── withFinalTypeDependencyMockable
│ │ ├── resources
│ │ │ └── mockito-extensions
│ │ │ │ └── org.mockito.plugins.MockMaker
│ │ ├── src
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── Foo.java
│ │ ├── test
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── services
│ │ │ │ └── impl
│ │ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.groovy
│ └── withSetters
│ │ ├── src
│ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── Foo.java
│ │ ├── test
│ │ └── com
│ │ │ └── example
│ │ │ └── services
│ │ │ └── impl
│ │ │ └── FooTest.java
│ │ └── testGroovy
│ │ └── com
│ │ └── example
│ │ └── services
│ │ └── impl
│ │ └── FooTest.groovy
└── testSubjectResolverUtils
│ └── isValidForTesting
│ └── com
│ └── example
│ └── services
│ └── impl
│ └── Foo.java
├── testme-intellij-common
├── build.gradle
└── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── weirddev
│ │ └── testme
│ │ └── intellij
│ │ ├── common
│ │ ├── reflection
│ │ │ └── MethodReflectionUtils.java
│ │ └── utils
│ │ │ ├── LanguageUtils.java
│ │ │ └── PsiMethodUtils.java
│ │ └── resolvers
│ │ └── to
│ │ ├── MethodCallArg.java
│ │ ├── ResolvedMethodCall.java
│ │ └── ResolvedReference.java
│ └── test
│ └── groovy
│ └── com
│ └── weirddev
│ └── testme
│ └── intellij
│ └── common
│ └── utils
│ └── PsiMethodUtilsTest.groovy
├── testme-intellij-groovy
├── build.gradle
└── src
│ └── main
│ └── java
│ └── com
│ └── weirddev
│ └── testme
│ └── intellij
│ └── groovy
│ └── resolvers
│ ├── GroovyPropertyUtil.java
│ └── GroovyPsiTreeUtils.java
└── testme-intellij-scala
├── build.gradle
└── src
├── main
└── java
│ └── com
│ └── weirddev
│ └── testme
│ └── intellij
│ └── scala
│ ├── resolvers
│ ├── ScalaPsiRefactoringUtils.java
│ ├── ScalaPsiTreeUtils.java
│ └── ScalaTypeUtils.java
│ └── utils
│ └── GenericsExpressionParser.java
└── test
└── groovy
└── com
└── weirddev
└── testme
└── intellij
└── scala
└── utils
└── GenericsExpressionParserTest.groovy
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 | on:
3 | pull_request:
4 | push:
5 | branches:
6 | - '**'
7 | paths-ignore:
8 | - '*.md'
9 |
10 | jobs:
11 | test:
12 | strategy:
13 | fail-fast: false
14 | matrix:
15 | include:
16 | - IDEA_VERSION: 2023.2
17 | SCALA_PLUGIN_VERSION: 2023.2.23
18 | WITH_IDEA_PLUGINS: true
19 | - IDEA_VERSION: 2023.2
20 | SCALA_PLUGIN_VERSION: 2023.2.23
21 | WITH_IDEA_PLUGINS: false
22 | - IDEA_VERSION: 2024.1
23 | SCALA_PLUGIN_VERSION: 2024.1.1
24 | WITH_IDEA_PLUGINS: true
25 | - IDEA_VERSION: 2024.2.1
26 | SCALA_PLUGIN_VERSION: 2024.2.1
27 | WITH_IDEA_PLUGINS: true
28 | - IDEA_VERSION: LATEST-EAP-SNAPSHOT
29 | SCALA_PLUGIN_VERSION: 2024.2.1
30 | WITH_IDEA_PLUGINS: true
31 | - IDEA_VERSION: LATEST-EAP-SNAPSHOT
32 | SCALA_PLUGIN_VERSION: 2024.2.1
33 | WITH_IDEA_PLUGINS: false
34 | # UPLOAD_TEST_RESULTS: true
35 | uses: ./.github/workflows/test.yml
36 | secrets: inherit
37 | with:
38 | IDEA_VERSION: ${{ matrix.IDEA_VERSION }}
39 | WITH_IDEA_PLUGINS: ${{ matrix.WITH_IDEA_PLUGINS }}
40 | SCALA_PLUGIN_VERSION: ${{ matrix.SCALA_PLUGIN_VERSION }}
41 |
--------------------------------------------------------------------------------
/.github/workflows/test-eap.yml:
--------------------------------------------------------------------------------
1 | name: Test EAP
2 | on:
3 | schedule:
4 | - cron: '0 12 * * *' # execute daily at 12:00
5 |
6 | jobs:
7 | test:
8 | strategy:
9 | fail-fast: false
10 | matrix:
11 | WITH_IDEA_PLUGINS: [ true, false]
12 | include:
13 | - IDEA_VERSION: LATEST-EAP-SNAPSHOT
14 | SCALA_PLUGIN_VERSION: 2024.2.1
15 |
16 | - IDEA_VERSION: LATEST-EAP-SNAPSHOT
17 | SCALA_PLUGIN_VERSION: 2024.2.1
18 | WITH_IDEA_PLUGINS: true
19 |
20 | uses: ./.github/workflows/test.yml
21 | secrets: inherit
22 | with:
23 | IDEA_VERSION: ${{ matrix.IDEA_VERSION }}
24 | WITH_IDEA_PLUGINS: ${{ matrix.WITH_IDEA_PLUGINS }}
25 | SCALA_PLUGIN_VERSION: ${{ matrix.SCALA_PLUGIN_VERSION }}
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | .gradle/
3 | .idea/
4 | *.iws
5 | *.ipr
6 | *.log
7 | *.log.*
8 | build/
9 | hs_err_pid*
10 | classes
11 | out
12 | lombok.config
13 | /.intellijPlatform/
14 |
--------------------------------------------------------------------------------
/.run/UT only.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
11 |
17 |
18 |
19 | true
20 | true
21 | false
22 | false
23 |
24 |
25 |
--------------------------------------------------------------------------------
/.run/check.run.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | true
19 | true
20 | false
21 | true
22 |
23 |
24 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright © 2017, [WeirdDev](https://weirddev.com). All rights reserved.
2 | The TestMe IntelliJ IDEA Plugin project is licensed under AGPLv3 - [Affero General Public License v3](https://www.gnu.org/licenses/agpl-3.0.en.html)
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | group = com.weirddev.testme
2 | testMeVersion = 6.7.0
3 |
4 | jvmTargetVersion = 17
5 |
6 | #If JAVA_HOME env var does not point to JDK 6 installation dir - run gradle while with systems/env var - javaHome
7 | javaHome=
8 | org.gradle.jvmargs=-XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=utf-8 -Dkotlin.daemon.jvm.options=--illegal-access=permit -Djava.awt.headless=true
9 | #org.gradle.unsafe.configuration-cache = true
10 |
11 | #Supported versions:
12 | ideaType = IC
13 | ideaVersion = 2023.2
14 | #ideaVersion = 2024.2.1
15 | #ideaVersion = LATEST-EAP-SNAPSHOT
16 | ideaPublishChannel =
17 | #ideaPublishChannel = EAP
18 |
19 | scalaPluginVersion = 2023.2.23
20 | #scalaPluginVersion = 2024.2.1
21 | enableIdeaGroovyPlugin = true
22 | enableIdeaScalaPlugin = true
23 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wrdv/testme-idea/104fca63481cc4072502d1850a2e2cf4792b6da5/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Oct 12 21:42:46 IDT 2016
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
7 | #distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-8.9-all.zip
--------------------------------------------------------------------------------
/print_surefire_reports.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | echo "Current directory is $(pwd)"
3 | echo "\n=== SUREFIRE REPORTS ===\n"
4 | for F in build/test-results/test/*.xml
5 | do
6 | echo $F:
7 | cat $F
8 | echo
9 | done
10 | for F in build/integrationTest-results/*.xml
11 | do
12 | echo $F:
13 | cat $F
14 | echo
15 | done
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | mavenCentral()
4 | // maven("https://oss.sonatype.org/content/repositories/snapshots/")
5 | gradlePluginPortal()
6 | }
7 | }
8 | rootProject.name = 'testme-intellij'
9 | include ':testme-intellij-common', ':testme-intellij-groovy', ':testme-intellij-scala'
10 |
11 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/TestMeBundle.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij;
2 |
3 | import com.intellij.CommonBundle;
4 | import org.jetbrains.annotations.NonNls;
5 | import org.jetbrains.annotations.NotNull;
6 | import org.jetbrains.annotations.PropertyKey;
7 |
8 | import java.lang.ref.Reference;
9 | import java.lang.ref.SoftReference;
10 | import java.util.ResourceBundle;
11 |
12 | /**
13 | * Date: 17/12/2016
14 | *
15 | * @author Yaron Yamin
16 | */
17 | public class TestMeBundle {
18 | public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
19 | return CommonBundle.message(getBundle(), key, params);
20 | }
21 |
22 | private static Reference bundle;
23 | @NonNls
24 | private static final String BUNDLE = "messages.TestMeBundle";
25 |
26 | private static ResourceBundle getBundle() {
27 | ResourceBundle bundle = com.intellij.reference.SoftReference.dereference(TestMeBundle.bundle);
28 | if (bundle == null) {
29 | bundle = ResourceBundle.getBundle(BUNDLE);
30 | TestMeBundle.bundle = new SoftReference(bundle);
31 | }
32 | return bundle;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/action/GotoTestOrCodeActionExt.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.action;
2 |
3 | import com.intellij.codeInsight.CodeInsightActionHandler;
4 | import com.intellij.testIntegration.GotoTestOrCodeAction;
5 | import org.jetbrains.annotations.NotNull;
6 |
7 | /**
8 | * Date: 10/15/2016
9 | * @author Yaron Yamin
10 | */
11 | public class GotoTestOrCodeActionExt extends GotoTestOrCodeAction {
12 |
13 | @NotNull
14 | @Override
15 | protected CodeInsightActionHandler getHandler() {
16 | return new GotoTestOrCodeHandlerExt();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/action/TestMeAction.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.action;
2 |
3 | import com.intellij.codeInsight.CodeInsightActionHandler;
4 | import com.intellij.codeInsight.generation.actions.BaseGenerateAction;
5 | import com.intellij.openapi.editor.Editor;
6 | import com.intellij.openapi.project.Project;
7 | import com.intellij.psi.PsiFile;
8 | import com.weirddev.testme.intellij.utils.TestSubjectResolverUtils;
9 | import org.jetbrains.annotations.NotNull;
10 |
11 | /**
12 | * Date: 16/12/2016
13 | *
14 | * @author Yaron Yamin
15 | */
16 | public class TestMeAction extends BaseGenerateAction {
17 | public TestMeAction() {
18 | super(new TestMeActionHandler());
19 | }
20 |
21 | @Override
22 | protected boolean isValidForFile(@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) {
23 | return TestSubjectResolverUtils.isValidForTesting(editor, file);
24 | }
25 |
26 | /**
27 | * expose the underlying handler for UT
28 | */
29 | CodeInsightActionHandler getActionHandler(){
30 | return getHandler();
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/action/helpers/ClassNameSelection.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.action.helpers;
2 |
3 | /**
4 | * Date: 18/03/2017
5 | *
6 | * @author Yaron Yamin
7 | */
8 | public class ClassNameSelection {
9 | private final String className;
10 | private final UserDecision userDecision;
11 |
12 | public ClassNameSelection(String className, UserDecision userDecision) {
13 | this.className = className;
14 | this.userDecision = userDecision;
15 | }
16 |
17 | public enum UserDecision{
18 | New,Goto,Abort
19 | }
20 |
21 | public String getClassName() {
22 | return className;
23 | }
24 |
25 | public UserDecision getUserDecision() {
26 | return userDecision;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/cache/Cache.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.cache;
2 |
3 | public interface Cache {
4 |
5 | /**
6 | * Retrieves an item from the cache by its key. If the item is not present,
7 | * the supplied lambda expression is used to compute the value and store it in the cache.
8 | *
9 | * @param key the key of the item to retrieve.
10 | * @param valueSupplier a lambda expression or method reference that supplies the value if it's missing.
11 | * @return the value associated with the key, either from the cache or computed by the supplied lambda.
12 | */
13 | V getOrCompute(K key, java.util.function.Supplier valueSupplier);
14 |
15 | LruCache.CacheStats getUsageStats();
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/configuration/TestMeConfigPersistent.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.configuration;
2 |
3 | import com.intellij.openapi.components.PersistentStateComponent;
4 | import com.intellij.openapi.components.ServiceManager;
5 | import com.intellij.openapi.components.State;
6 | import com.intellij.openapi.components.Storage;
7 |
8 | /**
9 | * Date: 29/07/2018
10 | *
11 | * @author Yaron Yamin
12 | */
13 | @State(
14 | name="TestMeConfig",
15 | storages = {
16 | @Storage("TestMeConfig.xml")
17 | }
18 | )
19 | public class TestMeConfigPersistent implements PersistentStateComponent {
20 | private TestMeConfig state;
21 |
22 | public static TestMeConfigPersistent getInstance() {
23 | return ServiceManager.getService(TestMeConfigPersistent.class);
24 | }
25 |
26 | @Override
27 | public TestMeConfig getState() {
28 | synchronized (this) {
29 | if (state == null) {
30 | state = new TestMeConfig();
31 | }
32 | }
33 | return state;
34 | }
35 |
36 | @Override
37 | public void loadState(TestMeConfig state) {
38 |
39 | this.state = state;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/icon/IconTokensReplacer.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.icon;
2 |
3 | import javax.swing.*;
4 | import java.util.ArrayList;
5 |
6 | /**
7 | * Date: 10/19/2016
8 | *
9 | * @author Yaron Yamin
10 | */
11 | public interface IconTokensReplacer {
12 | ArrayList tokenize(String text, Icon icon);
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/icon/Icons.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.icon;
2 |
3 | import com.intellij.openapi.util.IconLoader;
4 | import org.jetbrains.annotations.NotNull;
5 |
6 | import javax.swing.*;
7 |
8 | /**
9 | * Date: 10/15/2016
10 | *
11 | * @author Yaron Yamin
12 | */
13 | public interface Icons {
14 | Icon GROOVY = getIcon("/icons/groovy.png");
15 | Icon SCALA = getIcon("/icons/scala.png");
16 | Icon MOCKITO = getIcon("/icons/mockito.png");
17 | Icon POWERMOCK = getIcon("/icons/powermock.png");
18 | Icon JUNIT4 = getIcon("/icons/junit.png");
19 | Icon JUNIT5 = getIcon("/icons/junit5.png");
20 | Icon JUNIT4_DARK = getIcon("/icons/junit_dark.png");
21 | Icon TEST_ME = getIcon("/icons/TestMe.png");
22 | Icon TESTNG = getIcon("/icons/testNG.png");
23 |
24 | @NotNull
25 | private static Icon getIcon(String path) {
26 | return IconLoader.getIcon(path, Icons.class.getClassLoader());
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/template/TemplateRole.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.template;
2 |
3 | /**
4 | * @author : Yaron Yamin
5 | * @since : 9/4/20
6 | **/
7 | public enum TemplateRole {
8 | Tester,Included
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/template/context/DiClassAnnotationEnum.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.template.context;
2 |
3 | import lombok.Getter;
4 |
5 | import java.util.*;
6 |
7 | @Getter
8 | public enum DiClassAnnotationEnum {
9 | SINGLETON("javax.inject.Singleton"),
10 | SERVICE("org.springframework.stereotype.Service"),
11 | COMPONENT("org.springframework.stereotype.Component"),
12 | REPOSITORY("org.springframework.stereotype.Repository"),
13 | CONTROLLER("org.springframework.stereotype.Controller"),
14 | REST_CONTROLLER("org.springframework.web.bind.annotation.RestController"),
15 | CONFIGURATION("org.springframework.context.annotation.Configuration"),
16 | ;
17 | private final String canonicalName;
18 |
19 | private static final List annStrList = Arrays.stream(DiClassAnnotationEnum.values())
20 | .map(DiClassAnnotationEnum::getCanonicalName).toList();
21 |
22 | public static boolean isDiClassAnnotation(String annName) {
23 | return annStrList.contains(annName);
24 | }
25 |
26 | DiClassAnnotationEnum(String canonicalName) {
27 | this.canonicalName = canonicalName;
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/template/context/DiFieldAnnotationEnum.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.template.context;
2 |
3 | import lombok.Getter;
4 |
5 | import java.util.Arrays;
6 | import java.util.List;
7 |
8 | @Getter
9 | public enum DiFieldAnnotationEnum {
10 | INJECT("javax.inject.Inject"),
11 | NAMED("javax.inject.Named"),
12 | QUALIFIER("javax.inject.Qualifier"),
13 | QUALIFIER_SPRING("org.springframework.beans.factory.annotation.Qualifier"),
14 | AUTOWIRED("org.springframework.beans.factory.annotation.Autowired"),
15 | RESOURCE("javax.annotation.Resource"),
16 | ;
17 | private final String canonicalName;
18 |
19 | private static final List annStrList = Arrays.stream(DiFieldAnnotationEnum.values())
20 | .map(DiFieldAnnotationEnum::getCanonicalName).toList();
21 |
22 | public static boolean isDiFieldAnnotation(String annName) {
23 | return annStrList.contains(annName);
24 | }
25 |
26 | DiFieldAnnotationEnum(String canonicalName) {
27 | this.canonicalName = canonicalName;
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/template/context/Language.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.template.context;
2 |
3 | import com.intellij.openapi.diagnostic.Logger;
4 | import org.jetbrains.annotations.NotNull;
5 |
6 | import java.util.Arrays;
7 | import java.util.Optional;
8 | import java.util.stream.Stream;
9 |
10 | /**
11 | * Supported languages.
12 | * Date: 22/04/2017
13 | *
14 | * @author Yaron Yamin
15 | */
16 | public enum Language
17 | {
18 | Scala, Groovy, Java;
19 |
20 | @NotNull
21 | private static final Logger LOG = Logger.getInstance(Language.class.getName());
22 |
23 | /**
24 | * safely find enum from name. fallback to {@link com.weirddev.testme.intellij.template.context.Language#Java}
25 | * @param language possible Language enum name
26 | * @return resolved Language enum from name
27 | */
28 | public static Language safeValueOf(String language) {
29 | Optional optLang = Stream.of(Language.values()).filter(lang -> lang.name().toLowerCase().equals(language.toLowerCase())).findAny();
30 | return optLang.orElseGet(() -> {
31 | LOG.warn("Illegal language selected for mock builder:" + language + ". valid values:" + Arrays.toString(Language.values()));
32 | return Language.Java;
33 | });
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/template/context/MethodCallArgument.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.template.context;
2 |
3 | import lombok.Getter;
4 |
5 | /**
6 | * Represents a Method call argument.
7 | * Date: 23/06/2017
8 | *
9 | * @author Yaron Yamin
10 | */
11 | public class MethodCallArgument {
12 | /**
13 | * textual expression of the argument passed to the method call
14 | */
15 | @Getter private final String text;
16 |
17 | public MethodCallArgument(String text) {
18 | this.text = text;
19 | }
20 |
21 | @Override
22 | public boolean equals(Object o) {
23 | if (this == o) return true;
24 | if (!(o instanceof MethodCallArgument)) return false;
25 |
26 | MethodCallArgument that = (MethodCallArgument) o;
27 |
28 | return text != null ? text.equals(that.text) : that.text == null;
29 | }
30 |
31 | @Override
32 | public int hashCode() {
33 | return text != null ? text.hashCode() : 0;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/template/context/MockBuilder.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.template.context;
2 |
3 | import java.util.List;
4 |
5 | /***
6 | * mock builder interface
7 | *
8 | * @author huangliang
9 | */
10 | public interface MockBuilder {
11 |
12 | /**
13 | * true - field can be mocked
14 | */
15 | boolean isMockable(Field field, Type testedClass);
16 |
17 | /**
18 | * constructs an error message explaining why field cannot be mocked
19 | * @param prefix add prefix to message
20 | * @param field reported field
21 | * @return an error message explaining why field cannot be mocked
22 | */
23 | String getImmockabiliyReason(String prefix, Field field);
24 |
25 | /**
26 | * constructs mocked arguments expression
27 | * @param params method params being mocked
28 | * @param language String representation of test code {@link com.weirddev.testme.intellij.template.context.Language}
29 | * @return mocked arguments expression
30 | * @see Language
31 | */
32 | String buildMockArgsMatchers(List params, String language);
33 |
34 | /**
35 | * @return true - if Field should be mocked
36 | */
37 | boolean isMockExpected(Field field);
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/template/context/ParameterizedTestComponents.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.template.context;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.HashMap;
6 | import java.util.Map;
7 |
8 | /**
9 | * Holds string constructs for composing a parameterized test call.
10 | * Date: 10/11/2017
11 | *
12 | * @author Yaron Yamin
13 | */
14 | @Data
15 | public class ParameterizedTestComponents {
16 | /**
17 | * map of argument name - value for method call
18 | */
19 | private Map paramsMap=new HashMap();
20 | /**
21 | * parameterized method invocation expression
22 | */
23 | private String methodClassParamsStr;
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/template/context/SyntheticParam.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.template.context;
2 |
3 | import org.jetbrains.annotations.Nullable;
4 |
5 | import java.util.ArrayList;
6 |
7 | /**
8 | * Represents a synthetic parameter. not coded explicitly.
9 | *
10 | * Date: 25/02/2017
11 | * @author Yaron Yamin
12 | */
13 | public class SyntheticParam extends Param {
14 |
15 | @Nullable
16 | private final UsageContext usageContext;
17 |
18 | public SyntheticParam(Type type, String name, UsageContext usageContext) {
19 | super(type, name,new ArrayList());
20 | this.usageContext = usageContext;
21 | }
22 | public SyntheticParam(Type type, String name) {
23 | super(type, name,new ArrayList());
24 | this.usageContext = null;
25 | }
26 |
27 | /**
28 | *
29 | * @return true when represents a bean property
30 | */
31 | public enum UsageContext {
32 | Property, Generic
33 | }
34 |
35 | public UsageContext getUsageContext() {
36 | return usageContext;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/template/context/impl/LangTestBuilder.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.template.context.impl;
2 |
3 | import com.weirddev.testme.intellij.template.context.Param;
4 | import com.weirddev.testme.intellij.template.context.Type;
5 |
6 | import java.util.List;
7 |
8 | /**
9 | * Date: 17/02/2017
10 | *
11 | * @author Yaron Yamin
12 | */
13 | public interface LangTestBuilder {
14 | String PARAMS_SEPARATOR = ", ";
15 | String renderJavaCallParams(List params);
16 |
17 | String renderJavaCallParam(Type type, String strValue);
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/ui/customizedialog/FileTemplateCustomization.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.ui.customizedialog;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * customization of user selections
7 | * @author huangliang
8 | */
9 | public class FileTemplateCustomization {
10 |
11 | private final List selectedFieldNameList;
12 |
13 | private final List selectedMethodIdList;
14 |
15 | private final boolean openUserCheckDialog;
16 |
17 | public FileTemplateCustomization(List selectedFieldNameList, List selectedMethodIdList,
18 | boolean openUserCheckDialog) {
19 | this.selectedFieldNameList = selectedFieldNameList;
20 | this.selectedMethodIdList = selectedMethodIdList;
21 | this.openUserCheckDialog = openUserCheckDialog;
22 | }
23 |
24 | public List getSelectedFieldNameList() {
25 | return selectedFieldNameList;
26 | }
27 |
28 | public List getSelectedMethodIdList() {
29 | return selectedMethodIdList;
30 | }
31 |
32 | public boolean isOpenUserCheckDialog() {
33 | return openUserCheckDialog;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/ui/popup/ConfigurationLinkAction.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.ui.popup;
2 |
3 | import com.intellij.icons.AllIcons;
4 | import com.intellij.openapi.options.ShowSettingsUtil;
5 | import com.intellij.openapi.project.Project;
6 | import org.jetbrains.annotations.NotNull;
7 |
8 | import javax.swing.*;
9 |
10 | /**
11 | * @author : Yaron Yamin
12 | * @since : 9/25/20
13 | **/
14 | public class ConfigurationLinkAction implements TestMePopUpHandler.AdditionalAction {
15 | @NotNull
16 | @Override
17 | public String getText() {
18 | return "Configure...";
19 | }
20 |
21 | @Override
22 | public Icon getIcon() {
23 | return AllIcons.General.Settings;
24 | }
25 |
26 | @Override
27 | public void execute(Project project) {
28 | ShowSettingsUtil.getInstance().showSettingsDialog(project, "TestMe Templates");
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/ui/template/ExportableFileTemplateSettings.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.ui.template;
2 |
3 | import com.intellij.openapi.components.State;
4 | import com.intellij.openapi.components.Storage;
5 |
6 | /**
7 | * @see com.intellij.ide.fileTemplates.impl.ExportableFileTemplateSettings
8 | */
9 | @State(
10 | name = FileTemplateSettings.FILE_TEMPLATE_SETTINGS,
11 | storages = @Storage(FileTemplateSettings.EXPORTABLE_SETTINGS_FILE),
12 | additionalExportFile = "fileTemplates"
13 | )
14 | class ExportableFileTemplateSettings extends FileTemplateSettings {
15 |
16 | ExportableFileTemplateSettings() {
17 | super(null);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/ui/template/FileTemplateHighlighter.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.ui.template;
2 |
3 | import com.intellij.codeInsight.template.impl.TemplateColors;
4 |
5 |
6 | import com.intellij.lexer.Lexer;
7 | import com.intellij.openapi.editor.colors.TextAttributesKey;
8 | import com.intellij.openapi.fileTypes.SyntaxHighlighterBase;
9 | import com.intellij.psi.tree.IElementType;
10 | import org.jetbrains.annotations.NotNull;
11 |
12 | public class FileTemplateHighlighter extends SyntaxHighlighterBase {
13 | private final Lexer myLexer;
14 |
15 | public FileTemplateHighlighter() {
16 | myLexer = FileTemplateConfigurable.createDefaultLexer();
17 | }
18 |
19 | @NotNull
20 | @Override
21 | public Lexer getHighlightingLexer() {
22 | return myLexer;
23 | }
24 |
25 | @Override
26 | @NotNull
27 | public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
28 | if (tokenType == FileTemplateTokenType.MACRO || tokenType == FileTemplateTokenType.DIRECTIVE) {
29 | return pack(TemplateColors.TEMPLATE_VARIABLE_ATTRIBUTES);
30 | }
31 |
32 | return TextAttributesKey.EMPTY_ARRAY;
33 | }
34 | }
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/ui/template/FileTemplateTextLexer.flex:
--------------------------------------------------------------------------------
1 | /* It's an automatically generated code. Do not modify it. */
2 | package com.intellij.ide.fileTemplates.impl;
3 |
4 | import com.intellij.lexer.FlexLexer;
5 | import com.intellij.psi.tree.IElementType;
6 |
7 | %%
8 |
9 | %{
10 | public _FileTemplateTextLexer() {
11 | this((java.io.Reader)null);
12 | }
13 | %}
14 |
15 | %unicode
16 | %class _FileTemplateTextLexer
17 | %implements FlexLexer
18 | %function advance
19 | %type IElementType
20 |
21 | ALPHA=[A-Za-z_]
22 | DIGIT=[0-9]
23 | MACRO="$"({ALPHA}|{DIGIT})+|"$""{"({ALPHA}|{DIGIT})+"}"|"$"({ALPHA}|{DIGIT})+"$"
24 | DIRECTIVE="#"{ALPHA}+
25 |
26 | %%
27 |
28 | "\\#" { return FileTemplateTokenType.ESCAPE; }
29 | "\\$" { return FileTemplateTokenType.ESCAPE; }
30 | "#[[" { return FileTemplateTokenType.ESCAPE; }
31 | "]]#" { return FileTemplateTokenType.ESCAPE; }
32 | {MACRO} { return FileTemplateTokenType.MACRO; }
33 | {DIRECTIVE} { return FileTemplateTokenType.DIRECTIVE; }
34 | [^] { return FileTemplateTokenType.TEXT; }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/ui/template/FileTemplateTokenType.java:
--------------------------------------------------------------------------------
1 |
2 | package com.weirddev.testme.intellij.ui.template;
3 |
4 | import com.intellij.lang.Language;
5 | import com.intellij.psi.tree.IElementType;
6 |
7 | interface FileTemplateTokenType {
8 | IElementType ESCAPE = new IElementType("ESCAPE", Language.ANY);
9 | IElementType TEXT = new IElementType("TEXT", Language.ANY);
10 | IElementType MACRO = new IElementType("MACRO", Language.ANY);
11 | IElementType DIRECTIVE = new IElementType("DIRECTIVE", Language.ANY);
12 | }
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/utils/AccessLevelReflectionUtils.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.utils;
2 |
3 | import java.lang.reflect.Field;
4 |
5 | /**
6 | * Date: 2/13/2017
7 | *
8 | * @author Yaron Yamin
9 | */
10 | public class AccessLevelReflectionUtils {
11 | public static void replaceField(Field field, Object newValue) throws Exception {
12 | field.setAccessible(true);
13 | field.set(null, newValue);
14 | }
15 | public static Object getField(Field field, Object obj) throws Exception {
16 | field.setAccessible(true);
17 | return field.get(obj);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/utils/Node.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.utils;
2 |
3 | /**
4 | * Date: 05/03/2017
5 | *
6 | * @author Yaron Yamin
7 | */
8 | public class Node {
9 | final private T data;
10 | final private Node parent;
11 | final private int depth;
12 |
13 | public Node(T data, Node parent, int depth) {
14 | this.data = data;
15 | this.parent = parent;
16 | this.depth = depth;
17 | }
18 |
19 | public T getData() {
20 | return data;
21 | }
22 |
23 | public Node getParent() {
24 | return parent;
25 | }
26 |
27 | public int getDepth() {
28 | return depth;
29 | }
30 |
31 | public boolean hasSameAncestor() {
32 | return hasSameAncestor(data);
33 | }
34 | public boolean hasSameAncestor(T data) {
35 | if (parent == null || parent.data==null) {
36 | return false;
37 | } else{
38 | return parent.data.equals(data) || parent.hasSameAncestor(data);
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/utils/TemplateFileNameFormatter.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.utils;
2 |
3 | import java.io.UnsupportedEncodingException;
4 | import java.net.URLDecoder;
5 | import java.net.URLEncoder;
6 | import java.nio.charset.StandardCharsets;
7 |
8 | /**
9 | * @author : Yaron Yamin
10 | * @since : 9/9/20
11 | **/
12 | public class TemplateFileNameFormatter {
13 | public static String templateNameToFile(String name) {
14 | try {
15 | return URLEncoder.encode(name, StandardCharsets.UTF_8.toString());
16 | } catch (UnsupportedEncodingException e) {
17 | throw new RuntimeException("filename char not supported",e);
18 | }
19 | }
20 | public static String filenameToTemplateName(String name) {
21 | try {
22 | return URLDecoder.decode(name, StandardCharsets.UTF_8.toString());
23 | } catch (UnsupportedEncodingException e) {
24 | throw new RuntimeException("filename char not supported",e);
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/utils/TestFileUpdateInfo.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.utils;
2 |
3 | import com.intellij.psi.PsiElement;
4 | import lombok.AllArgsConstructor;
5 | import lombok.Data;
6 |
7 | /**
8 | *
9 | * info to update exist test file
10 | *
11 | * @author huangliang
12 | */
13 | @Data
14 | @AllArgsConstructor
15 | public class TestFileUpdateInfo {
16 |
17 | /**
18 | * parent element of add element
19 | */
20 | private PsiElement parentElement;
21 |
22 | /**
23 | * element add to exist test file
24 | */
25 | private PsiElement addElement;
26 |
27 | /**
28 | * content type of add element; import, field , method
29 | */
30 | private String contentType;
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/weirddev/testme/intellij/utils/TypeUtils.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.utils;
2 |
3 | import com.weirddev.testme.intellij.template.context.MockitoMockBuilder;
4 |
5 | import java.util.Set;
6 |
7 | public class TypeUtils {
8 |
9 | private static final Set BASIC_TYPES;
10 | private static final Set LANGUAGE_BASE_CLASS = Set.of("java.lang.Object", "java.lang.Class", "groovy.lang.GroovyObjectSupport", "java.lang.Enum");
11 |
12 | static {
13 | BASIC_TYPES = MockitoMockBuilder.TYPE_TO_ARG_MATCHERS.keySet();
14 | }
15 | public static boolean isLanguageBaseClass(String typeCanonicalName) {
16 | return typeCanonicalName != null && LANGUAGE_BASE_CLASS.contains(typeCanonicalName);
17 | }
18 |
19 | public static boolean isBasicType(String qualifiedName) {
20 | return BASIC_TYPES.contains(qualifiedName);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/resources/META-INF/plugin-groovy.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/main/resources/META-INF/plugin-scala.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/main/resources/fileTemplates/internal/velocity_implicit.vm:
--------------------------------------------------------------------------------
1 | #* @implicitly included *#
2 | #* @vtlvariable name="TestBuilder" type="com.weirddev.testme.intellij.template.context.TestBuilder" *#
3 | #* @vtlvariable name="StringUtils" type="com.weirddev.testme.intellij.template.context.StringUtils" *#
4 | #* @vtlvariable name="testedClass" type="com.weirddev.testme.intellij.template.context.Type" *#
5 | #* @vtlvariable name="SECOND_NUMERIC" type="java.lang.Integer" *#
6 | #* @vtlvariable name="MINUTE_NUMERIC" type="java.lang.Integer" *#
7 | #* @vtlvariable name="HOUR_NUMERIC" type="java.lang.Integer" *#
8 | #* @vtlvariable name="DAY_NUMERIC" type="java.lang.Integer" *#
9 | #* @vtlvariable name="MONTH_NAME_EN" type="java.lang.String" *#
10 | #* @vtlvariable name="YEAR" type="java.lang.String" *#
11 | #* @vtlvariable name="TestSubjectUtils" type="com.weirddev.testme.intellij.template.context.TestSubjectInspector" *#
12 | #* @vtlvariable name="CLASS_NAME" type="java.lang.String" *#
13 | #* @vtlvariable name="MockitoMockBuilder" type="com.weirddev.testme.intellij.template.context.MockitoMockBuilder" *#
14 | #* @vtlvariable name="PowerMockBuilder" type="com.weirddev.testme.intellij.template.context.PowerMockBuilder" *#
15 | #* /fileTemplates/testMeIncludes/*.ft *#
16 |
--------------------------------------------------------------------------------
/src/main/resources/fileTemplates/testMeIncludes/TestMe Footer.java.ft:
--------------------------------------------------------------------------------
1 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/src/main/resources/fileTemplates/testMeIncludes/TestMe common macros.java.ft:
--------------------------------------------------------------------------------
1 | ################## Global vars ###############
2 | #set($trackedTestMethodsCount={})
3 | ##
4 | ################## Macros #####################
5 | #macro(renderTestMethodName $methodName)
6 | test$StringUtils.capitalizeFirstLetter($methodName)#testMethodSuffix($methodName,"")##
7 | #end
8 | ##
9 | #macro(renderTestMethodNameAsWords $methodName)
10 | $StringUtils.camelCaseToWords($methodName)#testMethodSuffix($methodName," ")##
11 | #end
12 | ##
13 | #macro(testMethodSuffix $methodName, $prefix)
14 | #if( $trackedTestMethodsCount.get($methodName))
15 | #set( $suffix= $trackedTestMethodsCount.get($methodName))
16 | #else
17 | #set( $suffix= 0)
18 | #end
19 | #set( $suffix= $suffix + 1)
20 | #set( $devNull= $trackedTestMethodsCount.put($methodName,$suffix))
21 | #if($suffix!=1)${prefix}${suffix}#end
22 | #end
23 | ##
24 | #macro(renderJavaReturnVar $type)
25 | #if($type && $type.name !="void")$type.canonicalName#if($type.array)[]#end result = #end
26 | #end
27 | ##
--------------------------------------------------------------------------------
/src/main/resources/fileTemplates/velocity.properties:
--------------------------------------------------------------------------------
1 | file.resource.loader.path = ./testMeIncludes/TestMe macros.scala.ft
--------------------------------------------------------------------------------
/src/main/resources/icons/TestMe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wrdv/testme-idea/104fca63481cc4072502d1850a2e2cf4792b6da5/src/main/resources/icons/TestMe.png
--------------------------------------------------------------------------------
/src/main/resources/icons/groovy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wrdv/testme-idea/104fca63481cc4072502d1850a2e2cf4792b6da5/src/main/resources/icons/groovy.png
--------------------------------------------------------------------------------
/src/main/resources/icons/junit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wrdv/testme-idea/104fca63481cc4072502d1850a2e2cf4792b6da5/src/main/resources/icons/junit.png
--------------------------------------------------------------------------------
/src/main/resources/icons/junit5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wrdv/testme-idea/104fca63481cc4072502d1850a2e2cf4792b6da5/src/main/resources/icons/junit5.png
--------------------------------------------------------------------------------
/src/main/resources/icons/junit_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wrdv/testme-idea/104fca63481cc4072502d1850a2e2cf4792b6da5/src/main/resources/icons/junit_dark.png
--------------------------------------------------------------------------------
/src/main/resources/icons/mockito.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wrdv/testme-idea/104fca63481cc4072502d1850a2e2cf4792b6da5/src/main/resources/icons/mockito.png
--------------------------------------------------------------------------------
/src/main/resources/icons/powermock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wrdv/testme-idea/104fca63481cc4072502d1850a2e2cf4792b6da5/src/main/resources/icons/powermock.png
--------------------------------------------------------------------------------
/src/main/resources/icons/scala.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wrdv/testme-idea/104fca63481cc4072502d1850a2e2cf4792b6da5/src/main/resources/icons/scala.png
--------------------------------------------------------------------------------
/src/main/resources/icons/testNG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wrdv/testme-idea/104fca63481cc4072502d1850a2e2cf4792b6da5/src/main/resources/icons/testNG.png
--------------------------------------------------------------------------------
/src/main/resources/intentionDescriptions/CreateTestForMethodIntention/after.java.template:
--------------------------------------------------------------------------------
1 | @Test
2 | public void testFighter() {
3 | String result=foo.fighter("someStr",new Integer(0);
4 | Assert.assertEquals("expectedResult", result)
5 | }
6 |
--------------------------------------------------------------------------------
/src/main/resources/intentionDescriptions/CreateTestForMethodIntention/before.java.template:
--------------------------------------------------------------------------------
1 | public String fighter(String someStr, Integer someNum) {
2 | }
--------------------------------------------------------------------------------
/src/main/resources/intentionDescriptions/CreateTestForMethodIntention/description.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | TestMe: Generate a test method for the selected method.
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/main/resources/intentionDescriptions/CreateTestMeAction/after.java.template:
--------------------------------------------------------------------------------
1 | public class FooTest {
2 |
3 | @Mock FooFighter fooFighter;
4 |
5 | @InjectMocks Foo foo;
6 |
7 | @Test
8 | public void testFighter() {
9 | String result=foo.fighter("someStr",new Integer(0);
10 | Assert.assertEquals("expectedResult", result)
11 | }
12 |
13 | @Before public void initMocks() {
14 | MockitoAnnotations.initMocks(this);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/resources/intentionDescriptions/CreateTestMeAction/before.java.template:
--------------------------------------------------------------------------------
1 | public class Foo {
2 | private FooFighter fooFighter;
3 |
4 | public String fighter(String someStr, Integer someNum) {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/intentionDescriptions/CreateTestMeAction/description.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | TestMe create test
4 |
5 | Generate unit test with TestMe
6 |
7 |
--------------------------------------------------------------------------------
/src/main/resources/messages/TestMeBundle.properties:
--------------------------------------------------------------------------------
1 | testMe.create.title=Test {0} {1} with:
2 | testMe.title.file.templates=Test Templates
3 | testMe.settings.templates.tab.tests=Test Class
4 | testMe.settings.templates.tab.includes=Includes
5 | testMe.settings.templates.create.template=Create Template
6 | testMe.settings.templates.copy.template=Copy Template
7 | testMe.settings.templates.reset.to.default=Reset To Default
8 | testMe.settings.templates.remove.template=Remove Template
9 | testMe.settings.templates.title.edit.file.template=Edit File Template
10 | testMe.settings.templates.title.reset.template=Reset Template
11 | testMe.settings.templates.title.cannot.save.current.template=Cannot Save Current Template
12 | testMe.settings.templates.error.please.specify.template.name=Please specify template name
13 | generate.missed.tests.action.error.not.testable=Method {0} Not Testable
14 | testMe.intention.create.test.dialog.show.inherited=Show &inherited methods
--------------------------------------------------------------------------------
/src/test/groovy/com/weirddev/testme/intellij/generator/TestTemplateContextBuilderTest.groovy:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.generator
2 |
3 | import com.weirddev.testme.intellij.builder.MethodReferencesBuilder
4 | import org.junit.Test
5 | import org.mockito.Mockito
6 | /**
7 | * Date: 09/12/2016
8 | * @author Yaron Yamin
9 | */
10 | class TestTemplateContextBuilderTest {
11 |
12 | def fields = [:] as Map
13 | def builderFactory = Mockito.mock(MockBuilderFactory)
14 | def methodReferencesBuilder = Mockito.mock(MethodReferencesBuilder)
15 | @Test
16 | void testPopulateDateFieldsSingleDigits() {
17 | new TestTemplateContextBuilder(builderFactory, methodReferencesBuilder).populateDateFields(fields, new GregorianCalendar(2020, 11, 5, 7, 5,3))
18 | assert fields == ["MONTH_NAME_EN":"December", "DAY_NUMERIC":5, "HOUR_NUMERIC":7, "MINUTE_NUMERIC":5, "SECOND_NUMERIC":3]
19 | }
20 | @Test
21 | void testPopulateDateFieldsDoubleDigits() {
22 | new TestTemplateContextBuilder(builderFactory, methodReferencesBuilder).populateDateFields(fields, new GregorianCalendar(2020, 0,25, 22, 45,33))
23 | assert fields == ["MONTH_NAME_EN":"January", "DAY_NUMERIC":25, "HOUR_NUMERIC":22, "MINUTE_NUMERIC":45, "SECOND_NUMERIC":33]
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/test/groovy/com/weirddev/testme/intellij/template/context/LanguageTest.groovy:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.template.context
2 |
3 | import spock.lang.Specification
4 | import spock.lang.Unroll
5 |
6 | /**
7 | * @author : Yaron Yamin
8 | * @since : 7/11/20
9 | * */
10 |
11 | class LanguageTest extends Specification {
12 |
13 | @Unroll
14 | def "safe Value Of where language=#language then expect: #expectedResult"() {
15 | expect:
16 | Language.safeValueOf(language) == expectedResult
17 |
18 | where:
19 | language || expectedResult
20 | "Scala" || Language.Scala
21 | "scala" || Language.Scala
22 | "unknown" || Language.Java
23 | }
24 | }
25 |
26 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/src/test/groovy/com/weirddev/testme/intellij/template/context/TypeTest.groovy:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.template.context
2 |
3 | import com.weirddev.testme.intellij.utils.ClassNameUtils
4 | import org.junit.Test
5 |
6 | /**
7 | * Date: 11/7/2016
8 | * @author Yaron Yamin
9 | */
10 | class TypeTest{
11 |
12 | @Test
13 | void testComplexGenericTypeCreation() {
14 | assert new Type("java.util.Map", "Map", "java.util", false, false, false, false, 0, false, null)== typeFromCanonicalName("java.util.Map>")
15 | }
16 | @Test
17 | void testGenericTypeCreation() {
18 | assert new Type("java.util.Set", "Set", "java.util", false, false, false, false, 0, false, null)== typeFromCanonicalName("java.util.Set")
19 | }
20 |
21 | static Type typeFromCanonicalName(String canonicalName) {
22 | return new Type(ClassNameUtils.extractContainerType(canonicalName), ClassNameUtils.extractClassName(canonicalName), ClassNameUtils.extractPackageName(canonicalName),false, false,false, ClassNameUtils.isArray(canonicalName), ClassNameUtils.arrayDimensions(canonicalName), ClassNameUtils.isVarargs(canonicalName),null);
23 | }
24 |
25 | }
--------------------------------------------------------------------------------
/src/test/java/com/weirddev/testme/intellij/generator/OptionalPluginTestDependency.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.generator;
2 |
3 | /**
4 | * Date: 25/12/2017
5 | *
6 | * @author Yaron Yamin
7 | */
8 | public enum OptionalPluginTestDependency {
9 | Groovy("org.jetbrains.plugins.groovy.GroovyLanguage","enableIdeaGroovyPlugin"),
10 | Scala("org.jetbrains.plugins.scala.ScalaLanguage","enableIdeaScalaPlugin");
11 |
12 | private String classId;
13 | private String buildProperty;
14 |
15 | OptionalPluginTestDependency(String classId, String buildProperty) {
16 | this.classId = classId;
17 | this.buildProperty = buildProperty;
18 | }
19 |
20 | public String getClassId() {
21 | return classId;
22 | }
23 |
24 | public String getBuildProperty() {
25 | return buildProperty;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/test/java/com/weirddev/testme/intellij/generator/TestMeGeneratorSpockParameterizedTest.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.generator;
2 |
3 | import com.weirddev.testme.intellij.template.TemplateRegistry;
4 | import com.weirddev.testme.intellij.template.context.Language;
5 |
6 | /**
7 | * Date: 09/11/2017
8 | *
9 | * @author Yaron Yamin
10 | */
11 | public class TestMeGeneratorSpockParameterizedTest extends TestMeGeneratorTestBase {
12 |
13 | public TestMeGeneratorSpockParameterizedTest() {
14 | super(TemplateRegistry.SPOCK_PARAMETERIZED_MOCKITO_GROOVY_TEMPLATE, "testSpockParameterized", Language.Groovy);
15 | expectedTestClassExtension = "groovy";
16 | skipTestIfGroovyPluginDisabled();
17 | }
18 | // public void testBean() throws Exception{
19 | // doTest();
20 | // }
21 | // public void testCtorOverProps() throws Exception{
22 | // doTest(true,true,true);
23 | // }
24 |
25 | public void testGenerics() throws Exception{
26 | doTest(true,true,true);
27 | }
28 | // public void testMockReturned() throws Exception {
29 | // doTest(new FileTemplateConfig());
30 | // }
31 | }
32 |
--------------------------------------------------------------------------------
/testData/commonSrc/DeadOrAlive.java:
--------------------------------------------------------------------------------
1 | /** Test input class*/
2 | public class DeadOrAlive{
3 |
4 | }
--------------------------------------------------------------------------------
/testData/commonSrc/Fire.java:
--------------------------------------------------------------------------------
1 | /** Test input class*/
2 | public class Fire {
3 | public String toString(){
4 | return "great balls of";
5 | }
6 | }
--------------------------------------------------------------------------------
/testData/commonSrc/Flames.java:
--------------------------------------------------------------------------------
1 | /** Test input class*/
2 | public class Flames{
3 |
4 | }
--------------------------------------------------------------------------------
/testData/commonSrc/Hunter.java:
--------------------------------------------------------------------------------
1 |
2 | import com.example.foes.Pokemon;
3 |
4 | /** Test input class*/
5 | public interface Hunter {
6 | DeadOrAlive hunt(Pokemon pokey);
7 | }
--------------------------------------------------------------------------------
/testData/commonSrc/HunterImpl.java:
--------------------------------------------------------------------------------
1 | import com.example.foes.Pokemon;
2 |
3 |
4 | /** Test input class*/
5 | public class HunterImpl implements Hunter {
6 | @Override
7 | public DeadOrAlive hunt(Pokemon pokey) {
8 | return new DeadOrAlive();
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/SelfReferringType.java:
--------------------------------------------------------------------------------
1 | package com.example;
2 |
3 | import java.util.Arrays;
4 | import java.util.List;
5 |
6 | /**
7 | * Created by Admin on 10/31/2017.
8 | */
9 |
10 | public enum SelfReferringType {
11 | ONE,
12 | TWO,
13 | THREE;
14 |
15 | private static List firstTwo = Arrays.asList(ONE,TWO);
16 |
17 | public List getFirstTwo() {
18 | return firstTwo;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/beans/BeanThere.java:
--------------------------------------------------------------------------------
1 | package com.example.beans;
2 |
3 | import com.example.services.impl.DoneThat;
4 | import com.example.services.impl.Many;
5 |
6 | /**
7 | * Created by Yaron Yamin on 24/11/2016.
8 | */
9 | public class BeanThere {
10 | public BeanThere() {
11 | }
12 | public BeanThere(DoneThat doneThat, Many times) {
13 | }
14 | BeanThere(DoneThat doneThat, Many times,String notInMyHood) {
15 | }
16 | public BeanThere(Many times) {
17 | }
18 | public BeanThere(int times) {
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/beans/BigBean.java:
--------------------------------------------------------------------------------
1 | package com.example.beans;
2 |
3 | import com.example.services.impl.DoneThat;
4 | import com.example.services.impl.Many;
5 |
6 | /**
7 | *
8 | * Created by Yaron Yamin on 24/11/2016.
9 | */
10 | public class BigBean {
11 | DoneThat doneThat;
12 | Many times;
13 | DoneThat too;
14 | String doIKnowYou;
15 |
16 | public BigBean(String andThere) {
17 | }
18 | public BigBean(DoneThat doneThat) {
19 | }
20 | public BigBean(DoneThat doneThat, Many times, DoneThat too) {
21 | this.doneThat = doneThat;
22 | this.times = times;
23 | this.too = too;
24 | }
25 | protected BigBean(DoneThat doneThat, Many times, DoneThat too,String doIKnowYou) {
26 | }
27 | public BigBean(DoneThat doneThat,Many times) {
28 | }
29 |
30 | public void setTimes(Many times) {
31 | this.times = times;
32 | }
33 |
34 | public void setDoIKnowYou(String doIKnowYou) {
35 | this.doIKnowYou = doIKnowYou;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/beans/InheritingBean.java:
--------------------------------------------------------------------------------
1 | package com.example.beans;
2 |
3 | import com.example.foes.Fear;
4 | import com.example.foes.Fire;
5 | import com.example.foes.Ice;
6 |
7 | import java.util.Date;
8 |
9 | /** Test input class*/
10 | public class InheritingBean extends JavaBean {
11 | }
12 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/beans/Result.java:
--------------------------------------------------------------------------------
1 | package com.example.beans;
2 |
3 | public class Result {
4 | private T result;
5 |
6 | public Result(T result) {
7 | this.result = result;
8 | }
9 |
10 | public T getResult() {
11 | return result;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/beans/ResultPage.java:
--------------------------------------------------------------------------------
1 | package com.example.beans;
2 |
3 | import java.util.List;
4 |
5 | public class ResultPage {
6 | private int pages;
7 | private List results;
8 |
9 | public ResultPage(int pages, List results) {
10 | this.pages = pages;
11 | this.results = results;
12 | }
13 |
14 | public int getPages() {
15 | return pages;
16 | }
17 |
18 | public List getResults() {
19 | return results;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/beans/Spiral.java:
--------------------------------------------------------------------------------
1 | package com.example.beans;
2 |
3 | /** Test input class*/
4 | public class Spiral {
5 | String moon;
6 | private int rings;
7 |
8 | public void setMoon(String moon) {
9 | this.moon = moon;
10 | }
11 |
12 | public void setRings(int rings) {
13 | this.rings = rings;
14 | }
15 |
16 | public static class Circle{
17 | String aCircleInASpiral;
18 |
19 | public Circle(String aCircleInASpiral) {
20 | this.aCircleInASpiral = aCircleInASpiral;
21 | }
22 | }
23 | public static class Wheel{
24 | String neverEnding;
25 | private boolean orBeginning;
26 |
27 | public Wheel(String neverEnding,boolean orBeginning) {
28 | this.neverEnding = neverEnding;
29 | this.orBeginning = orBeginning;
30 | }
31 | public class WheelWithinAWheel{
32 | String everSpinningReel;
33 |
34 | public WheelWithinAWheel(String everSpinningReel) {
35 | this.everSpinningReel = everSpinningReel;
36 | }
37 | }
38 | }
39 |
40 | @Override
41 | public String toString() {
42 | return "Spiral{" +
43 | "moon='" + moon + '\'' +
44 | ", rings=" + rings +
45 | '}';
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/common/LogSupport.scala:
--------------------------------------------------------------------------------
1 | package com.example.common
2 |
3 | import java.util.logging.Logger
4 |
5 | /**
6 | * Date: 13/07/2018
7 | *
8 | * @author Yaron Yamin
9 | */
10 | trait LogSupport {
11 | lazy val logger: Logger = Logger.getLogger(this.getClass.getCanonicalName)
12 | }
13 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/dependencies/AbstractParent.java:
--------------------------------------------------------------------------------
1 | package com.example.dependencies;
2 |
3 | /**
4 | * Created by Admin on 02/03/2017.
5 | */
6 | public abstract class AbstractParent implements MasterInterface{
7 | @Override
8 | public void intMethod() {
9 | System.out.println(imAbstract());
10 | System.out.println("implemented in abstract");
11 | }
12 |
13 | public abstract String imAbstract();
14 | }
15 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/dependencies/Logger.java:
--------------------------------------------------------------------------------
1 | package com.example.dependencies;
2 |
3 | /**
4 | * Created by Admin on 10/31/2017.
5 | */
6 | public interface Logger {
7 | public void trace(String msg);
8 | }
9 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/dependencies/MasterInterface.java:
--------------------------------------------------------------------------------
1 | package com.example.dependencies;
2 |
3 | /**
4 | * Created by Admin on 02/03/2017.
5 | */
6 | public interface MasterInterface {
7 | void intMethod();
8 | }
9 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/dependencies/SelfishService.java:
--------------------------------------------------------------------------------
1 | package com.example.dependencies;
2 |
3 | import com.example.SelfReferringType;
4 |
5 | /**
6 | * Created by Admin on 10/31/2017.
7 | */
8 | public interface SelfishService {
9 | SelfReferringType getSelfishType();
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/dependencies/TimeMachine.scala:
--------------------------------------------------------------------------------
1 | package com.example.dependencies
2 |
3 | import scala.concurrent.Future
4 |
5 | /**
6 | * Date: 16/07/2018
7 | *
8 | * @author Yaron Yamin
9 | */
10 | class TimeMachine {
11 | def lookInto():Future[Double]=Future.successful(12.343)
12 | }
13 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/foes/Ace.java:
--------------------------------------------------------------------------------
1 | package com.example.foes;
2 |
3 | import java.util.Arrays;
4 |
5 | /**
6 | * Created by Admin on 07/03/2017.
7 | */
8 | public class Ace {
9 |
10 | private final Ice[] ofSpades;
11 |
12 | public Ace(Ice... ofSpades){
13 | this.ofSpades = ofSpades;
14 | }
15 |
16 | @Override
17 | public String toString() {
18 | return "Ace{" +
19 | "ofSpades=" + Arrays.toString(ofSpades) +
20 | '}';
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/foes/BeanDependsOnInterface.java:
--------------------------------------------------------------------------------
1 | package com.example.foes;
2 |
3 | import com.example.dependencies.MasterInterface;
4 | /**
5 | * Created by Admin on 07/03/2017.
6 | */
7 | public class BeanDependsOnInterface {
8 |
9 | private final MasterInterface master;
10 |
11 | public BeanDependsOnInterface(MasterInterface master){
12 | this.master = master;
13 | }
14 |
15 | public String BeanDependsOnInterface() {
16 | return "BeanDependsOnInterface{" +
17 | "master=" + master +
18 | '}';
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/foes/Fear.java:
--------------------------------------------------------------------------------
1 | package com.example.foes;
2 | /** Test input class*/
3 | public class Fear implements Comparable{
4 |
5 | @Override
6 | public int compareTo(Object o) {
7 | return 0;
8 | }
9 |
10 | @Override
11 | public boolean equals(Object obj) {
12 | return true;
13 | }
14 |
15 | @Override
16 | public String toString() {
17 | return "Fear{}";
18 | }
19 | }
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/foes/Fire.java:
--------------------------------------------------------------------------------
1 | package com.example.foes;
2 | /** Test input class*/
3 | public class Fire{
4 |
5 | private String location = "in da house";
6 |
7 | public String toString(){
8 | return location;
9 | }
10 |
11 | @Override
12 | public boolean equals(Object o) {
13 | if (this == o) return true;
14 | if (o == null || getClass() != o.getClass()) return false;
15 |
16 | Fire fire = (Fire) o;
17 |
18 | return !(location != null ? !location.equals(fire.location) : fire.location != null);
19 |
20 | }
21 |
22 | @Override
23 | public int hashCode() {
24 | return location != null ? location.hashCode() : 0;
25 | }
26 | }
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/foes/FireBall.java:
--------------------------------------------------------------------------------
1 | package com.example.foes;
2 |
3 | import com.example.beans.JavaBean;
4 |
5 | /** Test input class*/
6 | public class FireBall implements Comparable{
7 |
8 | private String message = "great balls of";
9 | JavaBean javaBean;
10 | public String toString(){
11 | return message;
12 | }
13 |
14 | public JavaBean getJavaBean() {
15 | return javaBean;
16 | }
17 |
18 | public FireBall(JavaBean javaBean) {
19 | this.javaBean = javaBean;
20 | }
21 |
22 | @Override
23 | public boolean equals(Object o) {
24 | if (this == o) return true;
25 | if (o == null || getClass() != o.getClass()) return false;
26 |
27 | FireBall fire = (FireBall) o;
28 |
29 | return !(message != null ? !message.equals(fire.message) : fire.message != null);
30 |
31 | }
32 |
33 | @Override
34 | public int hashCode() {
35 | return message != null ? message.hashCode() : 0;
36 | }
37 |
38 | public int compareTo(Object o) {
39 | if (o instanceof FireBall) {
40 | return message.compareTo(((FireBall) o).message);
41 | } else {
42 | return -1;
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/foes/Ice.java:
--------------------------------------------------------------------------------
1 | package com.example.foes;
2 | /** Test input class*/
3 | public class Ice{
4 | public String toString(){
5 | return "Vanila";
6 | }
7 |
8 | @Override
9 | public boolean equals(Object obj) {
10 | return true;
11 | }
12 | }
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/foes/Pokemon.java:
--------------------------------------------------------------------------------
1 | package com.example.foes;
2 | /** Test input class*/
3 | public class Pokemon{
4 | public String toString(){
5 | return "I'm pokey";
6 | }
7 | }
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/groovies/Groove.groovy:
--------------------------------------------------------------------------------
1 | package com.example.groovies
2 |
3 | import com.example.beans.JavaBean
4 | import com.example.foes.Ice
5 |
6 | /**
7 | * Created by Admin on 03/03/2017.
8 | */
9 | class Groove {
10 | String someString
11 | Ice ice
12 |
13 | void setSomeString(String someString) {
14 | this.someString = someString
15 | }
16 |
17 | void setIce(Ice ice) {
18 | this.ice = ice
19 | }
20 |
21 | @Override
22 | public String toString() {
23 | return "Groove{" +
24 | "someString='" + someString + '\'' +
25 | ", ice=" + ice +
26 | '}';
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/hole/Fire.java:
--------------------------------------------------------------------------------
1 | package com.example.hole;
2 | /** Test input class*/
3 | public class Fire {
4 | public String toString(){
5 | return "in the hole";
6 | }
7 | }
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/parents/impl/AbstactFoo.java:
--------------------------------------------------------------------------------
1 | package com.example.parents.impl;
2 |
3 | import java.util.Collections;
4 | import java.util.HashMap;
5 | import java.util.List;
6 | import java.util.Map;
7 |
8 | /**
9 | * Created with IntelliJ IDEA.
10 | * User: yaron.yamin
11 | * Date: 7/22/2018
12 | * Time: 4:22 PM
13 | */
14 | public abstract class AbstactFoo
15 | {
16 | public Map u2(){
17 | return new HashMap();
18 | }
19 | public void iNeedU(U u){
20 | System.out.println("Thank "+u);
21 | }
22 | public String iNeedUT(U u,T t){
23 | return u.toString() + toString();
24 | }
25 | public T getMeMyTee(T tee){
26 | return tee;
27 | }
28 | public List getMeMyTees(T tee){
29 | return Collections.singletonList(tee);
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/parents/impl/FooInterface.java:
--------------------------------------------------------------------------------
1 | package com.example.parents.impl;
2 |
3 | import com.example.foes.Fire;
4 |
5 | /**
6 | * Date: 06/11/2016
7 | * @author Yaron Yamin
8 | */
9 | public interface FooInterface{
10 |
11 | String fight(Fire withFire, String foeName);
12 |
13 | String asFather(String asSon);
14 | }
15 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/parents/impl/FooInterfaceExt.java:
--------------------------------------------------------------------------------
1 | package com.example.parents.impl;
2 |
3 | import com.example.foes.Fire;
4 |
5 | /**
6 | * Date: 06/11/2016
7 | * @author Yaron Yamin
8 | */
9 | public interface FooInterfaceExt extends FooInterface{
10 |
11 | String fight(Fire withFire, String foeName);
12 | String asFather(String asSon);
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/parents/impl/FooParent.java:
--------------------------------------------------------------------------------
1 | package com.example.parents.impl;
2 |
3 | import com.example.foes.Fire;
4 | import com.example.foes.Pokemon;
5 | import com.example.warriers.FooFighter;
6 |
7 | /**
8 | * Date: 06/11/2016
9 | * @author Yaron Yamin
10 | */
11 | public class FooParent implements FooInterface{
12 |
13 | private Pokemon pokey;
14 |
15 | private FooFighter fooFighter;
16 |
17 | public String fight(Fire withFire,String foeName) {
18 | return "kids, enough is enough!";
19 | }
20 | protected String fight(String foeName) {
21 | return "who started?";
22 | }
23 |
24 | private String truce(String flag){
25 | return "white " + flag;
26 | }
27 |
28 | void peace(){
29 | System.out.println("No more bloodshed");
30 | }
31 |
32 | @Override
33 | public String asFather(String asSon) {
34 | return asSon;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/scala/CaseClass.scala:
--------------------------------------------------------------------------------
1 | package com.example.scala
2 |
3 | case class CaseClass(i:Int, made:Boolean, my:Double, `case`:String, myName: Option[String], aNestedClass: Option[Nested] = None){
4 | def this(str:String)= this(1,true,2.23,str)
5 | }
6 |
7 | case class Nested(arg:Option[String])
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/scala/DayInAWeek.scala:
--------------------------------------------------------------------------------
1 | package com.example.scala
2 |
3 | /**
4 | * Date: 17/08/2018
5 | *
6 | * @author Yaron Yamin
7 | */
8 | object DayInAWeek {
9 | sealed trait EnumVal
10 | case object Mon extends EnumVal
11 | case object Tue extends EnumVal
12 | case object Wed extends EnumVal
13 | case object Thu extends EnumVal
14 | case object Fri extends EnumVal
15 | val daysOfWeek = Seq(Mon, Tue, Wed, Thu, Fri)
16 | }
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/scala/Planet.scala:
--------------------------------------------------------------------------------
1 | package com.example.scala
2 |
3 | /**
4 | * Created with IntelliJ IDEA.
5 | * User: yaron.yamin
6 | * Date: 8/9/2018
7 | * Time: 4:26 PM
8 | */
9 | //Reference: https://www.scala-lang.org/api/2.12.6/scala/Enumeration.html
10 | object Planet extends Enumeration {
11 | protected case class Val(mass: Double, radius: Double) extends super.Val {
12 | def surfaceGravity: Double = Planet.G * mass / (radius * radius)
13 | def surfaceWeight(otherMass: Double): Double = otherMass * surfaceGravity
14 | }
15 | implicit def valueToPlanetVal(x: Value): Val = x.asInstanceOf[Val]
16 |
17 | val G: Double = 6.67300E-11
18 | val Mercury = Val(3.303e+23, 2.4397e6)
19 | val Venus = Val(4.869e+24, 6.0518e6)
20 | val Earth = Val(5.976e+24, 6.37814e6)
21 | val Mars = Val(6.421e+23, 3.3972e6)
22 | val Jupiter = Val(1.9e+27, 7.1492e7)
23 | val Saturn = Val(5.688e+26, 6.0268e7)
24 | val Uranus = Val(8.686e+25, 2.5559e7)
25 | val Neptune = Val(1.024e+26, 2.4746e7)
26 | }
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/scala/WeekDay.scala:
--------------------------------------------------------------------------------
1 | package com.example.scala
2 |
3 | /**
4 | * Created with IntelliJ IDEA.
5 | * User: yaron.yamin
6 | * Date: 8/9/2018
7 | * Time: 4:24 PM
8 | */
9 | //Reference: https://www.scala-lang.org/api/2.12.6/scala/Enumeration.html
10 | object WeekDay extends Enumeration {
11 | type WeekDay = Value
12 | val Mon, Tue, Wed, Thu, Fri, Sat, Sun = Value
13 | }
14 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/services/FooType.java:
--------------------------------------------------------------------------------
1 | package com.example.services;
2 |
3 | /**
4 | * Created by Yaron Yamin on 18/11/2016.
5 | */
6 | public enum FooType {
7 | }
8 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/services/Result.java:
--------------------------------------------------------------------------------
1 | package com.example.services;
2 |
3 | /**
4 | * Created by Yaron Yamin on 18/11/2016.
5 | */
6 | public enum Result {
7 | WinWin,Victory,Defeat,Draw
8 | }
9 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/services/impl/FooBro.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | /**
4 | * Created by Admin on 07/05/2017.
5 | */
6 | class FooBro {
7 | String propInSamePackage
8 | int iCanBeAccessedDirectly
9 | int antoherDirectlyAccessedInt
10 | Date anotherProp
11 |
12 | Date getAnotherProp() {
13 | return anotherProp
14 | }
15 |
16 | void setAnotherProp(Date anotherProp) {
17 | this.anotherProp = anotherProp
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/services/impl/FooConverterAbs.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.ConvertedBean;
4 | import com.example.beans.JavaBean;
5 | import com.example.foes.Fire;
6 |
7 | /**
8 | * Created by Admin on 21/04/2017.
9 | */
10 | public class FooConverterAbs {
11 | public ConvertedBean convert(Fire withFire, String foeName, JavaBean javaBean) {
12 | ConvertedBean convertedBean = new ConvertedBean();
13 | convertedBean.setFear(javaBean.getFear());
14 | return convertedBean;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/util/FooUtils.java:
--------------------------------------------------------------------------------
1 | package com.example.util;
2 |
3 | import com.example.beans.JavaBean;
4 |
5 | /**
6 | * Created by Admin on 21/04/2017.
7 | */
8 | public class FooUtils {
9 | public static String callPooh(JavaBean javaBean) {
10 | return "Wheres my Honey ?" + javaBean.getSomeNum();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/util/List.java:
--------------------------------------------------------------------------------
1 | package com.example.util;
2 |
3 | /**
4 | * Created by Yaron Yamin on 18/11/2016.
5 | */
6 | public class List {
7 | }
8 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/warriers/FearFighter.java:
--------------------------------------------------------------------------------
1 | package com.example.warriers;
2 |
3 | import com.example.foes.Fear;
4 |
5 | /** Test input class*/
6 | public interface FearFighter {
7 | String fight(Fear urFear);
8 | }
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/warriers/FooFighter.java:
--------------------------------------------------------------------------------
1 | package com.example.warriers;
2 |
3 | import com.example.beans.ConvertedBean;
4 | import com.example.foes.Fear;
5 | import com.example.foes.Fire;
6 | import com.example.foes.Ice;
7 |
8 | /** Test input class*/
9 | public interface FooFighter {
10 | String fight(Fire withFire);
11 | ConvertedBean surrender(Fear fear, Ice ice,int times);
12 | }
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/warriers/TechFighter.java:
--------------------------------------------------------------------------------
1 | package com.example.warriers;
2 |
3 | import com.example.beans.ConvertedBean;
4 | import com.example.foes.Fear;
5 | import com.example.foes.Fire;
6 | import com.example.foes.Ice;
7 |
8 | /** Test input class*/
9 | public interface TechFighter {
10 | void initSelfArming(String weapon)
11 | String fight(Fire withFire);
12 | ConvertedBean surrender(Fear fear, Ice ice,int times);
13 | }
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/warriers/impl/FearFighterImpl.java:
--------------------------------------------------------------------------------
1 | package com.example.warriers.impl;
2 |
3 | import com.example.warriers.FearFighter;
4 | import com.example.foes.Fear;
5 |
6 | /** Test input class*/
7 | public class FearFighterImpl implements FearFighter {
8 | @Override
9 | public String fight(Fear urFear) {
10 | return "nofear";
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/warriers/impl/FinalCountdown.java:
--------------------------------------------------------------------------------
1 | package com.example.warriers.impl;
2 |
3 | import java.math.BigDecimal;
4 |
5 | /**
6 | * Created by Admin on 05/09/2017.
7 | */
8 | public final class FinalCountdown {
9 | public BigDecimal count(Integer start) {
10 | return new BigDecimal(start + 1);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/warriers/impl/FooFighterImpl.java:
--------------------------------------------------------------------------------
1 | package com.example.warriers.impl;
2 |
3 | import com.example.beans.ConvertedBean;
4 | import com.example.foes.Fear;
5 | import com.example.foes.Fire;
6 | import com.example.foes.Ice;
7 | import com.example.warriers.FooFighter;
8 |
9 | /** Test input class*/
10 | public class FooFighterImpl implements FooFighter {
11 | @Override
12 | public String fight(Fire withFire) {
13 | return "flames";
14 | }
15 |
16 | @Override
17 | public ConvertedBean surrender(Fear fear, Ice ice,int times) {
18 | System.out.println("times:" + times);
19 | System.out.println("fear:" + fear.toString());
20 | return new ConvertedBean();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/testData/commonSrc/com/example/warriers/impl/TechFighterImpl.java:
--------------------------------------------------------------------------------
1 | package com.example.warriers.impl;
2 |
3 | import com.example.beans.ConvertedBean;
4 | import com.example.foes.Fear;
5 | import com.example.foes.Fire;
6 | import com.example.foes.Ice;
7 | import com.example.warriers.TechFighter;
8 |
9 | /** Test input class*/
10 | public class TechFighterImpl implements TechFighter {
11 |
12 | private String weapon;
13 |
14 | @Override
15 | public String fight(Fire withFire) {
16 | return "flames";
17 | }
18 |
19 | @Override
20 | public ConvertedBean surrender(Fear fear, Ice ice,int times) {
21 | System.out.println("times:" + times);
22 | System.out.println("fear:" + fear.toString());
23 | return new ConvertedBean();
24 | }
25 |
26 | @Override
27 | public void initSelfArming(String weapon) {
28 | this.weapon = weapon;
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/testData/commonSrc/javax/inject/Inject.java:
--------------------------------------------------------------------------------
1 | package javax.inject;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Retention;
6 | import java.lang.annotation.RetentionPolicy;
7 | import java.lang.annotation.Target;
8 |
9 | @Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD})
10 | @Retention(RetentionPolicy.RUNTIME)
11 | @Documented
12 | public @interface Inject {
13 | }
--------------------------------------------------------------------------------
/testData/commonSrc/javax/inject/Singleton.java:
--------------------------------------------------------------------------------
1 | package javax.inject;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Retention;
6 | import java.lang.annotation.RetentionPolicy;
7 | import java.lang.annotation.Target;
8 |
9 | @Target({ElementType.TYPE})
10 | @Documented
11 | @Retention(RetentionPolicy.RUNTIME)
12 | public @interface Singleton {
13 | }
--------------------------------------------------------------------------------
/testData/testMeAdditionalAction/innerClass/test/com/example/services/impl/PublicInnerClassTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import org.junit.Test;
4 |
5 | /**
6 | * created by TestMe integration test on MMXVI
7 | */
8 | public class PublicInnerClassTest {
9 | Foo.PublicInnerClass publicInnerClass = new Foo().new PublicInnerClass();
10 |
11 | @Test
12 | public void testMethodOfInnerClass() throws Exception {
13 | publicInnerClass.methodOfInnerClass();
14 | }
15 | }
16 |
17 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeAdditionalAction/innerOfInnerClass/test/com/example/services/impl/InnerOfInnerClassTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import org.junit.Test;
4 |
5 | /**
6 | * created by TestMe integration test on MMXVI
7 | */
8 | public class InnerOfInnerClassTest {
9 | Foo.InnerClass.InnerOfInnerClass innerOfInnerClass = new Foo().new InnerClass("propOfInner").new InnerOfInnerClass("propOfInnerOfInner");
10 |
11 | @Test
12 | public void testMethodOfInnerClass() throws Exception {
13 | innerOfInnerClass.methodOfInnerClass();
14 | }
15 | }
16 |
17 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeAdditionalAction/innerOfInnerStaticClass/test/com/example/services/impl/InnerOfInnerStaticClassTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import org.junit.Test;
4 |
5 | /**
6 | * created by TestMe integration test on MMXVI
7 | */
8 | public class InnerOfInnerStaticClassTest {
9 | Foo.InnerStaticClass.InnerOfInnerStaticClass innerOfInnerStaticClass = new Foo.InnerStaticClass().new InnerOfInnerStaticClass();
10 |
11 | @Test
12 | public void testMethodOfInnerOfInnerClass() throws Exception {
13 | innerOfInnerStaticClass.methodOfInnerOfInnerClass();
14 | }
15 | }
16 |
17 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeAdditionalAction/innerStaticClass/test/com/example/services/impl/InnerStaticClassTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import org.junit.Test;
4 |
5 | /**
6 | * created by TestMe integration test on MMXVI
7 | */
8 | public class InnerStaticClassTest {
9 | Foo.InnerStaticClass innerStaticClass = new Foo.InnerStaticClass();
10 |
11 | @Test
12 | public void testMethodOfInnerClass() throws Exception {
13 | innerStaticClass.methodOfInnerClass();
14 | }
15 | }
16 |
17 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeAdditionalAction/innerStaticClassWithMember/test/com/example/services/impl/InnerStaticClassWithMemberTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import com.example.warriers.FooFighter;
5 | import org.junit.Assert;
6 | import org.junit.Before;
7 | import org.junit.Test;
8 | import org.mockito.InjectMocks;
9 | import org.mockito.Mock;
10 | import org.mockito.MockitoAnnotations;
11 |
12 | import static org.mockito.Mockito.*;
13 |
14 | /**
15 | * created by TestMe integration test on MMXVI
16 | */
17 | public class InnerStaticClassWithMemberTest {
18 | @Mock
19 | FooFighter innerFooFighter;
20 | @InjectMocks
21 | Foo.InnerStaticClassWithMember innerStaticClassWithMember;
22 |
23 | @Before
24 | public void setUp() {
25 | MockitoAnnotations.initMocks(this);
26 | }
27 |
28 | @Test
29 | public void testMethodOfInnerClass() throws Exception {
30 | when(innerFooFighter.fight(any(Fire.class))).thenReturn("fightResponse");
31 |
32 | String result = innerStaticClassWithMember.methodOfInnerClass(new Fire());
33 | Assert.assertEquals("replaceMeWithExpectedResult", result);
34 | }
35 | }
36 |
37 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeAdditionalAction/innerStaticOfInnerStaticClass/test/com/example/services/impl/InnerStaticOfInnerStaticClassTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import org.junit.Test;
4 |
5 | /**
6 | * created by TestMe integration test on MMXVI
7 | */
8 | public class InnerStaticOfInnerStaticClassTest {
9 | Foo.InnerStaticClass.InnerStaticOfInnerStaticClass innerStaticOfInnerStaticClass = new Foo.InnerStaticClass.InnerStaticOfInnerStaticClass();
10 |
11 | @Test
12 | public void testMethodOfInnerOfInnerClass() throws Exception {
13 | innerStaticOfInnerStaticClass.methodOfInnerOfInnerClass();
14 | }
15 | }
16 |
17 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/arrays/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.warriers.FooFighter;
4 | import com.example.foes.Fire;
5 |
6 | public class Foo{
7 |
8 | private FooFighter[] fooFighter;
9 |
10 | public String[] fight(Fire[] withFire,String[] foeName, int[ ] times) {
11 | return new String[]{fooFighter[0].fight(withFire[0])};
12 | }
13 | public Fire[] fireStarter(String[] foeName, int[ ] times) {
14 | return new Fire[]{new Fire()};
15 | }
16 | public int[] fireCounter(Fire[] fires) {
17 | return new int[]{fires.length};
18 | }
19 |
20 | public String routerSearch(String dstIp, String[][] ipTable){
21 | return ipTable[0][0];
22 | }
23 | public String a3dimSearch(String dstIp, String[][][] ipTable){
24 | return ipTable[0][0][0];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/arrays/testSpecs2/com/example/services/impl/FooTest.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.foes.Fire
4 | import org.specs2.mutable.Specification
5 | /** created by TestMe integration test on MMXVI */
6 | class FooTest extends Specification {
7 | val foo = new Foo()
8 |
9 | "Foo" should {
10 |
11 | "fight" in {
12 | val result = foo.fight(Array(new Fire()), Array("foeName"), Array(1))
13 | result === Array("replaceMeWithExpectedResult")
14 | }
15 |
16 | "fire Starter" in {
17 | val result = foo.fireStarter(Array("foeName"), Array(1))
18 | result === Array(new Fire())
19 | }
20 |
21 | "fire Counter" in {
22 | val result = foo.fireCounter(Array(new Fire()))
23 | result === Array(1)
24 | }
25 |
26 | "router Search" in {
27 | val result = foo.routerSearch("dstIp", Array(Array("ipTable")))
28 | result === "replaceMeWithExpectedResult"
29 | }
30 |
31 | "a3dim Search" in {
32 | val result = foo.a3dimSearch("dstIp", Array(Array(Array("ipTable"))))
33 | result === "replaceMeWithExpectedResult"
34 | }
35 |
36 | }
37 | }
38 |
39 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/avoidInfiniteRecursionSelfReferences/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.dependencies.SelfishService;
4 |
5 | /**
6 | * Testing dependency containing reference to a type that has internal references to himself. motivation: verify there's no infinite recursion issues
7 | */
8 | public class Foo{
9 |
10 | private SelfishService selfishService;
11 |
12 | /**
13 | * verify tested method is generated for this - method is not mistakenly identified as a getter
14 | */
15 | public String getSelf() {
16 | return selfishService.getSelfishType().toString();
17 | }
18 | public String doSelf() {
19 | return selfishService.getSelfishType().toString();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/avoidInfiniteRecursionSelfReferences/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.SelfReferringType
4 | import com.example.dependencies.SelfishService
5 | import org.junit.Test
6 | import org.junit.Before
7 | import org.mockito.InjectMocks
8 | import org.mockito.Mock
9 | import org.mockito.MockitoAnnotations
10 | import static org.mockito.Mockito.*
11 |
12 | /** created by TestMe integration test on MMXVI */
13 | class FooTest {
14 | @Mock
15 | SelfishService selfishService
16 | @InjectMocks
17 | Foo foo
18 |
19 | @Before
20 | void setUp() {
21 | MockitoAnnotations.initMocks(this)
22 | }
23 |
24 | @Test
25 | void testGetSelf() {
26 | when(selfishService.getSelfishType()).thenReturn(SelfReferringType.ONE)
27 |
28 | String result = foo.getSelf()
29 | assert result == "replaceMeWithExpectedResult"
30 | }
31 |
32 | @Test
33 | void testDoSelf() {
34 | when(selfishService.getSelfishType()).thenReturn(SelfReferringType.ONE)
35 |
36 | String result = foo.doSelf()
37 | assert result == "replaceMeWithExpectedResult"
38 | }
39 | }
40 |
41 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/bean/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.JavaBean;
4 | import com.example.dependencies.ChildWithSetters;
5 | import com.example.foes.FireBall;
6 | import com.example.warriers.FooFighter;
7 | import com.example.foes.Fire;
8 |
9 | public class Foo{
10 |
11 | private FooFighter fooFighter;
12 |
13 | public JavaBean fight(Fire withFire, FireBall fireBall, JavaBean javaBean) {
14 | fooFighter.fight(withFire);
15 | return fireBall.getJavaBean();
16 | }
17 |
18 | public ChildWithSetters fight(ChildWithSetters childWithSetters) {
19 | System.out.println(childWithSetters.toString());
20 | return childWithSetters;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/bean/testSpecs2/com/example/services/impl/FooTest.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.specs2.mutable.Specification
4 |
5 | /** created by TestMe integration test on MMXVI */
6 | class FooTest extends Specification {
7 | val foo = new Foo()
8 |
9 | "Foo" should {
10 |
11 | "fight" in {
12 | val result = foo.fight(new com.example.foes.Fire(), new com.example.foes.FireBall(new com.example.beans.JavaBean()), new com.example.beans.JavaBean())
13 | result === new com.example.beans.JavaBean()
14 | }
15 |
16 | "fight 2" in {
17 | val result = foo.fight(new com.example.dependencies.ChildWithSetters())
18 | result === new com.example.dependencies.ChildWithSetters()
19 | }
20 |
21 | }
22 | }
23 |
24 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/constants/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.warriers.FooFighter;
4 | import com.example.foes.Fire;
5 |
6 | public class Foo{
7 |
8 | public static final String CONSTANTINUS = "CONSTANTINUS";
9 | public final int COUNTDOWN= 10;
10 | public int ONE= 1;
11 | public String MUTABLE = "MUTABLE";
12 | public String MUTABLE_INITIALIZED_IN_CTOR;
13 | public String MUTABLE_INITIALIZED_IN_DEFAULT_CTOR;
14 |
15 | public Foo(String MUTABLE_INITIALIZED_IN_CTOR) {
16 | this.MUTABLE_INITIALIZED_IN_CTOR = MUTABLE_INITIALIZED_IN_CTOR;
17 | }
18 | public Foo() {
19 | this.MUTABLE_INITIALIZED_IN_DEFAULT_CTOR = "Initialized";
20 | }
21 |
22 | private FooFighter fooFighter;
23 |
24 | public String fight(Fire withFire,String foeName) {
25 | return fooFighter.fight(withFire);
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/constants/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import org.junit.Assert;
4 | import org.junit.Test;
5 | import org.junit.Before;
6 | import org.mockito.InjectMocks;
7 | import org.mockito.Mock;
8 | import org.mockito.MockitoAnnotations;
9 |
10 | import static org.mockito.Mockito.*;
11 |
12 | /**
13 | * created by TestMe integration test on MMXVI
14 | */
15 | public class FooTest {
16 | @Mock
17 | com.example.warriers.FooFighter fooFighter;
18 | @InjectMocks
19 | Foo foo;
20 |
21 | @Before
22 | public void setUp() {
23 | MockitoAnnotations.initMocks(this);
24 | }
25 |
26 | @Test
27 | public void testFight() throws Exception {
28 | String result = foo.fight(new com.example.foes.Fire(), "foeName");
29 | Assert.assertEquals("replaceMeWithExpectedResult", result);
30 | }
31 | }
32 |
33 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/constants/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.junit.Test
4 | import org.junit.Before
5 | import org.mockito.InjectMocks
6 | import org.mockito.Mock
7 | import org.mockito.MockitoAnnotations
8 | import static org.mockito.Mockito.*
9 |
10 | /** created by TestMe integration test on MMXVI */
11 | class FooTest {
12 | @Mock
13 | com.example.warriers.FooFighter fooFighter
14 | @InjectMocks
15 | com.example.services.impl.Foo foo
16 |
17 | @Before
18 | void setUp() {
19 | MockitoAnnotations.initMocks(this)
20 | }
21 |
22 | @Test
23 | void testFight() {
24 | java.lang.String result = foo.fight(new com.example.foes.Fire(), "foeName")
25 | assert result == "replaceMeWithExpectedResult"
26 | }
27 | }
28 |
29 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/constants/testSpecs2/com/example/services/impl/FooTest.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.foes.Fire
4 | import org.specs2.mutable.Specification
5 |
6 | /** created by TestMe integration test on MMXVI */
7 | class FooTest extends Specification {
8 | val foo = new Foo("MUTABLE_INITIALIZED_IN_CTOR")
9 |
10 | "Foo" should {
11 |
12 | "fight" in {
13 | val result = foo.fight(new Fire(), "foeName")
14 | result === "replaceMeWithExpectedResult"
15 | }
16 |
17 | }
18 | }
19 |
20 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/constructors/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.warriers.FooFighter;
4 | import com.example.foes.Fire;
5 |
6 | public class Foo{
7 |
8 | private FooFighter fooFighter;
9 |
10 | private String numFive="55555";
11 |
12 | public String fight(Fire withFire,String foeName) {
13 | System.out.println("I am number "+numFive.length());
14 | return fooFighter.fight(withFire);
15 | }
16 |
17 | public Foo(FooFighter fooFighter,String numFive){
18 | this.fooFighter=fooFighter;
19 | this.numFive=numFive;
20 | }
21 | public Foo(FooFighter fooFighter){
22 | this.fooFighter=fooFighter;
23 | this.numFive=numFive;
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/constructors/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import org.junit.Assert;
4 | import org.junit.Test;
5 | import org.junit.Before;
6 | import org.mockito.InjectMocks;
7 | import org.mockito.Mock;
8 | import org.mockito.MockitoAnnotations;
9 |
10 | import static org.mockito.Mockito.*;
11 |
12 | /**
13 | * created by TestMe integration test on MMXVI
14 | */
15 | public class FooTest {
16 | @Mock
17 | com.example.warriers.FooFighter fooFighter;
18 | @InjectMocks
19 | Foo foo;
20 |
21 | @Before
22 | public void setUp() {
23 | MockitoAnnotations.initMocks(this);
24 | }
25 |
26 | @Test
27 | public void testFight() throws Exception {
28 | String result = foo.fight(new com.example.foes.Fire(), "foeName");
29 | Assert.assertEquals("replaceMeWithExpectedResult", result);
30 | }
31 | }
32 |
33 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/constructors/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.junit.Test
4 | import org.junit.Before
5 | import org.mockito.InjectMocks
6 | import org.mockito.Mock
7 | import org.mockito.MockitoAnnotations
8 | import static org.mockito.Mockito.*
9 |
10 | /** created by TestMe integration test on MMXVI */
11 | class FooTest {
12 | @Mock
13 | com.example.warriers.FooFighter fooFighter
14 | @InjectMocks
15 | com.example.services.impl.Foo foo
16 |
17 | @Before
18 | void setUp() {
19 | MockitoAnnotations.initMocks(this)
20 | }
21 |
22 | @Test
23 | void testFight() {
24 | java.lang.String result = foo.fight(new com.example.foes.Fire(), "foeName")
25 | assert result == "replaceMeWithExpectedResult"
26 | }
27 | }
28 |
29 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/ctorOverProps/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.JavaBean;
4 | import com.example.foes.Fire;
5 | import com.example.groovies.ImGroovy;
6 | import com.example.groovies.ImGroovyWithTupleCtor;
7 | import com.example.warriers.FooFighter;
8 |
9 | import java.util.Collection;
10 |
11 | public class Foo {
12 |
13 | private FooFighter fooFighter;
14 |
15 | public Collection find(Collection groovies, ImGroovy theOne) {
16 | System.out.println(theOne);
17 | System.out.println(groovies.toString());
18 | return groovies;
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/ctorOverSetters/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.JavaBean;
4 | import com.example.foes.Fire;
5 | import com.example.groovies.ImGroovy;
6 | import com.example.beans.SettersOverCtors;
7 | import com.example.warriers.FooFighter;
8 |
9 | import java.util.Collection;
10 |
11 | public class Foo {
12 |
13 | private FooFighter fooFighter;
14 |
15 | public Collection find(Collection beans, ImGroovy theOne) {
16 | System.out.println(theOne);
17 | System.out.println(beans.toString());
18 | return beans;
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/ctorWhenNoMocks/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.warriers.FooFighter;
4 | import com.example.foes.Fire;
5 | import com.example.beans.JavaBean;
6 |
7 | public class Foo{
8 |
9 | private final String myString;
10 | private FooFighter[] fooFighter;
11 | private String myHero;
12 | private String thereGoes;
13 |
14 | Foo(String thereGoes,String myHero,JavaBean javaBean) {
15 | this.myHero = myHero;
16 | this.thereGoes = thereGoes;
17 | System.out.println(javaBean);
18 | myString = javaBean.getMyString();
19 | }
20 |
21 | public String fight(Fire[] withFire,String[] foeName, int[ ] times) {
22 | System.out.println(myString);
23 | return thereGoes+" "+myHero+" Watch him as he goes";
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/ctorWhenNoMocks/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.JavaBean;
4 | import com.example.foes.Fire;
5 | import org.junit.Assert;
6 | import org.junit.Test;
7 |
8 | /**
9 | * created by TestMe integration test on MMXVI
10 | */
11 | public class FooTest {
12 | //Field fooFighter of type FooFighter[] - was not mocked since Mockito doesn't mock arrays
13 | Foo foo = new Foo("thereGoes", "myHero", new JavaBean());
14 |
15 | @Test
16 | public void testFight() throws Exception {
17 | String result = foo.fight(new Fire[]{new Fire()}, new String[]{"foeName"}, new int[]{0});
18 | Assert.assertEquals("replaceMeWithExpectedResult", result);
19 | }
20 | }
21 |
22 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/ctorWhenNoMocks/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.beans.JavaBean
4 | import com.example.foes.Fear
5 | import com.example.foes.Fire
6 | import com.example.foes.Ice
7 | import org.junit.Test
8 |
9 | /** created by TestMe integration test on MMXVI */
10 | class FooTest {
11 | //Field fooFighter of type FooFighter[] - was not mocked since Mockito doesn't mock arrays
12 | Foo foo = new Foo("thereGoes", "myHero", new JavaBean(myString: "myString", myDate: new GregorianCalendar(2016, Calendar.JANUARY, 11, 22, 45).getTime(), someNum: 0, someLongerNum: 1l, fear: new Fear(), fire: new Fire(), ice: new Ice(), myOtherString: "myOtherString", someBinaryOption: true))
13 |
14 | @Test
15 | void testFight() {
16 | String result = foo.fight([new Fire()] as Fire[], ["foeName"] as String[], [0] as int[])
17 | assert result == "replaceMeWithExpectedResult"
18 | }
19 | }
20 |
21 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/date/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.warriers.FooFighter;
4 | import com.example.foes.Fire;
5 |
6 | import java.time.LocalDate;
7 | import java.time.LocalDateTime;
8 | import java.time.LocalTime;
9 | import java.time.Instant;
10 | import java.util.Date;
11 |
12 | public class Foo{
13 |
14 | private FooFighter fooFighter;
15 |
16 | public Date fight(Fire withFire,Date atDawn) {
17 | fooFighter.fight(withFire);
18 | return atDawn;
19 | }
20 | public LocalDate fightAnyDay(Fire withFire, LocalDate dDay) {
21 | fooFighter.fight(withFire);
22 | return dDay;
23 | }
24 | public LocalTime fightAnyTime(Fire withFire, LocalTime now) {
25 | fooFighter.fight(withFire);
26 | return now;
27 | }
28 | public LocalDateTime fightAnyDate(Fire withFire, LocalDateTime when) {
29 | fooFighter.fight(withFire);
30 | return when;
31 | }
32 | public Instant maybe(Instant later,Fire fire) {
33 | fooFighter.fight(fire);
34 | return later;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/declareSpecificTestMethodIgnoreThrownExceptionTypes/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import java.io.IOException;
5 |
6 | public class Foo
7 | {
8 | public Fire hasException(Fire tee) throws IOException {
9 | return tee;
10 | }
11 | public Fire hasNoException(Fire tee) {
12 | return tee;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/declareSpecificTestMethodIgnoreThrownExceptionTypes/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import org.junit.Assert;
5 | import org.junit.Test;
6 |
7 | /**
8 | * created by TestMe integration test on MMXVI
9 | */
10 | public class FooTest {
11 | Foo foo = new Foo();
12 |
13 | @Test
14 | public void testHasException() throws Exception {
15 | Fire result = foo.hasException(new Fire());
16 | Assert.assertEquals(new Fire(), result);
17 | }
18 |
19 | @Test
20 | public void testHasNoException() throws Exception {
21 | Fire result = foo.hasNoException(new Fire());
22 | Assert.assertEquals(new Fire(), result);
23 | }
24 | }
25 |
26 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/declareSpecificTestMethodIgnoreThrownExceptionTypes/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.foes.Fire
4 | import org.junit.Test
5 |
6 | /** created by TestMe integration test on MMXVI */
7 | class FooTest {
8 | Foo foo = new Foo()
9 |
10 | @Test
11 | void testHasException() {
12 | Fire result = foo.hasException(new Fire())
13 | assert result == new Fire()
14 | }
15 |
16 | @Test
17 | void testHasNoException() {
18 | Fire result = foo.hasNoException(new Fire())
19 | assert result == new Fire()
20 | }
21 | }
22 |
23 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/declareSpecificTestMethodIgnoreThrownExceptionTypes/testPowerMock/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import org.junit.Assert;
5 | import org.junit.Test;
6 |
7 | /**
8 | * created by TestMe integration test on MMXVI
9 | */
10 | @RunWith(PowerMockRunner.class)
11 | @PrepareForTest({Foo.class})
12 | @PowerMockIgnore("javax.management.*")
13 | public class FooTest {
14 | Foo foo = new Foo();
15 |
16 | @Test
17 | public void testHasException() throws Exception {
18 | Fire result = foo.hasException(new Fire());
19 | Assert.assertEquals(new Fire(), result);
20 |
21 | }
22 |
23 | @Test
24 | public void testHasNoException() throws Exception {
25 | Fire result = foo.hasNoException(new Fire());
26 | Assert.assertEquals(new Fire(), result);
27 |
28 | }
29 | }
30 |
31 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/declareSpecificTestMethodThrownExceptionTypes/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import java.io.IOException;
5 |
6 | public class Foo
7 | {
8 | public Fire hasException(Fire tee) throws IOException {
9 | return tee;
10 | }
11 | public Fire hasNoException(Fire tee) {
12 | return tee;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/declareSpecificTestMethodThrownExceptionTypes/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import org.junit.Assert;
5 | import org.junit.Test;
6 |
7 | import java.io.IOException;
8 |
9 | /**
10 | * created by TestMe integration test on MMXVI
11 | */
12 | public class FooTest {
13 | Foo foo = new Foo();
14 |
15 | @Test
16 | public void testHasException() throws IOException {
17 | Fire result = foo.hasException(new Fire());
18 | Assert.assertEquals(new Fire(), result);
19 | }
20 |
21 | @Test
22 | public void testHasNoException() {
23 | Fire result = foo.hasNoException(new Fire());
24 | Assert.assertEquals(new Fire(), result);
25 | }
26 | }
27 |
28 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/declareSpecificTestMethodThrownExceptionTypes/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.foes.Fire
4 | import org.junit.Test
5 |
6 | /** created by TestMe integration test on MMXVI */
7 | class FooTest {
8 | Foo foo = new Foo()
9 |
10 | @Test
11 | void testHasException() {
12 | Fire result = foo.hasException(new Fire())
13 | assert result == new Fire()
14 | }
15 |
16 | @Test
17 | void testHasNoException() {
18 | Fire result = foo.hasNoException(new Fire())
19 | assert result == new Fire()
20 | }
21 | }
22 |
23 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/declareSpecificTestMethodThrownExceptionTypes/testPowerMock/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import org.junit.Assert;
5 | import org.junit.Test;
6 |
7 | import java.io.IOException;
8 |
9 | /**
10 | * created by TestMe integration test on MMXVI
11 | */
12 | @RunWith(PowerMockRunner.class)
13 | @PrepareForTest({Foo.class})
14 | @PowerMockIgnore("javax.management.*")
15 | public class FooTest {
16 | Foo foo = new Foo();
17 |
18 | @Test
19 | public void testHasException() throws IOException {
20 | Fire result = foo.hasException(new Fire());
21 | Assert.assertEquals(new Fire(), result);
22 |
23 | }
24 |
25 | @Test
26 | public void testHasNoException() {
27 | Fire result = foo.hasNoException(new Fire());
28 | Assert.assertEquals(new Fire(), result);
29 |
30 | }
31 | }
32 |
33 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/defaultPackage/src/Foo.java:
--------------------------------------------------------------------------------
1 |
2 | import com.example.warriers.Hunter;
3 | import com.example.foes.Fire;
4 | import com.example.foes.Pokemon;
5 |
6 | public class Foo{
7 |
8 | private Hunter hunter;
9 |
10 | public String fight(Fire withFire,Flames andFlames,Pokemon pokey) {
11 | return hunter.hunt(pokey);
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/defaultPackage/test/FooTest.java:
--------------------------------------------------------------------------------
1 | import org.junit.Assert;
2 | import org.junit.Test;
3 | import org.junit.Before;
4 | import org.mockito.InjectMocks;
5 | import org.mockito.Mock;
6 | import org.mockito.MockitoAnnotations;
7 |
8 | import static org.mockito.Mockito.*;
9 |
10 | /**
11 | * created by TestMe integration test on MMXVI
12 | */
13 | public class FooTest {
14 | @Mock
15 | Hunter hunter;
16 | @InjectMocks
17 | Foo foo;
18 |
19 | @Before
20 | public void setUp() {
21 | MockitoAnnotations.initMocks(this);
22 | }
23 |
24 | @Test
25 | public void testFight() throws Exception {
26 | String result = foo.fight(new com.example.foes.Fire(), new Flames(), new com.example.foes.Pokemon());
27 | Assert.assertEquals("replaceMeWithExpectedResult", result);
28 | }
29 | }
30 |
31 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/defaultPackage/testGroovy/FooTest.groovy:
--------------------------------------------------------------------------------
1 | import org.junit.Test
2 | import org.junit.Before
3 | import org.mockito.InjectMocks
4 | import org.mockito.Mock
5 | import org.mockito.MockitoAnnotations
6 | import static org.mockito.Mockito.*
7 |
8 | /** created by TestMe integration test on MMXVI */
9 | class FooTest {
10 | @Mock
11 | Hunter hunter
12 | @InjectMocks
13 | Foo foo
14 |
15 | @Before
16 | void setUp() {
17 | MockitoAnnotations.initMocks(this)
18 | }
19 |
20 | @Test
21 | void testFight() {
22 | java.lang.String result = foo.fight(new com.example.foes.Fire(), new Flames(), new com.example.foes.Pokemon())
23 | assert result == "replaceMeWithExpectedResult"
24 | }
25 | }
26 |
27 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/enum/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.services.FooType;
4 | import com.example.services.Result;
5 | import com.example.warriers.FooFighter;
6 | import com.example.foes.Fire;
7 |
8 | public class Foo{
9 |
10 | private FooFighter fooFighter;
11 |
12 | Result result=Result.Draw;
13 |
14 | public Result fight(Fire withFire,FooType fooType) {
15 | System.out.println(fooType);
16 | fooFighter.fight(withFire);
17 | return Result.WinWin;
18 |
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/enum/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import com.example.services.FooType;
5 | import com.example.services.Result;
6 | import com.example.warriers.FooFighter;
7 | import org.junit.Assert;
8 | import org.junit.Test;
9 | import org.junit.Before;
10 | import org.mockito.InjectMocks;
11 | import org.mockito.Mock;
12 | import org.mockito.MockitoAnnotations;
13 |
14 | import static org.mockito.Mockito.*;
15 |
16 | /** created by TestMe integration test on MMXVI */
17 | public class FooTest {
18 | @Mock
19 | FooFighter fooFighter;
20 |
21 | @InjectMocks
22 | Foo foo;
23 |
24 | @Before
25 | public void setUp() {
26 | MockitoAnnotations.initMocks(this);
27 | }
28 |
29 | @Test
30 | public void testFight() throws Exception {
31 | Result result = foo.fight(new Fire(), new FooType());
32 | Assert.assertEquals(Result.WinWin, result);
33 | }
34 | }
35 |
36 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/enum/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.foes.Fire
4 | import com.example.services.FooType
5 | import com.example.services.Result
6 | import com.example.warriers.FooFighter
7 | import org.junit.Test
8 | import org.junit.Before
9 | import org.mockito.InjectMocks
10 | import org.mockito.Mock
11 | import org.mockito.MockitoAnnotations
12 | import static org.mockito.Mockito.*
13 |
14 | /** created by TestMe integration test on MMXVI */
15 | class FooTest {
16 | @Mock
17 | FooFighter fooFighter
18 |
19 | @InjectMocks
20 | Foo foo
21 |
22 | @Before
23 | void setUp() {
24 | MockitoAnnotations.initMocks(this)
25 | }
26 |
27 | @Test
28 | void testFight() {
29 | Result result = foo.fight(new Fire(), new FooType())
30 | assert result == Result.WinWin
31 | }
32 | }
33 |
34 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/enumSubject/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 | public enum Foo {
3 | One("i"),
4 | Two("ii");
5 |
6 | private final String value;
7 |
8 | EnumClass(String value) {
9 | this.value = value;
10 | }
11 |
12 | public String getValue() {
13 | return value;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/enumSubject/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import org.junit.Assert;
4 | import org.junit.Test;
5 |
6 | /** created by TestMe integration test on MMXVI */
7 | public class FooTest {
8 |
9 |
10 | Foo foo = Foo.One;
11 |
12 | @Test
13 | public void testGetValue() throws Exception {
14 | String result = foo.getValue();
15 | Assert.assertEquals("replaceMeWithExpectedResult", result);
16 | }
17 | }
18 |
19 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/enumSubject/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.junit.Test
4 |
5 | /** created by TestMe integration test on MMXVI */
6 | class FooTest {
7 |
8 |
9 | Foo foo = Foo.One
10 |
11 | @Test
12 | void testGetValue() {
13 | String result = foo.getValue()
14 | assert result == "replaceMeWithExpectedResult"
15 | }
16 | }
17 |
18 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/genericsTypeCollision/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 |
4 | import com.example.util.List;
5 | import com.example.warriers.FooFighter;
6 | import com.example.foes.Fire;
7 |
8 |
9 | public class Foo{
10 |
11 | private FooFighter fooFighter;
12 |
13 | public List fight(java.util.List flames) {
14 | System.out.println(flames.size());
15 | return new List();
16 | }
17 | }
--------------------------------------------------------------------------------
/testData/testMeGenerator/genericsTypeCollision/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.hole.Fire;
4 | import com.example.util.List;
5 | import com.example.warriers.FooFighter;
6 | import org.junit.Assert;
7 | import org.junit.Test;
8 | import org.junit.Before;
9 | import org.mockito.InjectMocks;
10 | import org.mockito.Mock;
11 | import org.mockito.MockitoAnnotations;
12 |
13 | import static org.mockito.Mockito.*;
14 |
15 | /** created by TestMe integration test on MMXVI */
16 | public class FooTest {
17 | @Mock
18 | FooFighter fooFighter;
19 | @InjectMocks
20 | Foo foo;
21 |
22 | @Before
23 | public void setUp() {
24 | MockitoAnnotations.initMocks(this);
25 | }
26 |
27 | @Test
28 | public void testFight() throws Exception {
29 | List result = foo.fight(java.util.List.of(new com.example.foes.Fire()));
30 | Assert.assertEquals(new List(), result);
31 | }
32 | }
33 |
34 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/genericsTypeCollision/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.hole.Fire
4 | import com.example.util.List
5 | import com.example.warriers.FooFighter
6 | import org.junit.Test
7 | import org.junit.Before
8 | import org.mockito.InjectMocks
9 | import org.mockito.Mock
10 | import org.mockito.MockitoAnnotations
11 | import static org.mockito.Mockito.*
12 |
13 | /** created by TestMe integration test on MMXVI */
14 | class FooTest {
15 | @Mock
16 | FooFighter fooFighter
17 | @InjectMocks
18 | Foo foo
19 |
20 | @Before
21 | void setUp() {
22 | MockitoAnnotations.initMocks(this)
23 | }
24 |
25 | @Test
26 | void testFight() {
27 | List result = foo.fight([new com.example.foes.Fire()])
28 | assert result == new List()
29 | }
30 | }
31 |
32 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/groovy/src/com/example/services/impl/Foovy.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.beans.JavaBean
4 | import com.example.foes.Ice
5 |
6 | /**
7 | * Created by Admin on 03/03/2017.
8 | */
9 | class Foovy {
10 | String myName
11 | Ice ice
12 | Collection myBeans
13 |
14 | String smashing(String somePumpkins,char with,Ice picker){
15 | somePumpkins
16 | }
17 |
18 | Foovy() {
19 | myName="Slim Shady"
20 | }
21 |
22 | String getMyName() {
23 | return myName
24 | }
25 |
26 | void setMyName(String myName) {
27 | this.myName = myName
28 | }
29 |
30 | Ice getIce() {
31 | return ice
32 | }
33 |
34 | void setIce(Ice ice) {
35 | this.ice = ice
36 | }
37 |
38 | Collection getMyBeans() {
39 | return myBeans
40 | }
41 |
42 | void setMyBeans(Collection myBeans) {
43 | this.myBeans = myBeans
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/groovy/test/com/example/services/impl/FoovyTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.JavaBean;
4 | import com.example.foes.Ice;
5 | import org.junit.Assert;
6 | import org.junit.Before;
7 | import org.junit.Test;
8 | import org.mockito.InjectMocks;
9 | import org.mockito.Mock;
10 | import org.mockito.MockitoAnnotations;
11 |
12 | import java.util.Collection;
13 |
14 | import static org.mockito.Mockito.*;
15 |
16 | /**
17 | * created by TestMe integration test on MMXVI
18 | */
19 | public class FoovyTest {
20 | @Mock
21 | Ice ice;
22 | @Mock
23 | Collection myBeans;
24 | @InjectMocks
25 | Foovy foovy;
26 |
27 | @Before
28 | public void setUp() {
29 | MockitoAnnotations.initMocks(this);
30 | }
31 |
32 | @Test
33 | public void testSmashing() throws Exception {
34 | String result = foovy.smashing("somePumpkins", 'a', new Ice());
35 | Assert.assertEquals("replaceMeWithExpectedResult", result);
36 | }
37 | }
38 |
39 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/groovy/testGroovy/com/example/services/impl/FoovyTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.beans.JavaBean
4 | import com.example.foes.Ice
5 | import org.junit.Test
6 | import org.junit.Before
7 | import org.mockito.InjectMocks
8 | import org.mockito.Mock
9 | import org.mockito.MockitoAnnotations
10 | import static org.mockito.Mockito.*
11 |
12 | /** created by TestMe integration test on MMXVI */
13 | class FoovyTest {
14 | @Mock
15 | Ice ice
16 | @Mock
17 | Collection myBeans
18 | @InjectMocks
19 | Foovy foovy
20 |
21 | @Before
22 | void setUp() {
23 | MockitoAnnotations.initMocks(this)
24 | }
25 |
26 | @Test
27 | void testSmashing() {
28 | String result = foovy.smashing("somePumpkins", (char) 'a', new Ice())
29 | assert result == "replaceMeWithExpectedResult"
30 | }
31 | }
32 |
33 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/ignoreUnusedCtorArgumentsWhenDelegatedCalls/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.BeanByCtor;
4 | import com.example.beans.BigBean;
5 | import com.example.groovies.ImGroovy;
6 | import com.example.warriers.FooFighter;
7 | import com.example.foes.Fire;
8 |
9 | import java.util.List;
10 |
11 | public class Foo {
12 |
13 | private FooFighter fooFighter;
14 |
15 | public DelegateCtor findWithDelegatedCalls(List beans, ImGroovy theOne) {
16 | System.out.println(theOne);
17 | System.out.println(beans.toString());
18 | return buildBean(beans, theOne);
19 | }
20 |
21 | private DelegateCtor buildBean(List beans, ImGroovy theOne) {
22 | final BigBean bigBean = new BigBean(beans.get(0).getIce().toString());
23 | bigBean.setTimes(new Many(beans.get(0).getMyName(),theOne.getGroove().getSomeString(),null));
24 | DelegateCtor delegateCtor = new DelegateCtor(beans.get(0).getMyName(), theOne.getGroove().getSomeString(), null,new Fire());
25 | return delegateCtor;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/ignoreUnusedCtorArgumentsWhenDelegatedCalls/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.BeanByCtor;
4 | import com.example.foes.Fire;
5 | import com.example.foes.Ice;
6 | import com.example.groovies.ImGroovy;
7 | import com.example.warriers.FooFighter;
8 | import org.junit.Assert;
9 | import org.junit.Before;
10 | import org.junit.Test;
11 | import org.mockito.InjectMocks;
12 | import org.mockito.Mock;
13 | import org.mockito.MockitoAnnotations;
14 |
15 | import java.util.List;
16 |
17 | import static org.mockito.Mockito.*;
18 |
19 | /**
20 | * created by TestMe integration test on MMXVI
21 | */
22 | public class FooTest {
23 | @Mock
24 | FooFighter fooFighter;
25 | @InjectMocks
26 | Foo foo;
27 |
28 | @Before
29 | public void setUp() {
30 | MockitoAnnotations.initMocks(this);
31 | }
32 |
33 | @Test
34 | public void testFindWithDelegatedCalls() throws Exception {
35 | DelegateCtor result = foo.findWithDelegatedCalls(List.of(new BeanByCtor("myName", new Ice(), null, 0d)), new ImGroovy());
36 | Assert.assertEquals(new DelegateCtor("youre", "asCold", new Ice(), new Fire()), result);
37 | }
38 | }
39 |
40 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/ignoreUnusedCtorArgumentsWhenDelegatedCalls/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.beans.BeanByCtor
4 | import com.example.foes.Fire
5 | import com.example.foes.Ice
6 | import com.example.groovies.Groove
7 | import com.example.groovies.ImGroovy
8 | import com.example.warriers.FooFighter
9 | import org.junit.Test
10 | import org.junit.Before
11 | import org.mockito.InjectMocks
12 | import org.mockito.Mock
13 | import org.mockito.MockitoAnnotations
14 | import static org.mockito.Mockito.*
15 |
16 | /** created by TestMe integration test on MMXVI */
17 | class FooTest {
18 | @Mock
19 | FooFighter fooFighter
20 | @InjectMocks
21 | Foo foo
22 |
23 | @Before
24 | void setUp() {
25 | MockitoAnnotations.initMocks(this)
26 | }
27 |
28 | @Test
29 | void testFindWithDelegatedCalls() {
30 | DelegateCtor result = foo.findWithDelegatedCalls([new BeanByCtor("myName", new Ice(), null, 0d)], new ImGroovy(groove: new Groove(someString: "someString")))
31 | assert result == new DelegateCtor("youre", "asCold", new Ice(), new Fire())
32 | }
33 | }
34 |
35 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/ignoreUnusedCtorArgumentsWhenDelegatedCallsInGroovy/src/com/example/services/impl/Foo.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.beans.BeanByCtor
4 | import com.example.beans.BigBean
5 | import com.example.foes.Fire
6 | import com.example.groovies.ImGroovy
7 | import com.example.warriers.FooFighter
8 |
9 | class Foo {
10 |
11 | private FooFighter fooFighter
12 |
13 | DelegateCtor findWithDelegatedCalls(List beans, ImGroovy theOne) {
14 | println theOne
15 | println beans.toString()
16 | buildBean(beans, theOne)
17 | }
18 |
19 | private DelegateCtor buildBean(List beans, ImGroovy theOne) {
20 | BigBean bigBean = new BigBean(beans[0].getIce().toString())
21 | bigBean.setTimes(new Many(beans[0].getMyName(),theOne.getGroove().getSomeString(),null))
22 | DelegateCtor delegateCtor = new DelegateCtor(beans[0].getMyName(), theOne.getGroove().getSomeString(), null,new Fire())
23 | delegateCtor
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/ignoreUnusedCtorArgumentsWhenDelegatedCallsInGroovy/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.beans.BeanByCtor
4 | import com.example.foes.Fire
5 | import com.example.foes.Ice
6 | import com.example.groovies.Groove
7 | import com.example.groovies.ImGroovy
8 | import com.example.warriers.FooFighter
9 | import org.junit.Test
10 | import org.junit.Before
11 | import org.mockito.InjectMocks
12 | import org.mockito.Mock
13 | import org.mockito.MockitoAnnotations
14 | import static org.mockito.Mockito.*
15 |
16 | /** created by TestMe integration test on MMXVI */
17 | class FooTest {
18 | @Mock
19 | FooFighter fooFighter
20 | @InjectMocks
21 | Foo foo
22 |
23 | @Before
24 | void setUp() {
25 | MockitoAnnotations.initMocks(this)
26 | }
27 |
28 | @Test
29 | void testFindWithDelegatedCalls() {
30 | DelegateCtor result = foo.findWithDelegatedCalls([new BeanByCtor("myName", new Ice(), null, 0d)], new ImGroovy(groove: new Groove(someString: "someString")))
31 | assert result == new DelegateCtor("youre", "asCold", null, new Fire())
32 | }
33 | }
34 |
35 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/ignoreUnusedCtorArgumentsWhenNestedProps/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.BeanByCtor;
4 | import com.example.beans.BigBean;
5 | import com.example.groovies.ImGroovy;
6 | import com.example.warriers.FooFighter;
7 | import com.example.foes.Fire;
8 |
9 | import java.util.List;
10 |
11 | public class Foo {
12 |
13 | private FooFighter fooFighter;
14 |
15 | public ContainNestedPropertyWithCtor buildWithNestedCtorCalls(List beans, ImGroovy theOne) {
16 | System.out.println(theOne);
17 | System.out.println(beans.toString());
18 | return buildBean(beans, theOne);
19 | }
20 |
21 | private ContainNestedPropertyWithCtor buildBean(List beans, ImGroovy theOne) {
22 | final BigBean bigBean = new BigBean(beans.get(0).getIce().toString());
23 | bigBean.setTimes(new Many(beans.get(0).getMyName(),theOne.getGroove().getSomeString(),null));
24 | DelegateCtor delegateCtor = new DelegateCtor(beans.get(0).getMyName(), theOne.getGroove().getSomeString(), null,new Fire());
25 | return new ContainNestedPropertyWithCtor(delegateCtor, beans.get(0).getMyName(), null);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/ignoreUnusedCtorArgumentsWhenNestedProps/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.beans.BeanByCtor
4 | import com.example.foes.Fire
5 | import com.example.foes.Ice
6 | import com.example.groovies.Groove
7 | import com.example.groovies.ImGroovy
8 | import com.example.warriers.FooFighter
9 | import org.junit.Test
10 | import org.junit.Before
11 | import org.mockito.InjectMocks
12 | import org.mockito.Mock
13 | import org.mockito.MockitoAnnotations
14 | import static org.mockito.Mockito.*
15 |
16 | /** created by TestMe integration test on MMXVI */
17 | class FooTest {
18 | @Mock
19 | FooFighter fooFighter
20 | @InjectMocks
21 | Foo foo
22 |
23 | @Before
24 | void setUp() {
25 | MockitoAnnotations.initMocks(this)
26 | }
27 |
28 | @Test
29 | void testBuildWithNestedCtorCalls() {
30 | ContainNestedPropertyWithCtor result = foo.buildWithNestedCtorCalls([new BeanByCtor("myName", new Ice(), null, 0d)], new ImGroovy(groove: new Groove(someString: "someString")))
31 | assert result == new ContainNestedPropertyWithCtor(new DelegateCtor("youre", "asCold", null, new Fire()), "someStr", null)
32 | }
33 | }
34 |
35 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/ignoreUnusedPropertiesWhenInherited/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.ConvertedBean;
4 | import com.example.beans.InheritingBean;
5 | import com.example.beans.JavaBean;
6 | import com.example.dependencies.ChildWithSetters;
7 | import com.example.foes.Ice;
8 | import com.example.util.FooUtils;
9 | import com.example.warriers.FooFighter;
10 | import com.example.foes.Fire;
11 |
12 | public class Foo extends FooConverterAbs{
13 |
14 | private FooFighter fooFighter;
15 |
16 | private static int badPractiseRecursionCounter =20;
17 |
18 | public ConvertedBean convert(Fire withFire, String foeName, InheritingBean inheritingBean) {
19 | ConvertedBean convertedBean = super.convert(withFire, foeName, inheritingBean);
20 | fooFighter.fight(withFire);
21 | convertedBean.setIce(inheritingBean.getIce());
22 | convertedBean.setMyDate(inheritingBean.getMyDate());
23 | convertedBean.setMyString(inheritingBean.getMyString());
24 | convertedBean.setSomeBinaryOption(inheritingBean.isSomeBinaryOption());
25 | JavaBean javaBean = withFire.getJavaBean();
26 | convertedBean.setSomeNum(inheritingBean.getSomeNum());
27 | System.out.println(inheritingBean.getFire());
28 | return convertedBean;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/inheritance/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.parents.impl.FooParent;
4 | import com.example.parents.impl.FooInterfaceExt;
5 | import com.example.warriers.FooFighter;
6 | import com.example.foes.Fire;
7 |
8 | public class Foo extends FooParent implements FooInterfaceExt{
9 |
10 | private FooFighter fooFighter;
11 |
12 | public String fight(Fire withFire,String foeName) {
13 | return fooFighter.fight(withFire);
14 | }
15 |
16 | void iDefault(){
17 | System.out.println("iDefault");
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/inheritanceIgnored/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.parents.impl.FooParent;
4 | import com.example.parents.impl.FooInterfaceExt;
5 | import com.example.warriers.FooFighter;
6 | import com.example.foes.Fire;
7 |
8 | public class Foo extends FooParent implements FooInterfaceExt{
9 |
10 | private FooFighter fooFighter;
11 |
12 | public String fight(Fire withFire,String foeName) {
13 | return fooFighter.fight(withFire);
14 | }
15 |
16 | void iDefault(){
17 | System.out.println("iDefault");
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/inheritanceIgnored/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import org.junit.Assert;
4 | import org.junit.Test;
5 | import org.junit.Before;
6 | import org.mockito.InjectMocks;
7 | import org.mockito.Mock;
8 | import org.mockito.MockitoAnnotations;
9 |
10 | import static org.mockito.Mockito.*;
11 |
12 | /** created by TestMe integration test on MMXVI */
13 | public class FooTest {
14 | @Mock
15 | com.example.warriers.FooFighter fooFighter;
16 | @Mock
17 | com.example.foes.Pokemon pokey;
18 | @InjectMocks
19 | Foo foo;
20 |
21 | @Before
22 | public void setUp() {
23 | MockitoAnnotations.initMocks(this);
24 | }
25 |
26 | @Test
27 | public void testFight() throws Exception {
28 | when(fooFighter.fight(any(com.example.foes.Fire.class))).thenReturn("fightResponse");
29 |
30 | String result = foo.fight(new com.example.foes.Fire(), "foeName");
31 | Assert.assertEquals("replaceMeWithExpectedResult", result);
32 | }
33 |
34 | @Test
35 | public void testIDefault() throws Exception {
36 | foo.iDefault();
37 | }
38 | }
39 |
40 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/inheritanceIgnored/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.junit.Test
4 | import org.junit.Before
5 | import org.mockito.InjectMocks
6 | import org.mockito.Mock
7 | import org.mockito.MockitoAnnotations
8 | import static org.mockito.Mockito.*
9 |
10 | /** created by TestMe integration test on MMXVI */
11 | class FooTest {
12 | @Mock
13 | com.example.warriers.FooFighter fooFighter
14 | @Mock
15 | com.example.foes.Pokemon pokey
16 | @InjectMocks
17 | com.example.services.impl.Foo foo
18 |
19 | @Before
20 | void setUp() {
21 | MockitoAnnotations.initMocks(this)
22 | }
23 |
24 | @Test
25 | void testFight() {
26 | when(fooFighter.fight(any(com.example.foes.Fire.class))).thenReturn("fightResponse")
27 |
28 | java.lang.String result = foo.fight(new com.example.foes.Fire(), "foeName")
29 | assert result == "replaceMeWithExpectedResult"
30 | }
31 |
32 | @Test
33 | void testIDefault() {
34 | foo.iDefault()
35 | }
36 | }
37 |
38 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/javaCallsGroovy/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.JavaBean;
4 | import com.example.foes.Fire;
5 | import com.example.groovies.ImGroovy;
6 | import com.example.warriers.FooFighter;
7 |
8 | import java.util.Collection;
9 |
10 | public class Foo {
11 |
12 | private FooFighter fooFighter;
13 |
14 | public Collection find(Collection groovies, ImGroovy theOne) {
15 | System.out.println(theOne);
16 | System.out.println(groovies.toString());
17 | return groovies;
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/miscReplacementTypes/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.warriers.FooFighter;
4 | import com.example.foes.Fire;
5 | import java.io.File;
6 |
7 | public class Foo{
8 |
9 | private FooFighter fooFighter;
10 |
11 | Class clazz;
12 |
13 | public File fight(Fire withFire, File xFiles) {
14 | System.out.println(xFiles.getAbsoluteFile());
15 | return xFiles;
16 | }
17 |
18 | public Class study(Class inClazz) {
19 | System.out.println(inClazz);
20 | System.out.println(clazz);
21 | return clazz;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/miscReplacementTypes/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.foes.Fire
4 | import com.example.warriers.FooFighter
5 | import org.junit.Test
6 | import org.junit.Before
7 | import org.mockito.InjectMocks
8 | import org.mockito.Mock
9 | import org.mockito.MockitoAnnotations
10 | import static org.mockito.Mockito.*
11 |
12 | /** created by TestMe integration test on MMXVI */
13 | class FooTest {
14 | @Mock
15 | FooFighter fooFighter
16 | @InjectMocks
17 | Foo foo
18 |
19 | @Before
20 | void setUp() {
21 | MockitoAnnotations.initMocks(this)
22 | }
23 |
24 | @Test
25 | void testFight() {
26 | File result = foo.fight(new Fire(), new File(getClass().getResource("/com/example/services/impl/PleaseReplaceMeWithTestFile.txt").getFile()))
27 | assert result == new File(getClass().getResource("/com/example/services/impl/PleaseReplaceMeWithTestFile.txt").getFile())
28 | }
29 |
30 | @Test
31 | void testStudy() {
32 | Class result = foo.study(Class.forName("com.example.services.impl.Foo"))
33 | assert result == Class.forName("com.example.services.impl.Foo")
34 | }
35 | }
36 |
37 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/mockFieldsInDependencyInjection/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.ConvertedBean;
4 | import java.util.function.Supplier;
5 | import com.example.dependencies.Logger;
6 | import com.example.foes.Fear;
7 | import com.example.foes.Fire;
8 | import com.example.foes.Ice;
9 | import com.example.warriers.TechFighter;
10 | import com.example.dependencies.Logger;
11 | import javax.inject.Singleton;
12 | import javax.inject.Inject;
13 |
14 | @Singleton
15 | public class Foo{
16 |
17 | @Inject
18 | private TechFighter techFighter;
19 |
20 | @Inject
21 | private Supplier result;
22 |
23 | private Logger logger;
24 |
25 | public String fight(Fire withFire,String foeName) {
26 | logger.trace("this logger should not be mocked in dependency injection");
27 | techFighter.initSelfArming("gun");
28 | String fail = techFighter.fight(withFire);
29 | ConvertedBean convertedBean = techFighter.surrender(new Fear(), new Ice(), 666);
30 | convertedBean.setSomeNum(result.get());
31 | return "returning response from dependency "+ fail + " " + convertedBean.getMyString();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/mockFieldsInDiWithCtor/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.ConvertedBean;
4 | import java.util.function.Supplier;
5 | import com.example.foes.Fear;
6 | import com.example.foes.Fire;
7 | import com.example.foes.Ice;
8 | import com.example.warriers.TechFighter;
9 | import javax.inject.Singleton;
10 |
11 | @Singleton
12 | public class Foo{
13 |
14 | private TechFighter techFighter;
15 |
16 | private Supplier result;
17 |
18 | public String fight(Fire withFire,String foeName) {
19 | techFighter.initSelfArming("gun");
20 | String fail = techFighter.fight(withFire);
21 | ConvertedBean convertedBean = techFighter.surrender(new Fear(), new Ice(), 666);
22 | convertedBean.setSomeNum(result.get());
23 | return "returning response from dependency "+ fail + " " + convertedBean.getMyString();
24 | }
25 |
26 | public Foo(TechFighter techFighter, Supplier result) {
27 | this.techFighter = techFighter;
28 | this.result = result;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/mockFieldsInDiWithSetter/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.ConvertedBean;
4 | import java.util.function.Supplier;
5 | import com.example.dependencies.Logger;
6 | import com.example.foes.Fear;
7 | import com.example.foes.Fire;
8 | import com.example.foes.Ice;
9 | import com.example.warriers.TechFighter;
10 | import com.example.dependencies.Logger;
11 | import javax.inject.Singleton;
12 | import javax.inject.Inject;
13 |
14 | @Singleton
15 | public class Foo{
16 |
17 | private TechFighter techFighter;
18 |
19 | @Inject
20 | private Supplier result;
21 |
22 | private Logger logger;
23 |
24 | public String fight(Fire withFire,String foeName) {
25 | logger.trace("this logger should not be mocked in dependency injection");
26 | techFighter.initSelfArming("gun");
27 | String fail = techFighter.fight(withFire);
28 | ConvertedBean convertedBean = techFighter.surrender(new Fear(), new Ice(), 666);
29 | convertedBean.setSomeNum(result.get());
30 | return "returning response from dependency "+ fail + " " + convertedBean.getMyString();
31 | }
32 |
33 | public void setTechFighter(TechFighter techFighter) {
34 | this.techFighter = techFighter;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/mockReturned/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.ConvertedBean;
4 | import java.util.function.Supplier;
5 | import com.example.dependencies.Logger;
6 | import com.example.foes.Fear;
7 | import com.example.foes.Fire;
8 | import com.example.foes.Ice;
9 | import com.example.warriers.FooFighter;
10 |
11 | public class Foo{
12 |
13 | private FooFighter fooFighter;
14 | private Supplier result;
15 | private Logger logger = Logger.getLogger(Foo.class.getName());;
16 |
17 | public String fight(Fire withFire,String foeName) {
18 | logger.trace("this method does not return a value so it should not be stubbed");
19 | System.out.println(withFire);
20 | System.out.println(foeName);
21 | ConvertedBean convertedBean = fooFighter.surrender(new Fear(), new Ice(), 666);
22 | convertedBean.setSomeNum(result.get());
23 | System.out.println(convertedBean.getFear());
24 | System.out.println(convertedBean.getIce());
25 | System.out.println(convertedBean.getSomeNum());
26 | return "returning response from dependency "+ convertedBean.getMyString();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/mockReturned/testSpecs2/com/example/services/impl/FooTest.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.foes.Fire
4 | import org.specs2.mutable.Specification
5 |
6 | /** created by TestMe integration test on MMXVI */
7 | class FooTest extends Specification {
8 | val foo = new Foo()
9 |
10 | "Foo" should {
11 |
12 | "fight" in {
13 | val result = foo.fight(new Fire(), "foeName")
14 | result === "replaceMeWithExpectedResult"
15 | }
16 |
17 | }
18 | }
19 |
20 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/nestedClassParams/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.warriers.FooFighter;
4 | import com.example.beans.Spiral;
5 |
6 | public class Foo{
7 |
8 | private FooFighter fooFighter;
9 |
10 | public String neverEnding(Spiral whirling,Spiral.Circle circle,Spiral.Wheel.WheelWithinAWheel wheel ) {
11 | return whirling.toString();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/nestedClassParams/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.Spiral;
4 | import com.example.warriers.FooFighter;
5 | import org.junit.Assert;
6 | import org.junit.Before;
7 | import org.junit.Test;
8 | import org.mockito.InjectMocks;
9 | import org.mockito.Mock;
10 | import org.mockito.MockitoAnnotations;
11 |
12 | import static org.mockito.Mockito.*;
13 |
14 | /**
15 | * created by TestMe integration test on MMXVI
16 | */
17 | public class FooTest {
18 | @Mock
19 | FooFighter fooFighter;
20 | @InjectMocks
21 | Foo foo;
22 |
23 | @Before
24 | public void setUp() {
25 | MockitoAnnotations.initMocks(this);
26 | }
27 |
28 | @Test
29 | public void testNeverEnding() throws Exception {
30 | String result = foo.neverEnding(new Spiral(), new Spiral.Circle("aCircleInASpiral"), new Spiral.Wheel("neverEnding", true).new WheelWithinAWheel("everSpinningReel"));
31 | Assert.assertEquals("replaceMeWithExpectedResult", result);
32 | }
33 | }
34 |
35 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/nestedClassParams/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.beans.Spiral
4 | import com.example.warriers.FooFighter
5 | import org.junit.Test
6 | import org.junit.Before
7 | import org.mockito.InjectMocks
8 | import org.mockito.Mock
9 | import org.mockito.MockitoAnnotations
10 | import static org.mockito.Mockito.*
11 |
12 | /** created by TestMe integration test on MMXVI */
13 | class FooTest {
14 | @Mock
15 | FooFighter fooFighter
16 | @InjectMocks
17 | Foo foo
18 |
19 | @Before
20 | void setUp() {
21 | MockitoAnnotations.initMocks(this)
22 | }
23 |
24 | @Test
25 | void testNeverEnding() {
26 | String result = foo.neverEnding(new Spiral(moon: "moon", rings: 0), new Spiral.Circle("aCircleInASpiral"), new Spiral.Wheel.WheelWithinAWheel(new Spiral.Wheel("neverEnding", true), "everSpinningReel"))
27 | assert result == "replaceMeWithExpectedResult"
28 | }
29 | }
30 |
31 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/noFormatting/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.warriers.FooFighter;
4 | import com.example.foes.Fire;
5 |
6 | public class Foo{
7 |
8 | private FooFighter fooFighter;
9 |
10 | public String fight(Fire withFire,String foeName) {
11 | return fooFighter.fight(withFire);
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/noFormatting/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import org.junit.Assert;
4 | import org.junit.Test;
5 | import org.junit.Before;
6 | import org.mockito.InjectMocks;
7 | import org.mockito.Mock;
8 | import org.mockito.MockitoAnnotations;
9 |
10 | import static org.mockito.Mockito.*;
11 |
12 | /** created by TestMe integration test on MMXVI */
13 | public class FooTest {
14 | @Mock
15 | com.example.warriers.FooFighter fooFighter;
16 | @InjectMocks
17 | Foo foo;
18 |
19 | @Before
20 | public void setUp() {
21 | MockitoAnnotations.initMocks(this);
22 | }
23 |
24 | @Test
25 | public void testFight() throws Exception {
26 | String result = foo.fight(new com.example.foes.Fire(), "foeName");
27 | Assert.assertEquals("replaceMeWithExpectedResult", result);
28 | }
29 | }
30 |
31 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/noFormatting/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.junit.Test
4 | import org.junit.Before
5 | import org.mockito.InjectMocks
6 | import org.mockito.Mock
7 | import org.mockito.MockitoAnnotations
8 | import static org.mockito.Mockito.*
9 |
10 | /** created by TestMe integration test on MMXVI */
11 | class FooTest {
12 | @Mock
13 | com.example.warriers.FooFighter fooFighter
14 | @InjectMocks
15 | com.example.services.impl.Foo foo
16 |
17 | @Before
18 | void setUp() {
19 | MockitoAnnotations.initMocks(this)
20 | }
21 |
22 | @Test
23 | void testFight() {
24 | java.lang.String result = foo.fight(new com.example.foes.Fire(), "foeName")
25 | assert result == "replaceMeWithExpectedResult"
26 | }
27 | }
28 |
29 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/overloading/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Pokemon;
4 | import com.example.warriers.FooFighter;
5 | import com.example.foes.Fire;
6 | import com.example.foes.Ice;
7 |
8 | public class Foo{
9 |
10 | private FooFighter fooFighter;
11 |
12 | public String fight(Fire withFire,String foeName) {
13 | return fooFighter.fight(withFire);
14 | }
15 |
16 | String fight(Fire withFire,Ice andIce ,String foeName) {
17 | System.out.println(andIce+" ice ice baby");
18 | return fooFighter.fight(withFire);
19 | }
20 | String fight(Fire withFire,Ice andIce ,Ice onTheRocks ,String foeName) {
21 | System.out.println("french "+andIce);
22 | return fooFighter.fight(withFire);
23 | }
24 |
25 | private Pokemon poke(int times) {
26 | return new Pokemon();
27 | }
28 | protected String fight(int times) {
29 | return String.valueOf(times);
30 | }
31 | String fold(String foeName) {
32 | System.out.println(foeName+" friends?");
33 | return "truce";
34 | }
35 | String fold(String foeName,String truce) {
36 | System.out.println(foeName+" "+truce);
37 | return "white flag";
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/overrideAbstract/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import com.example.foes.Ice;
5 | import com.example.parents.impl.AbstactFoo;
6 |
7 | import java.util.Arrays;
8 | import java.util.List;
9 |
10 | public class Foo extends AbstactFoo
11 | {
12 | @Override
13 | public Fire getMeMyTee(Fire tee) {
14 | return tee;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/overrideAbstract/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.foes.Fire
4 | import com.example.foes.Ice
5 | import org.junit.Test
6 |
7 | /** created by TestMe integration test on MMXVI */
8 | class FooTest {
9 | Foo foo = new Foo()
10 |
11 | @Test
12 | void testGetMeMyTee() {
13 | Fire result = foo.getMeMyTee(new Fire())
14 | assert result == new Fire()
15 | }
16 |
17 | @Test
18 | void testU2() {
19 | Map result = foo.u2()
20 | assert result == [(new Ice()): new Fire()]
21 | }
22 |
23 | @Test
24 | void testINeedU() {
25 | foo.iNeedU(new Ice())
26 | }
27 |
28 | @Test
29 | void testINeedUT() {
30 | String result = foo.iNeedUT(new Ice(), new Fire())
31 | assert result == "replaceMeWithExpectedResult"
32 | }
33 |
34 | @Test
35 | void testGetMeMyTees() {
36 | List result = foo.getMeMyTees(new Fire())
37 | assert result == [new Fire()]
38 | }
39 | }
40 |
41 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/overrideAbstractIgnoreInherited/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import com.example.foes.Ice;
5 | import com.example.parents.impl.AbstactFoo;
6 |
7 | import java.util.Arrays;
8 | import java.util.List;
9 |
10 | public class Foo extends AbstactFoo
11 | {
12 | @Override
13 | public Fire getMeMyTee(Fire tee) {
14 | return tee;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/overrideAbstractIgnoreInherited/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import org.junit.Assert;
5 | import org.junit.Test;
6 |
7 | /**
8 | * created by TestMe integration test on MMXVI
9 | */
10 | public class FooTest {
11 | Foo foo = new Foo();
12 |
13 | @Test
14 | public void testGetMeMyTee() throws Exception {
15 | Fire result = foo.getMeMyTee(new Fire());
16 | Assert.assertEquals(new Fire(), result);
17 | }
18 | }
19 |
20 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/overrideAbstractIgnoreInherited/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.foes.Fire
4 | import org.junit.Test
5 |
6 | /** created by TestMe integration test on MMXVI */
7 | class FooTest {
8 | Foo foo = new Foo()
9 |
10 | @Test
11 | void testGetMeMyTee() {
12 | Fire result = foo.getMeMyTee(new Fire())
13 | assert result == new Fire()
14 | }
15 | }
16 |
17 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/paramsConstructors/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.BeanThere;
4 | import com.example.beans.BigBean;
5 | import com.example.dependencies.MasterInterface;
6 | import com.example.foes.Ace;
7 | import com.example.foes.BeanDependsOnInterface;
8 | import com.example.foes.Ice;
9 | import com.example.warriers.FooFighter;
10 | import com.example.foes.Fire;
11 |
12 | import java.util.List;
13 |
14 | public class Foo{
15 |
16 | private FooFighter fooFighter;
17 |
18 | public BigBean fight(Fire withFire, List foeName, BigBean bigBean, BeanThere beanThere) {
19 | System.out.println(fooFighter.fight(withFire));
20 | return bigBean;
21 | }
22 | public Ice[] varargs(Fire fire, Ace ace, Ice... onTheRocks) {
23 | System.out.println(fire);
24 | System.out.println(onTheRocks.length);
25 | return onTheRocks;
26 | }
27 | public MasterInterface jack(BeanDependsOnInterface andTheBeanstalk,MasterInterface masterInterface) {
28 | return masterInterface;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/paramsConstructorsNoFqnReplacement/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.BeanThere;
4 | import com.example.beans.BigBean;
5 | import com.example.warriers.FooFighter;
6 | import com.example.foes.Fire;
7 |
8 | import java.util.List;
9 |
10 | public class Foo{
11 |
12 | private FooFighter fooFighter;
13 |
14 | public BigBean fight(Fire withFire, List foeName, BigBean bigBean, BeanThere beanThere) {
15 | System.out.println(fooFighter.fight(withFire));
16 | return bigBean;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/primitiveCallTypes/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import com.example.warriers.FooFighter;
5 |
6 | import java.math.BigDecimal;
7 |
8 | public class Foo{
9 |
10 | private FooFighter fooFighter;
11 |
12 | public Double fight(Fire withFire,String foeName,
13 | byte byteParam,
14 | short shortParam,
15 | int intParam,
16 | long longParam,
17 | float floatParam,
18 | double doubleParam,
19 | char charParam,
20 | boolean booleanParam,
21 | Byte byteParamWrapper,
22 | Short shortParamWrapper,
23 | Integer intParamWrapper,
24 | Long longParamWrapper,
25 | Float floatParamWrapper,
26 | Double doubleParamWrapper,
27 | Character charParamWrapper,
28 | Boolean booleanParamWrapper,
29 | BigDecimal bigDecimalParam
30 | ) {
31 | System.out.println(fooFighter.fight(withFire));
32 | return doubleParamWrapper;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/primitiveCallTypes/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import com.example.warriers.FooFighter;
5 | import org.junit.Assert;
6 | import org.junit.Test;
7 | import org.junit.Before;
8 | import org.mockito.InjectMocks;
9 | import org.mockito.Mock;
10 | import org.mockito.MockitoAnnotations;
11 |
12 | import java.math.BigDecimal;
13 |
14 | import static org.mockito.Mockito.*;
15 |
16 | /** created by TestMe integration test on MMXVI */
17 | public class FooTest {
18 | @Mock
19 | FooFighter fooFighter;
20 | @InjectMocks
21 | Foo foo;
22 |
23 | @Before
24 | public void setUp() {
25 | MockitoAnnotations.initMocks(this);
26 | }
27 |
28 | @Test
29 | public void testFight() throws Exception {
30 | Double result = foo.fight(new Fire(), "foeName", (byte) 0, (short) 0, 0, 0L, 0f, 0d, 'a', true, Byte.valueOf("00110"), Short.valueOf((short)0), Integer.valueOf(0), Long.valueOf(1), Float.valueOf(1.1f), Double.valueOf(0), Character.valueOf('a'), Boolean.TRUE, new BigDecimal(0));
31 | Assert.assertEquals(Double.valueOf(0), result);
32 | }
33 | }
34 |
35 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/primitiveCallTypes/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.foes.Fire
4 | import com.example.warriers.FooFighter
5 | import org.junit.Test
6 | import org.junit.Before
7 | import org.mockito.InjectMocks
8 | import org.mockito.Mock
9 | import org.mockito.MockitoAnnotations
10 | import static org.mockito.Mockito.*
11 |
12 | /** created by TestMe integration test on MMXVI */
13 | class FooTest {
14 | @Mock
15 | FooFighter fooFighter
16 | @InjectMocks
17 | Foo foo
18 |
19 | @Before
20 | void setUp() {
21 | MockitoAnnotations.initMocks(this)
22 | }
23 |
24 | @Test
25 | void testFight() {
26 | Double result = foo.fight(new Fire(), "foeName", (byte)0, (short)0, 0, 0l, 0f, 0d, (char)'a', true, "00110" as Byte, (short)0, 0, 1l, 1.1f, 0d, 'a' as Character, Boolean.TRUE, 0 as BigDecimal)
27 | assert result == 0d
28 | }
29 | }
30 |
31 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/replacedInterface/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.dependencies.MasterInterface;
4 | import com.example.foes.BeanDependsOnInterface;
5 |
6 | public class Foo{
7 | public MasterInterface jack(BeanDependsOnInterface andTheBeanstalk,MasterInterface masterInterface) {
8 | return masterInterface;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/replacedInterface/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.dependencies.ChildWithSetters;
4 | import com.example.dependencies.MasterInterface;
5 | import com.example.foes.BeanDependsOnInterface;
6 | import org.junit.Assert;
7 | import org.junit.Test;
8 |
9 | /**
10 | * created by TestMe integration test on MMXVI
11 | */
12 | public class FooTest {
13 | Foo foo = new Foo();
14 |
15 | @Test
16 | public void testJack() throws Exception {
17 | MasterInterface result = foo.jack(new BeanDependsOnInterface(new ChildWithSetters()), new ChildWithSetters());
18 | Assert.assertEquals(new ChildWithSetters(), result);
19 | }
20 | }
21 |
22 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaCaseClass/src/com/example/services/impl/UseCase.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.scala.CaseClass
4 |
5 | class UseCase(){
6 | def use(caseClass:CaseClass):Unit={
7 | println(caseClass.`case`)
8 | }
9 |
10 | def makeDefault():CaseClass = {
11 | new CaseClass(1,true,2.5,"default", Some("val"))
12 | }
13 | }
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaCaseClass/testSpecs2/com/example/services/impl/UseCaseTest.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.scala.{CaseClass, Nested}
4 | import org.specs2.mutable.Specification
5 |
6 | /** created by TestMe integration test on MMXVI */
7 | class UseCaseTest extends Specification {
8 | val useCase = new UseCase()
9 |
10 | "UseCase" should {
11 |
12 | "make Default" in {
13 | val result = useCase.makeDefault
14 | result === new CaseClass(1, true, 100d, "case", Some("myName"), Some(new Nested(Some("arg"))))
15 | }
16 |
17 | "use" in {
18 | val result = useCase.use(new CaseClass(1, true, 100d, "case", Some("myName"), Some(new Nested(Some("arg")))))
19 | false //todo - validate something
20 | }
21 |
22 | }
23 | }
24 |
25 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaDependencyReturnsFuture/src/com/example/services/impl/Foo.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 | import com.example.common.LogSupport
3 | import com.example.foes.Fire
4 | import com.example.dependencies.TimeMachine
5 |
6 | import scala.concurrent.Future
7 |
8 |
9 | class Foo(timeMachine: TimeMachine) extends LogSupport{
10 | //
11 | val withFire: Fire = new Fire()
12 |
13 | def fight(optFire:Option[String]): Future[Double] ={
14 | logger.info("it's started...")
15 | println(withFire.getJavaBean.getMyString)
16 | timeMachine.lookInto()
17 | }
18 | }
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaDependencyReturnsFuture/testSpecs2/com/example/services/impl/FooTest.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.specs2.mutable.Specification
4 | import org.specs2.mock.Mockito
5 | import com.example.dependencies.TimeMachine
6 |
7 | import scala.concurrent.duration._
8 | import scala.concurrent.Await
9 |
10 | /** created by TestMe integration test on MMXVI */
11 | class FooTest extends Specification with Mockito {
12 | isolated
13 | val timeMachine: TimeMachine = mock[TimeMachine]
14 | val foo = new Foo(timeMachine)
15 |
16 | "Foo" should {
17 |
18 | "fight" in {
19 | timeMachine.lookInto() returns scala.concurrent.Future.successful(100d)
20 | val result = foo.fight(Some("optFire"))
21 | Await.result(result, 10.seconds) === 100d
22 | }
23 |
24 | }
25 | }
26 |
27 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaEnumeration/src/com/example/services/impl/Foo.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.scala.Planet
4 | import com.example.scala.WeekDay.WeekDay
5 |
6 | class Foo(weekDay: WeekDay){
7 | //
8 | def beamMeUp(planet:Planet.Value,shoppingDay:WeekDay, optWeekDay:Option[WeekDay]): String ={
9 | "I'm traveling to "+planet+" on "+weekDay+ " do some shopping on " +shoppingDay+"and maybe will return on "+optWeekDay
10 | }
11 | }
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaEnumeration/testSpecs2/com/example/services/impl/FooTest.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.specs2.mutable.Specification
4 |
5 | /** created by TestMe integration test on MMXVI */
6 | class FooTest extends Specification {
7 | val foo = new Foo(com.example.scala.WeekDay.Mon)
8 |
9 | "Foo" should {
10 |
11 | "beam Me Up" in {
12 | val result = foo.beamMeUp(com.example.scala.Planet.G, com.example.scala.WeekDay.Mon, Some(com.example.scala.WeekDay.Mon))
13 | result === "replaceMeWithExpectedResult"
14 | }
15 |
16 | }
17 | }
18 |
19 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaFuture/src/com/example/services/impl/Foo.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import scala.concurrent.ExecutionContext.Implicits.global
4 | import scala.concurrent.Future
5 |
6 |
7 | class Foo {
8 | //
9 | def findMeABetterFuture(hopes:Option[String]): Future[String] ={
10 | Future{
11 | "utopia"
12 | }
13 | }
14 | def lookIntoTheFuture(hopes:Future[Int]): Future[Float] ={
15 | Future(1.1f)
16 | }
17 | }
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaFuture/testSpecs2/com/example/services/impl/FooTest.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.specs2.mutable.Specification
4 | import scala.concurrent.duration._
5 | import scala.concurrent.Await
6 |
7 | /** created by TestMe integration test on MMXVI */
8 | class FooTest extends Specification {
9 | val foo = new Foo()
10 |
11 | "Foo" should {
12 |
13 | "look Into The Future" in {
14 | val result = foo.lookIntoTheFuture(scala.concurrent.Future.successful(1))
15 | Await.result(result, 10.seconds) === 1.1f
16 | }
17 |
18 | "find Me A Better Future" in {
19 | val result = foo.findMeABetterFuture(Some("hopes"))
20 | Await.result(result, 10.seconds) === "replaceMeWithExpectedResult"
21 | }
22 |
23 | }
24 | }
25 |
26 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaGenerics/src/com/example/services/impl/FooTrait.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | /**
4 | * Created by Admin on 24/12/2017.
5 | */
6 | trait FooTrait {
7 |
8 | }
9 | class Foo extends FooTrait {
10 | //
11 | def example(someTuple:(Option[Int],Option[List[List[Double]]]))={
12 | "something"
13 | }
14 |
15 | def tupleMaker(someInt:Option[Int])={
16 | ("someString",12.55,23)
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaGenerics/testSpecs2/com/example/services/impl/FooTest.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.specs2.mutable.Specification
4 |
5 | /** created by TestMe integration test on MMXVI */
6 | class FooTest extends Specification {
7 | val foo = new Foo()
8 |
9 | "Foo" should {
10 |
11 | "tuple Maker" in {
12 | val result = foo.tupleMaker(Some(1))
13 | result === ("replaceMeWithExpectedResult", 100d, 1)
14 | }
15 |
16 | "example" in {
17 | val result = foo.example((Some(1), Some(List(List(100d)))))
18 | result === "replaceMeWithExpectedResult"
19 | }
20 |
21 | }
22 | }
23 |
24 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaObject/src/com/example/services/impl/Foo.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.common.LogSupport
4 | import com.example.foes.Fire
5 | import com.example.warriers.FooFighter
6 | import com.example.warriers.impl.FooFighterImpl
7 |
8 | import scala.concurrent.ExecutionContext.Implicits.global
9 | import scala.concurrent.Future
10 |
11 |
12 | trait Foo extends LogSupport{
13 | val fooFighter:FooFighter
14 | val withFire: Fire = new Fire()
15 |
16 | def fight(optFire:Option[String]): Future[String] ={
17 | logger.info("invoking method of dependency directly...")
18 | Future{
19 | fooFighter.fight(withFire)
20 | }
21 | }
22 | def fightWithMap(optFire:Option[String]): Future[Option[String]] ={
23 | logger.info("using method of dependency as a passed refences...")
24 | Future{
25 | Some(withFire) map {
26 | fooFighter.fight
27 | }
28 | }
29 | }
30 | }
31 |
32 | object Foo extends Foo{
33 | val fooFighter = new FooFighterImpl()
34 | //
35 | }
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaObject/testSpecs2/com/example/services/impl/FooTest.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.specs2.mutable.Specification
4 | import scala.concurrent.duration._
5 | import scala.concurrent.Await
6 |
7 | /** created by TestMe integration test on MMXVI */
8 | class FooTest extends Specification {
9 |
10 | "Foo" should {
11 |
12 | "fight With Map" in {
13 | val result = Foo.fightWithMap(Some("optFire"))
14 | Await.result(result, 10.seconds) === Some("replaceMeWithExpectedResult")
15 | }
16 |
17 | "fight" in {
18 | val result = Foo.fight(Some("optFire"))
19 | Await.result(result, 10.seconds) === "replaceMeWithExpectedResult"
20 | }
21 |
22 | }
23 | }
24 |
25 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaRequireExecutionContext/src/com/example/services/impl/Foo.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 | import com.example.common.LogSupport
3 | import com.example.foes.Fire
4 | import com.example.warriers.FooFighter
5 |
6 | import scala.concurrent.{ExecutionContext, Future}
7 |
8 |
9 | class Foo(fooFighter: FooFighter, implicit val ec:ExecutionContext) extends LogSupport{
10 | //
11 | val withFire: Fire = new Fire()
12 |
13 | def fight(optFire:Option[String]) ={
14 | logger.info("it's started...")
15 | Future{
16 | fooFighter.fight(withFire)
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaRequireExecutionContext/testSpecs2/com/example/services/impl/FooTest.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.specs2.mutable.Specification
4 | import org.specs2.mock.Mockito
5 | import com.example.warriers.FooFighter
6 |
7 | import scala.concurrent.duration._
8 | import scala.concurrent.Await
9 |
10 | /** created by TestMe integration test on MMXVI */
11 | class FooTest extends Specification with Mockito {
12 | isolated
13 | val fooFighter: FooFighter = mock[FooFighter]
14 | val foo = new Foo(fooFighter, scala.concurrent.ExecutionContext.Implicits.global)
15 |
16 | "Foo" should {
17 |
18 | "fight" in {
19 | fooFighter.fight(any) returns "fightResponse"
20 | val result = foo.fight(Some("optFire"))
21 | Await.result(result, 10.seconds) === "replaceMeWithExpectedResult"
22 | }
23 |
24 | }
25 | }
26 |
27 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaSealedCaseClassEnum/src/com/example/services/impl/Foo.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.scala.{DayInAWeek, SolarSystemPlanets}
4 |
5 | class Foo(fromPlanet:SolarSystemPlanets.Planet){
6 | //
7 | def beamMeUp(toPlanet:SolarSystemPlanets.Planet, onDay:Option[DayInAWeek.EnumVal]): String ={
8 | s"preparing to beam you up from $fromPlanet to $toPlanet on $onDay"
9 | }
10 | }
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaSealedCaseClassEnum/testSpecs2/com/example/services/impl/FooTest.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.specs2.mutable.Specification
4 |
5 | /** created by TestMe integration test on MMXVI */
6 | class FooTest extends Specification {
7 | val foo = new Foo(com.example.scala.SolarSystemPlanets.MERCURY)
8 |
9 | "Foo" should {
10 |
11 | "beam Me Up" in {
12 | val result = foo.beamMeUp(com.example.scala.SolarSystemPlanets.MERCURY, Some(com.example.scala.DayInAWeek.Mon))
13 | result === "replaceMeWithExpectedResult"
14 | }
15 |
16 | }
17 | }
18 |
19 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaWithDependencies/src/com/example/services/impl/Foo.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.common.LogSupport
4 | import com.example.foes.Fire
5 | import com.example.warriers.FooFighter
6 |
7 | import scala.concurrent.ExecutionContext.Implicits.global
8 | import scala.concurrent.Future
9 |
10 |
11 | class Foo(fooFighter:FooFighter) extends LogSupport{
12 | //
13 | val withFire: Fire = new Fire()
14 |
15 | def fight(optFire:Option[String]): Future[String] ={
16 | logger.info("invoking method of dependency directly...")
17 | Future{
18 | fooFighter.fight(withFire)
19 | }
20 | }
21 | def fightWithMap(optFire:Option[String]): Future[Option[String]] ={
22 | logger.info("using method of dependency as a passed refences...")
23 | Future{
24 | Some(withFire) map {
25 | fooFighter.fight
26 | }
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/testData/testMeGenerator/scalaWithDependencies/testSpecs2/com/example/services/impl/FooTest.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.specs2.mutable.Specification
4 | import org.specs2.mock.Mockito
5 | import com.example.warriers.FooFighter
6 |
7 | import scala.concurrent.duration._
8 | import scala.concurrent.Await
9 |
10 | /** created by TestMe integration test on MMXVI */
11 | class FooTest extends Specification with Mockito {
12 | isolated
13 | val fooFighter: FooFighter = mock[FooFighter]
14 | val foo = new Foo(fooFighter)
15 |
16 | "Foo" should {
17 |
18 | "fight With Map" in {
19 | fooFighter.fight(any) returns "fightResponse"
20 | val result = foo.fightWithMap(Some("optFire"))
21 | Await.result(result, 10.seconds) === Some("replaceMeWithExpectedResult")
22 | }
23 |
24 | "fight" in {
25 | fooFighter.fight(any) returns "fightResponse"
26 | val result = foo.fight(Some("optFire"))
27 | Await.result(result, 10.seconds) === "replaceMeWithExpectedResult"
28 | }
29 |
30 | }
31 | }
32 |
33 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/settersOverCtor/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.JavaBean;
4 | import com.example.foes.Fire;
5 | import com.example.groovies.ImGroovy;
6 | import com.example.beans.SettersOverCtors;
7 | import com.example.warriers.FooFighter;
8 |
9 | import java.util.Collection;
10 |
11 | public class Foo {
12 |
13 | private FooFighter fooFighter;
14 |
15 | public Collection find(Collection beans, ImGroovy theOne) {
16 | System.out.println(theOne);
17 | System.out.println(beans.toString());
18 | return beans;
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/simpleClass/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.warriers.FooFighter;
4 | import com.example.foes.Fire;
5 |
6 | public class Foo{
7 |
8 | private FooFighter fooFighter;
9 |
10 | public String fight(Fire withFire,String foeName) {
11 | return fooFighter.fight(withFire);
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/simpleClass/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import org.junit.Assert;
4 | import org.junit.Test;
5 | import org.junit.Before;
6 | import org.mockito.InjectMocks;
7 | import org.mockito.Mock;
8 | import org.mockito.MockitoAnnotations;
9 |
10 | import static org.mockito.Mockito.*;
11 |
12 | /**
13 | * created by TestMe integration test on MMXVI
14 | */
15 | public class FooTest {
16 | @Mock
17 | com.example.warriers.FooFighter fooFighter;
18 | @InjectMocks
19 | Foo foo;
20 |
21 | @Before
22 | public void setUp() {
23 | MockitoAnnotations.initMocks(this);
24 | }
25 |
26 | @Test
27 | public void testFight() throws Exception {
28 | String result = foo.fight(new com.example.foes.Fire(), "foeName");
29 | Assert.assertEquals("replaceMeWithExpectedResult", result);
30 | }
31 | }
32 |
33 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/simpleClass/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.junit.Test
4 | import org.junit.Before
5 | import org.mockito.InjectMocks
6 | import org.mockito.Mock
7 | import org.mockito.MockitoAnnotations
8 | import static org.mockito.Mockito.*
9 |
10 | /** created by TestMe integration test on MMXVI */
11 | class FooTest {
12 | @Mock
13 | com.example.warriers.FooFighter fooFighter
14 | @InjectMocks
15 | com.example.services.impl.Foo foo
16 |
17 | @Before
18 | void setUp() {
19 | MockitoAnnotations.initMocks(this)
20 | }
21 |
22 | @Test
23 | void testFight() {
24 | java.lang.String result = foo.fight(new com.example.foes.Fire(), "foeName")
25 | assert result == "replaceMeWithExpectedResult"
26 | }
27 | }
28 |
29 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/simpleClass/testJunit5/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import org.junit.jupiter.api.Assertions;
4 | import org.junit.jupiter.api.Test;
5 | import org.junit.jupiter.api.BeforeEach;
6 | import org.mockito.InjectMocks;
7 | import org.mockito.Mock;
8 | import org.mockito.MockitoAnnotations;
9 |
10 | import static org.mockito.Mockito.*;
11 |
12 | /**
13 | * created by TestMe integration test on MMXVI
14 | */
15 | class FooTest {
16 | @Mock
17 | com.example.warriers.FooFighter fooFighter;
18 | @InjectMocks
19 | Foo foo;
20 |
21 | @BeforeEach
22 | void setUp() {
23 | MockitoAnnotations.initMocks(this);
24 | }
25 |
26 | @Test
27 | void testFight() {
28 | String result = foo.fight(new com.example.foes.Fire(), "foeName");
29 | Assertions.assertEquals("replaceMeWithExpectedResult", result);
30 | }
31 | }
32 |
33 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/simpleClass/testSpecs2/com/example/services/impl/FooTest.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.specs2.mutable.Specification
4 |
5 | /** created by TestMe integration test on MMXVI */
6 | class FooTest extends Specification {
7 | val foo = new Foo()
8 |
9 | "Foo" should {
10 |
11 | "fight" in {
12 | val result = foo.fight(new com.example.foes.Fire(), "foeName")
13 | result === "replaceMeWithExpectedResult"
14 | }
15 |
16 | }
17 | }
18 |
19 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/simpleClass/testTestNg/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import org.testng.Assert;
4 | import org.testng.annotations.Test;
5 | import org.testng.annotations.BeforeMethod;
6 | import org.mockito.InjectMocks;
7 | import org.mockito.Mock;
8 | import org.mockito.MockitoAnnotations;
9 |
10 | import static org.mockito.Mockito.*;
11 |
12 | /**
13 | * created by TestMe integration test on MMXVI
14 | */
15 | public class FooTest {
16 | @Mock
17 | com.example.warriers.FooFighter fooFighter;
18 | @InjectMocks
19 | Foo foo;
20 |
21 | @BeforeMethod
22 | public void setUp() {
23 | MockitoAnnotations.initMocks(this);
24 | }
25 |
26 | @Test
27 | public void testFight() {
28 | String result = foo.fight(new com.example.foes.Fire(), "foeName");
29 | Assert.assertEquals(result, "replaceMeWithExpectedResult");
30 | }
31 | }
32 |
33 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/static/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.warriers.FooFighter;
4 | import com.example.foes.Fire;
5 |
6 | public class Foo{
7 |
8 | private FooFighter fooFighter;
9 |
10 | public static String fight(Fire withFire,String foeName) {
11 | return foeName;
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/static/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import com.example.warriers.FooFighter;
5 | import org.junit.Assert;
6 | import org.junit.Test;
7 | import org.junit.Before;
8 | import org.mockito.InjectMocks;
9 | import org.mockito.Mock;
10 | import org.mockito.MockitoAnnotations;
11 |
12 | import static org.mockito.Mockito.*;
13 |
14 | /** created by TestMe integration test on MMXVI */
15 | public class FooTest {
16 | @Mock
17 | FooFighter fooFighter;
18 | @InjectMocks
19 | Foo foo;
20 |
21 | @Before
22 | public void setUp() {
23 | MockitoAnnotations.initMocks(this);
24 | }
25 |
26 | @Test
27 | public void testFight() throws Exception {
28 | String result = Foo.fight(new Fire(), "foeName");
29 | Assert.assertEquals("replaceMeWithExpectedResult", result);
30 | }
31 | }
32 |
33 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/static/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.foes.Fire
4 | import com.example.warriers.FooFighter
5 | import org.junit.Test
6 | import org.junit.Before
7 | import org.mockito.InjectMocks
8 | import org.mockito.Mock
9 | import org.mockito.MockitoAnnotations
10 | import static org.mockito.Mockito.*
11 |
12 | /** created by TestMe integration test on MMXVI */
13 | class FooTest {
14 | @Mock
15 | FooFighter fooFighter
16 | @InjectMocks
17 | Foo foo
18 |
19 | @Before
20 | void setUp() {
21 | MockitoAnnotations.initMocks(this)
22 | }
23 |
24 | @Test
25 | void testFight() {
26 | String result = Foo.fight(new Fire(), "foeName")
27 | assert result == "replaceMeWithExpectedResult"
28 | }
29 | }
30 |
31 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/staticFieldless/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.warriers.FooFighter;
4 | import com.example.foes.Fire;
5 |
6 | public class Foo{
7 |
8 | public static String fight(Fire withFire,String foeName) {
9 | return foeName;
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/staticFieldless/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import org.junit.Assert;
5 | import org.junit.Test;
6 |
7 | /**
8 | * created by TestMe integration test on MMXVI
9 | */
10 | public class FooTest {
11 |
12 | @Test
13 | public void testFight() throws Exception {
14 | String result = Foo.fight(new Fire(), "foeName");
15 | Assert.assertEquals("replaceMeWithExpectedResult", result);
16 | }
17 | }
18 |
19 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/staticFieldless/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.foes.Fire
4 | import org.junit.Test
5 |
6 | /** created by TestMe integration test on MMXVI */
7 | class FooTest {
8 |
9 | @Test
10 | void testFight() {
11 | String result = Foo.fight(new Fire(), "foeName")
12 | assert result == "replaceMeWithExpectedResult"
13 | }
14 | }
15 |
16 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/typeInDefaultPackageCollision/src/Foo.java:
--------------------------------------------------------------------------------
1 | import com.example.warriers.FooFighter;
2 |
3 |
4 | public class Foo {
5 |
6 | private FooFighter fooFighter;
7 |
8 | private com.example.foes.Fire fireOfFoe;
9 |
10 | public String fight(Fire greatBallsOf, com.example.hole.Fire inTheHole) {
11 | System.out.println(greatBallsOf);
12 | System.out.println(inTheHole);
13 | return fooFighter.fight(fireOfFoe);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/typeInDefaultPackageCollision/test/FooTest.java:
--------------------------------------------------------------------------------
1 | import org.junit.Assert;
2 | import org.junit.Test;
3 | import org.junit.Before;
4 | import org.mockito.InjectMocks;
5 | import org.mockito.Mock;
6 | import org.mockito.MockitoAnnotations;
7 |
8 | import static org.mockito.Mockito.*;
9 |
10 | /**
11 | * created by TestMe integration test on MMXVI
12 | */
13 | public class FooTest {
14 | @Mock
15 | com.example.warriers.FooFighter fooFighter;
16 | @Mock
17 | com.example.foes.Fire fireOfFoe;
18 | @InjectMocks
19 | Foo foo;
20 |
21 | @Before
22 | public void setUp() {
23 | MockitoAnnotations.initMocks(this);
24 | }
25 |
26 | @Test
27 | public void testFight() throws Exception {
28 | String result = foo.fight(new Fire(), new com.example.hole.Fire());
29 | Assert.assertEquals("replaceMeWithExpectedResult", result);
30 | }
31 | }
32 |
33 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/typeInDefaultPackageCollision/testGroovy/FooTest.groovy:
--------------------------------------------------------------------------------
1 | import org.junit.Test
2 | import org.junit.Before
3 | import org.mockito.InjectMocks
4 | import org.mockito.Mock
5 | import org.mockito.MockitoAnnotations
6 | import static org.mockito.Mockito.*
7 |
8 | /** created by TestMe integration test on MMXVI */
9 | class FooTest {
10 | @Mock
11 | com.example.warriers.FooFighter fooFighter
12 | @Mock
13 | com.example.foes.Fire fireOfFoe
14 | @InjectMocks
15 | Foo foo
16 |
17 | @Before
18 | void setUp() {
19 | MockitoAnnotations.initMocks(this)
20 | }
21 |
22 | @Test
23 | void testFight() {
24 | java.lang.String result = foo.fight(new Fire(), new com.example.hole.Fire())
25 | assert result == "replaceMeWithExpectedResult"
26 | }
27 | }
28 |
29 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/typeNameCollision/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 |
4 | import com.example.warriers.FooFighter;
5 | import com.example.foes.Fire;
6 |
7 |
8 | public class Foo{
9 |
10 | private FooFighter fooFighter;
11 |
12 | public Fire fight(Fire fireOfFoe, com.example.hole.Fire inTheHole) {
13 | System.out.println(inTheHole);
14 | System.out.println(fooFighter.fight(fireOfFoe));
15 | return fireOfFoe;
16 | }
17 | }
--------------------------------------------------------------------------------
/testData/testMeGenerator/typeNameCollision/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import com.example.warriers.FooFighter;
5 | import org.junit.Assert;
6 | import org.junit.Test;
7 | import org.junit.Before;
8 | import org.mockito.InjectMocks;
9 | import org.mockito.Mock;
10 | import org.mockito.MockitoAnnotations;
11 |
12 | import static org.mockito.Mockito.*;
13 |
14 | /** created by TestMe integration test on MMXVI */
15 | public class FooTest {
16 | @Mock
17 | FooFighter fooFighter;
18 | @InjectMocks
19 | Foo foo;
20 |
21 | @Before
22 | public void setUp() {
23 | MockitoAnnotations.initMocks(this);
24 | }
25 |
26 | @Test
27 | public void testFight() throws Exception {
28 | Fire result = foo.fight(new Fire(), new com.example.hole.Fire());
29 | Assert.assertEquals(new Fire(), result);
30 | }
31 | }
32 |
33 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/typeNameCollision/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.foes.Fire
4 | import com.example.warriers.FooFighter
5 | import org.junit.Test
6 | import org.junit.Before
7 | import org.mockito.InjectMocks
8 | import org.mockito.Mock
9 | import org.mockito.MockitoAnnotations
10 | import static org.mockito.Mockito.*
11 |
12 | /** created by TestMe integration test on MMXVI */
13 | class FooTest {
14 | @Mock
15 | FooFighter fooFighter
16 | @InjectMocks
17 | Foo foo
18 |
19 | @Before
20 | void setUp() {
21 | MockitoAnnotations.initMocks(this)
22 | }
23 |
24 | @Test
25 | void testFight() {
26 | Fire result = foo.fight(new Fire(), new com.example.hole.Fire())
27 | assert result == new Fire()
28 | }
29 | }
30 |
31 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/utilWithoutAccessableCtor/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.warriers.FooFighter;
4 | import com.example.foes.Fire;
5 |
6 | public class Foo {
7 |
8 | private static FooFighter fooFighter = new FearFighterImpl();
9 |
10 | public static String fight(Fire withFire,String foeName) {
11 | fooFighter.fight(withFire);
12 | return foeName;
13 | }
14 |
15 | private Foo() {
16 |
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/utilWithoutAccessableCtor/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import org.junit.Assert;
5 | import org.junit.Test;
6 |
7 | /**
8 | * created by TestMe integration test on MMXVI
9 | */
10 | public class FooTest {
11 |
12 | @Test
13 | public void testFight() throws Exception {
14 | String result = Foo.fight(new Fire(), "foeName");
15 | Assert.assertEquals("replaceMeWithExpectedResult", result);
16 | }
17 | }
18 |
19 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/utilWithoutAccessableCtor/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.foes.Fire
4 | import org.junit.Test
5 |
6 | /** created by TestMe integration test on MMXVI */
7 | class FooTest {
8 |
9 | @Test
10 | void testFight() {
11 | String result = Foo.fight(new Fire(), "foeName")
12 | assert result == "replaceMeWithExpectedResult"
13 | }
14 | }
15 |
16 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/utilWithoutAccessableCtor/testJunit5/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import org.junit.jupiter.api.Assertions;
5 | import org.junit.jupiter.api.Test;
6 |
7 | /**
8 | * created by TestMe integration test on MMXVI
9 | */
10 | class FooTest {
11 |
12 | @Test
13 | void testFight() {
14 | String result = Foo.fight(new Fire(), "foeName");
15 | Assertions.assertEquals("replaceMeWithExpectedResult", result);
16 | }
17 | }
18 |
19 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/utilWithoutAccessableCtor/testTestNg/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.foes.Fire;
4 | import org.testng.Assert;
5 | import org.testng.annotations.Test;
6 |
7 | /**
8 | * created by TestMe integration test on MMXVI
9 | */
10 | public class FooTest {
11 |
12 | @Test
13 | public void testFight() {
14 | String result = Foo.fight(new Fire(), "foeName");
15 | Assert.assertEquals(result, "replaceMeWithExpectedResult");
16 | }
17 | }
18 |
19 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/variousFieldTypes/testSpecs2/com/example/services/impl/FooTest.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import com.example.foes.Fire
4 | import org.specs2.mutable.Specification
5 |
6 | /** created by TestMe integration test on MMXVI */
7 | class FooTest extends Specification {
8 | val foo = new Foo()
9 |
10 | "Foo" should {
11 |
12 | "fight" in {
13 | val result = foo.fight(new Fire(), "foeName")
14 | result === "replaceMeWithExpectedResult"
15 | }
16 |
17 | }
18 | }
19 |
20 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/variousTypesOfArguments/testSpecs2/com/example/services/impl/FooTest.scala:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.specs2.mutable.Specification
4 | import org.specs2.mock.Mockito
5 |
6 | /** created by TestMe integration test on MMXVI */
7 | class FooTest extends Specification with Mockito {
8 | isolated
9 | val fooFighter: com.example.warriers.FooFighter = mock[com.example.warriers.FooFighter]
10 | val innerStaticClass: com.example.services.impl.Foo.InnerStaticClass = mock[com.example.services.impl.Foo.InnerStaticClass]
11 | val foo = new Foo(fooFighter, 64.toByte, 1, 12345l, 1.1f, 100d, true, 'c', 21.toShort, innerStaticClass)
12 |
13 | "Foo" should {
14 |
15 | "various Args" in {
16 | fooFighter.fight(any) returns "fightResponse"
17 | val result = foo.variousArgs(new com.example.foes.Fire(), "foeName", 64.toByte, 1, 12345l, 1.1f, 100d, true, 'c', 21.toShort, BigDecimal(2.44).bigDecimal, BigInt(123123).bigInteger, new java.util.GregorianCalendar(2016, java.util.Calendar.JANUARY, 11, 22, 45).getTime, java.time.LocalDateTime.of(2016, java.time.Month.JANUARY, 11, 22, 45, 55).toInstant(java.time.ZoneOffset.UTC))
18 | result === "replaceMeWithExpectedResult"
19 | }
20 |
21 | }
22 | }
23 |
24 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/verifyMethodCall/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.beans.ConvertedBean;
4 | import java.util.function.Supplier;
5 | import com.example.dependencies.Logger;
6 | import com.example.foes.Fear;
7 | import com.example.foes.Fire;
8 | import com.example.foes.Ice;
9 | import com.example.warriers.TechFighter;
10 |
11 | public class Foo{
12 |
13 | private TechFighter techFighter;
14 | private Supplier result;
15 |
16 | public String fight(Fire withFire,String foeName) {
17 | techFighter.initSelfArming("gun");
18 | String fail = techFighter.fight(withFire);
19 | ConvertedBean convertedBean = techFighter.surrender(new Fear(), new Ice(), 666);
20 | convertedBean.setSomeNum(result.get());
21 | return "returning response from dependency "+ fail + " " + convertedBean.getMyString();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/withFinalTypeDependency/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.warriers.FooFighter;
4 | import com.example.foes.Fire;
5 | import com.example.warriers.impl.FinalCountdown;
6 | import java.math.BigDecimal;
7 |
8 | public class Foo{
9 |
10 | private FinalCountdown finalCountdown;
11 |
12 | public BigDecimal count(Integer start) {
13 | return finalCountdown.count(start);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/withFinalTypeDependency/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import org.junit.Assert;
4 | import org.junit.Test;
5 |
6 | import java.math.BigDecimal;
7 |
8 | /**
9 | * created by TestMe integration test on MMXVI
10 | */
11 | public class FooTest {
12 | //Field finalCountdown of type FinalCountdown - was not mocked since Mockito doesn't mock a Final class when 'mock-maker-inline' option is not set
13 | Foo foo = new Foo();
14 |
15 | @Test
16 | public void testCount() throws Exception {
17 | BigDecimal result = foo.count(Integer.valueOf(0));
18 | Assert.assertEquals(new BigDecimal(0), result);
19 | }
20 | }
21 |
22 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/withFinalTypeDependency/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.junit.Test
4 |
5 | /** created by TestMe integration test on MMXVI */
6 | class FooTest {
7 | //Field finalCountdown of type FinalCountdown - was not mocked since Mockito doesn't mock a Final class when 'mock-maker-inline' option is not set
8 | Foo foo = new Foo()
9 |
10 | @Test
11 | void testCount() {
12 | BigDecimal result = foo.count(0)
13 | assert result == 0 as BigDecimal
14 | }
15 | }
16 |
17 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/withFinalTypeDependencyMockable/resources/mockito-extensions/org.mockito.plugins.MockMaker:
--------------------------------------------------------------------------------
1 | ####
2 | mock-maker-inline
3 | ####
4 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/withFinalTypeDependencyMockable/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.warriers.FooFighter;
4 | import com.example.foes.Fire;
5 | import com.example.warriers.impl.FinalCountdown;
6 | import java.math.BigDecimal;
7 |
8 | public class Foo{
9 |
10 | private FinalCountdown finalCountdown;
11 |
12 | public BigDecimal count(Integer start) {
13 | return finalCountdown.count(start);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/withFinalTypeDependencyMockable/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import org.junit.Assert;
4 | import org.junit.Test;
5 |
6 | import java.math.BigDecimal;
7 | import org.mockito.InjectMocks
8 | import org.mockito.Mock
9 | import org.mockito.MockitoAnnotations
10 | import static org.mockito.Mockito.*
11 |
12 | /**
13 | * created by TestMe integration test on MMXVI
14 | */
15 | public class FooTest {
16 | @Mock
17 | FinalCountdown finalCountdown;
18 | Foo foo = new Foo();
19 |
20 | @InjectMocks
21 | Foo foo
22 |
23 | @Before
24 | void setUp() {
25 | MockitoAnnotations.initMocks(this)
26 | }
27 | @Test
28 | public void testCount() throws Exception {
29 | BigDecimal result = foo.count(Integer.valueOf(0));
30 | Assert.assertEquals(new BigDecimal(0), result);
31 | }
32 | }
33 |
34 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/withFinalTypeDependencyMockable/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.junit.Test
4 | import org.junit.Before
5 | import org.mockito.InjectMocks
6 | import org.mockito.Mock
7 | import org.mockito.MockitoAnnotations
8 | import static org.mockito.Mockito.*
9 |
10 | /** created by TestMe integration test on MMXVI */
11 | class FooTest {
12 | @Mock
13 | FinalCountdown finalCountdown;
14 |
15 | @InjectMocks
16 | com.example.services.impl.Foo foo
17 |
18 | @Before
19 | void setUp() {
20 | MockitoAnnotations.initMocks(this)
21 | }
22 |
23 | @Test
24 | void testCount() {
25 | BigDecimal result = foo.count(Integer.valueOf(0))
26 | assert result == new BigDecimal(0)
27 | }
28 | }
29 |
30 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/withSetters/src/com/example/services/impl/Foo.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import com.example.warriers.FooFighter;
4 | import com.example.foes.Fear;
5 |
6 | public class Foo{
7 |
8 | private FooFighter fooFighter;
9 | private FooFighter fooFighterProperty;
10 |
11 | public String fight(Fear urFear,String foeName) {
12 | return fooFighter.fight(urFear);
13 | }
14 |
15 | public void setFooFighter(FooFighter fooFighter){
16 | this.fooFighter=fooFighter;
17 | }
18 | public void setFooFighterProperty(FooFighter fooFighterProperty){
19 | this.fooFighterProperty=fooFighterProperty;
20 | }
21 | public FooFighter getFooFighterProperty(){
22 | return fooFighterProperty;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/testData/testMeGenerator/withSetters/test/com/example/services/impl/FooTest.java:
--------------------------------------------------------------------------------
1 | package com.example.services.impl;
2 |
3 | import org.junit.Assert;
4 | import org.junit.Test;
5 | import org.junit.Before;
6 | import org.mockito.InjectMocks;
7 | import org.mockito.Mock;
8 | import org.mockito.MockitoAnnotations;
9 |
10 | import static org.mockito.Mockito.*;
11 |
12 | /**
13 | * created by TestMe integration test on MMXVI
14 | */
15 | public class FooTest {
16 | @Mock
17 | com.example.warriers.FooFighter fooFighter;
18 | @Mock
19 | com.example.warriers.FooFighter fooFighterProperty;
20 | @InjectMocks
21 | Foo foo;
22 |
23 | @Before
24 | public void setUp() {
25 | MockitoAnnotations.initMocks(this);
26 | }
27 |
28 | @Test
29 | public void testFight() throws Exception {
30 | String result = foo.fight(new com.example.foes.Fear(), "foeName");
31 | Assert.assertEquals("replaceMeWithExpectedResult", result);
32 | }
33 | }
34 |
35 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testData/testMeGenerator/withSetters/testGroovy/com/example/services/impl/FooTest.groovy:
--------------------------------------------------------------------------------
1 | package com.example.services.impl
2 |
3 | import org.junit.Test
4 | import org.junit.Before
5 | import org.mockito.InjectMocks
6 | import org.mockito.Mock
7 | import org.mockito.MockitoAnnotations
8 | import static org.mockito.Mockito.*
9 |
10 | /** created by TestMe integration test on MMXVI */
11 | class FooTest {
12 | @Mock
13 | com.example.warriers.FooFighter fooFighter
14 | @Mock
15 | com.example.warriers.FooFighter fooFighterProperty
16 | @InjectMocks
17 | com.example.services.impl.Foo foo
18 |
19 | @Before
20 | void setUp() {
21 | MockitoAnnotations.initMocks(this)
22 | }
23 |
24 | @Test
25 | void testFight() {
26 | java.lang.String result = foo.fight(new com.example.foes.Fear(), "foeName")
27 | assert result == "replaceMeWithExpectedResult"
28 | }
29 | }
30 |
31 | //Generated with love by TestMe :) Please raise issues & feature requests at: https://weirddev.com/forum#!/testme
--------------------------------------------------------------------------------
/testme-intellij-common/src/main/java/com/weirddev/testme/intellij/common/utils/PsiMethodUtils.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.common.utils;
2 |
3 | import com.intellij.psi.PsiMethod;
4 | import com.intellij.psi.PsiParameter;
5 |
6 | /**
7 | * Date: 28/12/2017
8 | *
9 | * @author Yaron Yamin
10 | */
11 | public class PsiMethodUtils {
12 |
13 | public static String formatMethodId(PsiMethod psiMethod) {
14 | String name = psiMethod.getName();
15 | String ownerClassCanonicalType = psiMethod.getContainingClass() == null ? null : psiMethod.getContainingClass().getQualifiedName();
16 | return ownerClassCanonicalType + "#" + name + "(" + formatMethodParams(psiMethod.getParameterList().getParameters()) + ")";
17 | }
18 |
19 | private static String formatMethodParams(PsiParameter[] parameters) {
20 | final StringBuilder sb = new StringBuilder();
21 | if (parameters != null) {
22 | for (PsiParameter parameter : parameters) {
23 | sb.append(parameter.getType().getCanonicalText()).append(",");
24 | }
25 | }
26 | if (!sb.isEmpty()) {
27 | sb.deleteCharAt(sb.length() - 1);
28 | }
29 | return sb.toString();
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/testme-intellij-common/src/main/java/com/weirddev/testme/intellij/resolvers/to/MethodCallArg.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.resolvers.to;
2 |
3 | /**
4 | * Date: 23/06/2017
5 | *
6 | * @author Yaron Yamin
7 | */
8 | public class MethodCallArg {
9 | private final String text;
10 |
11 | public MethodCallArg(String text) {
12 |
13 | this.text = text;
14 | }
15 |
16 | public String getText() {
17 | return text;
18 | }
19 |
20 | @Override
21 | public boolean equals(Object o) {
22 | if (this == o) return true;
23 | if (!(o instanceof MethodCallArg)) return false;
24 |
25 | MethodCallArg that = (MethodCallArg) o;
26 |
27 | return text != null ? text.equals(that.text) : that.text == null;
28 | }
29 |
30 | @Override
31 | public int hashCode() {
32 | return text != null ? text.hashCode() : 0;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/testme-intellij-common/src/main/java/com/weirddev/testme/intellij/resolvers/to/ResolvedMethodCall.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.resolvers.to;
2 |
3 | import com.intellij.psi.PsiMethod;
4 | import com.weirddev.testme.intellij.common.utils.PsiMethodUtils;
5 | import lombok.EqualsAndHashCode;
6 | import lombok.Getter;
7 | import lombok.ToString;
8 |
9 | import java.util.List;
10 |
11 | /**
12 | * Date: 16/09/2017
13 | *
14 | * @author Yaron Yamin
15 | */
16 | @Getter @EqualsAndHashCode(onlyExplicitlyIncluded = true) @ToString(onlyExplicitlyIncluded = true)
17 | public class ResolvedMethodCall {
18 | private final PsiMethod psiMethod;
19 | private final List methodCallArguments;
20 | @EqualsAndHashCode.Include @ToString.Include private final String methodId;
21 |
22 | public ResolvedMethodCall(PsiMethod psiMethod, List methodCallArguments) {
23 | this.psiMethod = psiMethod;
24 | this.methodCallArguments = methodCallArguments;
25 | methodId = PsiMethodUtils.formatMethodId(psiMethod);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/testme-intellij-common/src/main/java/com/weirddev/testme/intellij/resolvers/to/ResolvedReference.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.resolvers.to;
2 |
3 | import com.intellij.psi.PsiType;
4 |
5 | /**
6 | * Date: 10/05/2017
7 | *
8 | * @author Yaron Yamin
9 | */
10 | public class ResolvedReference {
11 | private final String referenceName;
12 | private final PsiType refType;
13 | private final PsiType psiOwnerType;
14 |
15 | public ResolvedReference(String referenceName, PsiType refType, PsiType psiOwnerType) {
16 |
17 | this.referenceName = referenceName;
18 | this.refType = refType;
19 | this.psiOwnerType = psiOwnerType;
20 | }
21 |
22 | public String getReferenceName() {
23 | return referenceName;
24 | }
25 |
26 | public PsiType getRefType() {
27 | return refType;
28 | }
29 |
30 | public PsiType getPsiOwnerType() {
31 | return psiOwnerType;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/testme-intellij-groovy/src/main/java/com/weirddev/testme/intellij/groovy/resolvers/GroovyPropertyUtil.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.groovy.resolvers;
2 |
3 | import com.intellij.openapi.fileTypes.FileType;
4 | import com.intellij.psi.PsiMethod;
5 | import org.jetbrains.annotations.Nullable;
6 | import org.jetbrains.plugins.groovy.GroovyFileType;
7 | import org.jetbrains.plugins.groovy.lang.psi.util.GroovyPropertyUtils;
8 |
9 | /**
10 | * A wrapper to IJ GroovyPropertyUtils, used to isolate groovy plugin so there will be not attempts to load it at runtime when its not available
11 | * User: yaron.yamin
12 | * Date: 11/1/2017
13 | * Time: 4:23 PM
14 | */
15 | public class GroovyPropertyUtil
16 | {
17 | public static boolean isPropertySetter(@Nullable PsiMethod method) {
18 | return GroovyPropertyUtils.isSimplePropertySetter(method);
19 | }
20 | public static boolean isPropertySetter(@Nullable PsiMethod method, String propertyName) {
21 | return GroovyPropertyUtils.isSimplePropertySetter(method, propertyName);
22 | }
23 | public static boolean isPropertyGetter(@Nullable PsiMethod method) {
24 | return GroovyPropertyUtils.isSimplePropertyGetter(method);
25 | }
26 |
27 | public static FileType getGroovyFileType() {
28 | return GroovyFileType.GROOVY_FILE_TYPE;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/testme-intellij-scala/src/main/java/com/weirddev/testme/intellij/scala/resolvers/ScalaPsiRefactoringUtils.java:
--------------------------------------------------------------------------------
1 | package com.weirddev.testme.intellij.scala.resolvers;
2 |
3 | import com.intellij.openapi.project.Project;
4 | import com.intellij.psi.PsiElement;
5 | import com.intellij.psi.PsiFile;
6 | import com.intellij.psi.PsiFileFactory;
7 | import com.weirddev.testme.intellij.common.utils.LanguageUtils;
8 |
9 | /**
10 | * Date: 14/07/2018
11 | *
12 | * @author Yaron Yamin
13 | */
14 | public class ScalaPsiRefactoringUtils {
15 | public static PsiElement createScalaImport(Project project, String importText) {
16 | final PsiFile fileFromText = PsiFileFactory.getInstance(project).createFileFromText("dummy.scala" , LanguageUtils.getScalaLang(), importText);
17 | return fileFromText.getFirstChild();
18 | }
19 | }
--------------------------------------------------------------------------------