ExtensionContext.Namespace is implemented via a Set/HashSet. This allows for two namespaces to easily collide:
@Test void test() {
assertNotEquals(Namespace.create("a", "b"), Namespace.create("b", "a"));
}
Intuitively namespaces should nest, meaning the above two are expected to be different. This can be easily fixed by using a List in the impl.
Hmm, I must admit that I'm a bit surprised by this, too. However, the Javadoc states "The order of the parts is not significant.".
@junit-team/junit-lambda Do you remember why this was implemented this way?
Team decision: Change implementation to use List instead of Set.
Most helpful comment
Team decision: Change implementation to use
Listinstead ofSet.