-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not encode max length in ROA when it is redundant #143
Conversation
src/main/java/net/ripe/rpki/commons/crypto/cms/roa/RoaCmsBuilder.java
Outdated
Show resolved
Hide resolved
b7b296b
to
aae17e6
Compare
aae17e6
to
dda0c63
Compare
import static org.junit.jupiter.api.Assertions.fail; | ||
|
||
|
||
public class RoaPrefixTest { | ||
@Test | ||
public void shouldEqualWhenSemanticallyEqual() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have property tests instead of this?
Making sure that equals/hashCode/compare are all coherent with each other is necessary
and there should be a lot of tests, so it makes sense to use property testing here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic is quite simple so I do not see the need for many cases. I would want many edge conditions though.
You could model the edge conditions in property based testing and then randomise inputs. But for just testing these contracts I think that these cases show very explicitly that you cover the core.
Do not encode the max length in a ROA when it is present but redundant.