Giter Site home page Giter Site logo

junithelper's Introduction

junithelper's People

Contributors

fofocx avatar seratch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

junithelper's Issues

should use project not workspace Absolute Path, because some project not under default workspace home dir

when the project source is not under default workspace home dir, junithelper will still create the test class file under workspace home, then user can't see the test file.

replace follow code:
String projectRootAbsolutePath = getWorkspaceRootAbsolutePath(getIWorkspaceRoot())
+ StringValue.DirectorySeparator.General + projectName + StringValue.DirectorySeparator.General;

with these code:
String projectRootAbsolutePath = getIProject(projectName).getLocation() + StringValue.DirectorySeparator.General;

New test class does not get created

I find a class without tests and click alt+9. My test class does not get created.

I get the following message:

Resource ClassTest does not exist.

creation of test classes fails on nested maven project

Hi,

I am using version 1.12.0 of the eclipse plugin.

when I try to create a test class on a nested Maven project with ALT+9 this error is showing up:

Resource refresh error occurred.
Please check access permission to write on directories or files.

It works without a problem if I do the same for a regular Maven project.

the project structure in workspace is

/workspace/
/workspace/project1/pom.xml
/workspace/project1/project1-a/pom.xml
/workspace/project1/project1-a/src/
/workspace/project1/project1-a/src/main
/workspace/project1/project1-a/src/main/java/
/workspace/project1/project1-a/src/test
/workspace/project1/project1-a/src/test/java/

project1-a is a module of project1.
both are setup as separate eclipse projects, created by m2e "import from repository"

Enhancement: Allow for generating a unit test class for each class individually

Thank you for this helpful tool! I'm dealing with a large code base with little test classes. I would like the ability to use this tool to generate test classes incrementally. That is, I would like to have the option to specify the testClassSourceCode instead of a directoryPathOfTestSourceCode

TestClass

I would then be able to parameterize the maven build like so:

${TestClassSourceCode}

and run the Maven build as:

mvn junithelper:make -DTestClassSourceCode=TestClass

This would fit nicely in a workflow of 1) generate a test class 2) implement the test logic 3) run the test. I'm thinking of using this in conjunction with surefire plugin of running a Single Test during development: http://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html

I got a bug.

Now i provide you the test case with bug:
Under Test Class : SourceCodeAppender
Under Test Method : appendExtensionPostAssignSourceCode
Case:

    @Test
public void appendExtensionPostAssignSourceCode_A$StringBuilder$String_Real$List_Real$String_Real() {
    LineBreakProvider lineBreakProvider = new LineBreakProvider(config,
            currentLineBreak);
    SourceCodeAppender target = new SourceCodeAppender(lineBreakProvider,
            indentationProvider);
    StringBuilder buf = new StringBuilder();
    String code = "DependencyFactory.build({arg});";
    String[] fromList = new String[] { "\\{arg\\}", "\\{instance\\}" };
    String to = "caseDependency";
    target.appendExtensionPostAssignSourceCode(buf, code, fromList, to);
    assertThat(buf.toString().trim(),
            is(equalTo("DependencyFactory.build(caseDependency);".trim())));
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.