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:
- Created a year ago
- Comments:5 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bbortt yes, sorry for the delay. I am planning it for the end of this week. Ok for you?
@christophd this still hasn’t been released. can we have one more bugfix release (
v3.3.1
) in “the old year”? 😉