forked from deliveredtechnologies/rulebook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RuleAdapter support for unnamed facts of wildcarded collection types (d…
…eliveredtechnologies#173) * RuleAdapter support for unnamed facts of wildcarded collection types * fixed spelling pojoeWithWildCardCollections -> pojoWithWildCardCollections * removed unused imports
- Loading branch information
1 parent
771032f
commit 7838ecf
Showing
4 changed files
with
102 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...com/deliveredtechnologies/rulebook/runner/test/rulebooks/RuleWithWildcardCollections.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.deliveredtechnologies.rulebook.runner.test.rulebooks; | ||
|
||
import com.deliveredtechnologies.rulebook.RuleState; | ||
import com.deliveredtechnologies.rulebook.annotation.Given; | ||
import com.deliveredtechnologies.rulebook.annotation.Result; | ||
import com.deliveredtechnologies.rulebook.annotation.Rule; | ||
import com.deliveredtechnologies.rulebook.annotation.Then; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
|
||
|
||
@Rule | ||
public class RuleWithWildcardCollections<T extends Number> { | ||
|
||
@Given | ||
public Set<? extends CharSequence> _charSequenceSet; | ||
|
||
@Given | ||
public List<T> _numberSet; | ||
|
||
@Result | ||
Set<? extends CharSequence> _result; | ||
|
||
@Then | ||
public RuleState then() { | ||
_result = _charSequenceSet; | ||
return RuleState.NEXT; | ||
} | ||
} |