Author: limpbizkit
Date: Mon May 18 18:04:27 2009
New Revision: 962
Modified:
trunk/test/com/google/inject/spi/InjectionPointTest.java
Log:
Fixing tests for InjectionPoint and Dependency serialization
Modified: trunk/test/com/google/inject/spi/InjectionPointTest.java
==============================================================================
--- trunk/test/com/google/inject/spi/InjectionPointTest.java (original)
+++ trunk/test/com/google/inject/spi/InjectionPointTest.java Mon May 18
18:04:27 2009
@@ -17,7 +17,7 @@
package com.google.inject.spi;
import static com.google.inject.Asserts.assertEqualsBothWays;
-import static com.google.inject.Asserts.assertSimilarWhenReserialized;
+import static com.google.inject.Asserts.assertNotSerializable;
import com.google.inject.Inject;
import com.google.inject.Key;
import com.google.inject.TypeLiteral;
@@ -56,7 +56,7 @@
assertFalse(injectionPoint.isOptional());
assertEquals(getClass().getName() + ".foo", injectionPoint.toString());
assertEqualsBothWays(injectionPoint, new InjectionPoint(typeLiteral,
fooField));
- assertSimilarWhenReserialized(injectionPoint);
+ assertNotSerializable(injectionPoint);
Dependency<?> dependency =
getOnlyElement(injectionPoint.getDependencies());
assertEquals("Key[type=java.lang.String,
[email protected](value=a)]@"
@@ -65,7 +65,7 @@
assertEquals(-1, dependency.getParameterIndex());
Assert.assertEquals(Key.get(String.class, named("a")),
dependency.getKey());
assertEquals(false, dependency.isNullable());
- assertSimilarWhenReserialized(dependency);
+ assertNotSerializable(dependency);
assertEqualsBothWays(dependency,
getOnlyElement(new InjectionPoint(typeLiteral,
fooField).getDependencies()));
}
@@ -79,7 +79,7 @@
assertFalse(injectionPoint.isOptional());
assertEquals(getClass().getName() + ".bar()",
injectionPoint.toString());
assertEqualsBothWays(injectionPoint, new InjectionPoint(typeLiteral,
barMethod));
- assertSimilarWhenReserialized(injectionPoint);
+ assertNotSerializable(injectionPoint);
Dependency<?> dependency =
getOnlyElement(injectionPoint.getDependencies());
assertEquals("Key[type=java.lang.String,
[email protected](value=b)]@"
@@ -88,7 +88,7 @@
assertEquals(0, dependency.getParameterIndex());
assertEquals(Key.get(String.class, named("b")), dependency.getKey());
assertEquals(false, dependency.isNullable());
- assertSimilarWhenReserialized(dependency);
+ assertNotSerializable(dependency);
assertEqualsBothWays(dependency,
getOnlyElement(new InjectionPoint(typeLiteral,
barMethod).getDependencies()));
}
@@ -103,7 +103,7 @@
assertFalse(injectionPoint.isOptional());
assertEquals(Constructable.class.getName() + ".<init>()",
injectionPoint.toString());
assertEqualsBothWays(injectionPoint, new InjectionPoint(typeLiteral,
constructor));
- assertSimilarWhenReserialized(injectionPoint);
+ assertNotSerializable(injectionPoint);
Dependency<?> dependency =
getOnlyElement(injectionPoint.getDependencies());
assertEquals("Key[type=java.lang.String,
[email protected](value=c)]@"
@@ -112,7 +112,7 @@
assertEquals(0, dependency.getParameterIndex());
assertEquals(Key.get(String.class, named("c")), dependency.getKey());
assertEquals(false, dependency.isNullable());
- assertSimilarWhenReserialized(dependency);
+ assertNotSerializable(dependency);
assertEqualsBothWays(dependency,
getOnlyElement(new InjectionPoint(typeLiteral,
constructor).getDependencies()));
}
@@ -125,7 +125,7 @@
assertEquals(-1, dependency.getParameterIndex());
assertEquals(Key.get(String.class, named("d")), dependency.getKey());
assertEquals(true, dependency.isNullable());
- assertSimilarWhenReserialized(dependency);
+ assertNotSerializable(dependency);
assertEqualsBothWays(dependency, Dependency.get(Key.get(String.class,
named("d"))));
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---