* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
import org.wamblee.system.core.DefaultProvidedInterface;
import org.wamblee.system.core.ProvidedInterface;
import org.wamblee.system.core.RequiredInterface;
import org.wamblee.system.core.DefaultProvidedInterface;
import org.wamblee.system.core.ProvidedInterface;
import org.wamblee.system.core.RequiredInterface;
scope.publishInterface(provided, "hello");
config.create(scope);
AssertionUtils.assertEquals(new String[] { "x1(hello)" },
scope.publishInterface(provided, "hello");
config.create(scope);
AssertionUtils.assertEquals(new String[] { "x1(hello)" },
public void testSpecificConstructor() {
ConstructorConfiguration config = new ConstructorConfiguration(X2.class)
.select(String.class);
public void testSpecificConstructor() {
ConstructorConfiguration config = new ConstructorConfiguration(X2.class)
.select(String.class);
assertEquals(1, required.size());
required.get(0).setProvider(provided);
assertEquals(1, required.size());
required.get(0).setProvider(provided);
scope.publishInterface(provided, "hello");
config.create(scope);
AssertionUtils.assertEquals(new String[] { "x2(hello)" },
scope.publishInterface(provided, "hello");
config.create(scope);
AssertionUtils.assertEquals(new String[] { "x2(hello)" },
- AssertionUtils.assertEquals(new String[] { "x1(bla)" },
- AdapterTestCase.EVENT_TRACKER.getEvents(Thread.currentThread())
- .toArray());
+ AssertionUtils.assertEquals(new String[] { "x1(bla)" }, AdapterTestCase
+ .getEventTracker().getEvents(Thread.currentThread()).toArray());
assertEquals(1, required.size());
required.get(0).setProvider(provided);
assertEquals(1, required.size());
required.get(0).setProvider(provided);
scope.publishInterface(provided, "hello");
config.create(scope);
AssertionUtils.assertEquals(new String[] { "x1(hello)" },
scope.publishInterface(provided, "hello");
config.create(scope);
AssertionUtils.assertEquals(new String[] { "x1(hello)" },
config.getParameters().setOptional(0);
assertTrue(config.getRequiredInterfaces().get(0).isOptional());
config.getParameters().setOptional(0);
assertTrue(config.getRequiredInterfaces().get(0).isOptional());
.toArray());
}
public void testIgnoredNonPublic() {
ConstructorConfiguration config = new ConstructorConfiguration(X3.class)
.greedy();
.toArray());
}
public void testIgnoredNonPublic() {
ConstructorConfiguration config = new ConstructorConfiguration(X3.class)
.greedy();
scope.publishInterface(provided, "hello");
config.create(scope);
AssertionUtils.assertEquals(new String[] { "x3(hello)" },
scope.publishInterface(provided, "hello");
config.create(scope);
AssertionUtils.assertEquals(new String[] { "x3(hello)" },