question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

new `DefaultTestLoader` does not support default arguments

See original GitHub issue

@christophd the new DefaultTestLoader has just an empty constructor. the old one (XmlTestLoader) had some arguments to it.

should I add a second constructor or would you prefer a builder pattern?

e.g.

    public DefaultTestLoader() {
        // Standard constructor
    }

    public DefaultTestLoader(Class<?> testClass, String testName, String packageName, CitrusContext citrusContext) {
        this.testClass = testClass;
        this.testName = testName;
        this.packageName = packageName;
        this.citrusContext = citrusContext;
    }

or

    public DefaultTestLoader [with]TestClass(Class<?> testClass) {
        this.testClass = testClass;
        return this;
    }

    // etc...

I am unsure, which one does look nicer? or should I add both?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
christophdcommented, Dec 5, 2022

@bbortt yes, sorry for the delay. I am planning it for the end of this week. Ok for you?

0reactions
bborttcommented, Nov 29, 2022

@christophd this still hasn’t been released. can we have one more bugfix release (v3.3.1) in “the old year”? 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python unittest mock: Is it possible to mock the value of a ...
Functions store their parameter default values in the func_defaults attribute when the function is defined, so you can patch that. Something like
Read more >
Default arguments - cppreference.com
Default arguments are only allowed in the parameter lists of function declarations and lambda-expressions, (since C++11) and are not allowed in the declarations ......
Read more >
unittest — Unit testing framework — Python 3.11.1 ...
It checks for a specific response to a particular set of inputs. unittest provides a base class, TestCase , which may be used...
Read more >
Default arguments in Python - GeeksforGeeks
Python allows function arguments to have default values. If the function is called without the argument, the argument gets its default value.
Read more >
26.4. unittest — Unit testing framework — Python 3.6.3 ...
It checks for a specific response to a particular set of inputs. unittest provides a base class, TestCase , which may be used...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found