Skip to content

Commit

Permalink
Edit DoAnswerStyleStubbing.isSet() to return true if there are answers (
Browse files Browse the repository at this point in the history
#3020)

Fixes #2955

---------

Co-authored-by: Kei <keiwork111@gmail.com>
  • Loading branch information
undermyumbrella1 and Kei committed May 25, 2023
1 parent 296a257 commit 2280cac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -25,7 +25,7 @@ void setAnswers(List<Answer<?>> answers, Strictness stubbingStrictness) {
}

boolean isSet() {
return answers.isEmpty();
return answers.size() > 0;
}

void clear() {
Expand Down
Expand Up @@ -110,7 +110,7 @@ public void setAnswersForStubbing(List<Answer<?>> answers, Strictness strictness
}

public boolean hasAnswersForStubbing() {
return !doAnswerStyleStubbing.isSet();
return doAnswerStyleStubbing.isSet();
}

public boolean hasInvocationForPotentialStubbing() {
Expand Down

0 comments on commit 2280cac

Please sign in to comment.