Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify Output Files Source Location #553

Open
fabunde opened this issue Sep 17, 2024 · 2 comments
Open

Specify Output Files Source Location #553

fabunde opened this issue Sep 17, 2024 · 2 comments

Comments

@fabunde
Copy link

fabunde commented Sep 17, 2024

I have added the following configuration to specify my source directory to use the source of the pre-compiled class but the approve.txt and receive.txt files are saved in the compile location (something like user/.cache/...). Is there a separate configuration to specify the output source?

I have tried the Package settings method but this doesn't change the source, only the path:
public class PackageSettings { public static String ApprovalBaseDirectory = "../resources"; }

My configuration to specify path (with test):
` @test
public void testPresentAvailabilityItems() {
List items =
presenter.presentAvailabilityItems(
PriceAvailabilityDataPresenter.CONTENT_ITEM_TYPES_IN_ORDER, false, false, true);

// begin-snippet: define_alternative_source_directory_finder
Function2<Class, String, File> myFinder = new Function2<Class, String, File>()
{
  @Override
  public File call(Class clazz, String fileName)
  {
    System.out.println("source: "+ clazz.getPackage().getName().replaceAll("\\.", "/"));
    return new File("src/test/java/" + clazz.getPackage().getName().replaceAll("\\.", "/"));
  }
};
// end-snippet
// begin-snippet: configure_alternative_source_directory
try (SourceDirectoryRestorer sdr = registerSourceDirectoryFinder(myFinder))
{
  Approvals.verify("Ragunath");
}`

If there's a configuration to specify the location of the test result files, please point me in the right direction. I'm using version 24.

@LarsEckart
Copy link
Contributor

LarsEckart commented Sep 23, 2024

Are you available to pair with us next Monday, 2024-09-30 at https://www.worldtimebuddy.com/?qm=1&lid=4887398,2950159&h=4887398&date=2024-9-23&sln=11-13&hf=0

We'd like to understand your problem better.

@fabunde
Copy link
Author

fabunde commented Sep 23, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants