How do I test if a private method has a field with a name and a type?
Apr 18 ’20
Comments: 1
Answers: 0
0
Here is the private
method I am trying to test
private int privateMethod(int[] numbers) {
var sum = 0;
for (int number : numbers) {
sum += number;
}
return sum;
}
I am doing this in Java 11
And following is my test using Junit5
import org.junit.jupiter.api.Test;
import org.junit.platform.commons.function.Try;
原文链接:How do I test if a private method has a field with a name and a type?
© 版权声明
THE END
暂无评论内容