- container.addRestriction(new InterfaceRestriction() {
- @Override
- public boolean isViolated(Component aClient,
- RequiredInterface aRequired, Component aServer,
- ProvidedInterface aProvided) {
- return false;
- }
- });
+ container.connectRequiredProvided("x", "y", "a", "b");
+ }
+ }, SystemAssemblyException.class);
+ AssertionUtils.assertException(new AssertionUtils.ErroneousCode() {
+ @Override
+ public void run() throws Exception {
+ container.connectExternalRequired("x", "y", "a");
+ }
+ }, SystemAssemblyException.class);
+ AssertionUtils.assertException(new AssertionUtils.ErroneousCode() {
+ @Override
+ public void run() throws Exception {
+ container.connectExternalProvided("x", "y", "z");