deliveredtechnologies / rulebook

100% Java, Lambda Enabled, Lightweight Rules Engine with a Simple and Intuitive DSL
http://www.deliveredtechnologies.com
Apache License 2.0
716 stars 124 forks source link

How to write Unit Tests for a RuleBean? #198

Open sahebray85 opened 4 years ago

sahebray85 commented 4 years ago

I have created a Rule using Rule Bean, i want to write a unit test for it. How do I test it?

@Clayton7510 ?

Clayton7510 commented 3 years ago

If you are just talking about a single class, you can test it like it's any other POJO. If you want to test the entire RuleBook that contains RuleBeans, there are example tests, here: https://github.com/deliveredtechnologies/rulebook/tree/develop/rulebook-spring/src/test/java/com/deliveredtechnologies/rulebook/spring