Revision: 1093
Author: crazyboblee
Date: Mon Sep 28 15:18:18 2009
Log: Updated Guice to use JUnit-enabled TCK.
http://code.google.com/p/google-guice/source/detail?r=1093

Added:
  /trunk/test/com/googlecode/guice/GuiceTck.java
Deleted:
  /trunk/test/com/googlecode/guice/GuiceCandidate.java
Modified:
  /trunk/guice.ipr
  /trunk/lib/build/javax.inject-tck.jar

=======================================
--- /dev/null
+++ /trunk/test/com/googlecode/guice/GuiceTck.java      Mon Sep 28 15:18:18 2009
@@ -0,0 +1,55 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package com.googlecode.guice;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.util.Jsr330;
+import junit.framework.Test;
+import org.atinject.tck.Tck;
+import org.atinject.tck.auto.Car;
+import org.atinject.tck.auto.Convertible;
+import org.atinject.tck.auto.Drivers;
+import org.atinject.tck.auto.DriversSeat;
+import org.atinject.tck.auto.Engine;
+import org.atinject.tck.auto.FuelTank;
+import org.atinject.tck.auto.Seat;
+import org.atinject.tck.auto.Tire;
+import org.atinject.tck.auto.V8Engine;
+import org.atinject.tck.auto.accessories.Cupholder;
+import org.atinject.tck.auto.accessories.SpareTire;
+
+public class GuiceTck extends Tck {
+
+  protected Car getCar() {
+    return Guice.createInjector(new AbstractModule() {
+      protected void configure() {
+        bind(Car.class).to(Convertible.class);
+         
bind(Seat.class).annotatedWith(Drivers.class).to(DriversSeat.class);
+        bind(Engine.class).to(V8Engine.class);
+         
bind(Tire.class).annotatedWith(Jsr330.named("spare")).to(SpareTire.class);
+        bind(Cupholder.class);
+        bind(Tire.class);
+        bind(FuelTank.class);
+      }
+    }).getInstance(Car.class);
+  }
+
+  public static Test suite() {
+    return new GuiceTck();
+  }
+}
=======================================
--- /trunk/test/com/googlecode/guice/GuiceCandidate.java        Sun Sep 27  
22:40:20 2009
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Copyright (C) 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
-
-package com.googlecode.guice;
-
-import com.google.inject.AbstractModule;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import com.google.inject.util.Jsr330;
-import com.googlecode.atinject.Candidate;
-import com.googlecode.atinject.Tck;
-import com.googlecode.atinject.auto.Car;
-import com.googlecode.atinject.auto.Convertible;
-import com.googlecode.atinject.auto.Drivers;
-import com.googlecode.atinject.auto.DriversSeat;
-import com.googlecode.atinject.auto.Engine;
-import com.googlecode.atinject.auto.FuelTank;
-import com.googlecode.atinject.auto.Seat;
-import com.googlecode.atinject.auto.Tire;
-import com.googlecode.atinject.auto.V8Engine;
-import com.googlecode.atinject.auto.accessories.Cupholder;
-import com.googlecode.atinject.auto.accessories.SpareTire;
-
-public class GuiceCandidate implements Candidate {
-
-  private final Injector injector;
-
-  public GuiceCandidate() {
-    this.injector = Guice.createInjector(new AbstractModule() {
-      protected void configure() {
-        bind(Car.class).to(Convertible.class);
-         
bind(Seat.class).annotatedWith(Drivers.class).to(DriversSeat.class);
-        bind(Engine.class).to(V8Engine.class);
-         
bind(Tire.class).annotatedWith(Jsr330.named("spare")).to(SpareTire.class);
-        bind(Cupholder.class);
-        bind(Tire.class);
-        bind(FuelTank.class);
-      }
-    });
-  }
-
-  public Car getCar() {
-    return injector.getInstance(Car.class);
-  }
-
-  public static void main(String[] args) throws IllegalAccessException,
-      InstantiationException, ClassNotFoundException {
-    Tck.main(new String[] { GuiceCandidate.class.getName() });
-  }
-}
=======================================
--- /trunk/guice.ipr    Sun Sep 27 22:40:20 2009
+++ /trunk/guice.ipr    Mon Sep 28 15:18:18 2009
@@ -102,24 +102,6 @@
          <option name="VARIABLE_ANNOTATION_WRAP" value="1" />
          <option name="ENUM_CONSTANTS_WRAP" value="1" />
          <ADDITIONAL_INDENT_OPTIONS fileType="">
-          <option name="INDENT_SIZE" value="4" />
-          <option name="CONTINUATION_INDENT_SIZE" value="8" />
-          <option name="TAB_SIZE" value="4" />
-          <option name="USE_TAB_CHARACTER" value="false" />
-          <option name="SMART_TABS" value="false" />
-          <option name="LABEL_INDENT_SIZE" value="0" />
-          <option name="LABEL_INDENT_ABSOLUTE" value="false" />
-        </ADDITIONAL_INDENT_OPTIONS>
-        <ADDITIONAL_INDENT_OPTIONS fileType="groovy">
-          <option name="INDENT_SIZE" value="2" />
-          <option name="CONTINUATION_INDENT_SIZE" value="8" />
-          <option name="TAB_SIZE" value="4" />
-          <option name="USE_TAB_CHARACTER" value="false" />
-          <option name="SMART_TABS" value="false" />
-          <option name="LABEL_INDENT_SIZE" value="0" />
-          <option name="LABEL_INDENT_ABSOLUTE" value="false" />
-        </ADDITIONAL_INDENT_OPTIONS>
-        <ADDITIONAL_INDENT_OPTIONS fileType="gsp">
            <option name="INDENT_SIZE" value="2" />
            <option name="CONTINUATION_INDENT_SIZE" value="8" />
            <option name="TAB_SIZE" value="4" />
=======================================
--- /trunk/lib/build/javax.inject-tck.jar       Sun Sep 27 22:40:20 2009
+++ /trunk/lib/build/javax.inject-tck.jar       Mon Sep 28 15:18:18 2009
Binary file, no diff available.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-guice-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to