Searched refs:ofInstance (Results 1 – 13 of 13) sorted by relevance
/external/guava/guava-gwt/test-super/com/google/common/base/super/com/google/common/base/ |
D | SuppliersTest.java | 148 Supplier<Object> objectSupplier = Suppliers.ofInstance(toBeSupplied); in testOfInstanceSuppliesSameInstance() 154 Supplier<Integer> nullSupplier = Suppliers.ofInstance(null); in testOfInstanceSuppliesNull() 159 Supplier<Integer> supplier = Suppliers.ofInstance(14); in testSupplierFunction() 169 Suppliers.ofInstance("foo"), Suppliers.ofInstance("foo")) in testOfInstance_equals() 170 .addEqualityGroup(Suppliers.ofInstance("bar")) in testOfInstance_equals() 177 Suppliers.compose(Functions.constant(1), Suppliers.ofInstance("foo")), in testCompose_equals() 178 Suppliers.compose(Functions.constant(1), Suppliers.ofInstance("foo"))) in testCompose_equals() 180 Suppliers.compose(Functions.constant(2), Suppliers.ofInstance("foo"))) in testCompose_equals() 182 Suppliers.compose(Functions.constant(1), Suppliers.ofInstance("bar"))) in testCompose_equals()
|
D | OptionalTest.java | 95 assertEquals("a", Optional.of("a").or(Suppliers.ofInstance("fallback"))); in testOr_supplier_present() 99 assertEquals("fallback", Optional.absent().or(Suppliers.ofInstance("fallback"))); in testOr_supplier_absent() 103 Supplier<Object> nullSupplier = Suppliers.ofInstance(null); in testOr_nullSupplier_absent() 113 Supplier<String> nullSupplier = Suppliers.ofInstance(null); in testOr_nullSupplier_present()
|
D | FunctionsTest.java | 313 .addEqualityGroup(Functions.forSupplier(Suppliers.ofInstance(12))) in testForSupplier()
|
/external/guava/guava-tests/test/com/google/common/base/ |
D | SuppliersTest.java | 226 Supplier<Object> objectSupplier = Suppliers.ofInstance(toBeSupplied); in testOfInstanceSuppliesSameInstance() 232 Supplier<Integer> nullSupplier = Suppliers.ofInstance(null); in testOfInstanceSuppliesNull() 373 Supplier<Integer> supplier = Suppliers.ofInstance(14); in testSupplierFunction() 383 Integer.valueOf(5), reserialize(Suppliers.ofInstance(5)).get()); in testSerialization() 385 Functions.identity(), Suppliers.ofInstance(5))).get()); in testSerialization() 387 reserialize(Suppliers.memoize(Suppliers.ofInstance(5))).get()); in testSerialization() 390 Suppliers.ofInstance(5), 30, TimeUnit.SECONDS)).get()); in testSerialization() 392 Suppliers.synchronizedSupplier(Suppliers.ofInstance(5))).get()); in testSerialization() 410 Suppliers.ofInstance("foo"), Suppliers.ofInstance("foo")) in testOfInstance_equals() 411 .addEqualityGroup(Suppliers.ofInstance("bar")) in testOfInstance_equals() [all …]
|
D | OptionalTest.java | 98 assertEquals("a", Optional.of("a").or(Suppliers.ofInstance("fallback"))); in testOr_supplier_present() 102 assertEquals("fallback", Optional.absent().or(Suppliers.ofInstance("fallback"))); in testOr_supplier_absent() 106 Supplier<Object> nullSupplier = Suppliers.ofInstance(null); in testOr_nullSupplier_absent() 116 Supplier<String> nullSupplier = Suppliers.ofInstance(null); in testOr_nullSupplier_present()
|
D | FunctionsTest.java | 421 .addEqualityGroup(Functions.forSupplier(Suppliers.ofInstance(12))) in testForSupplier()
|
/external/mockito/src/main/java/org/mockito/internal/configuration/injection/ |
D | MockInjection.java | 35 public static OngoingMockInjection onField(Field field, Object ofInstance) { in onField() argument 36 return new OngoingMockInjection(field, ofInstance); in onField() 47 public static OngoingMockInjection onFields(Set<Field> fields, Object ofInstance) { in onFields() argument 48 return new OngoingMockInjection(fields, ofInstance); in onFields()
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
D | CallablesTest.java | 46 final Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName"); in testRenaming() 59 final Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName"); in testRenaming_exceptionalReturn() 85 Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName"); in testRenaming_noPermissions()
|
D | MoreExecutorsTest.java | 595 Suppliers.ofInstance("FooBar")); in testThreadRenaming()
|
/external/guava/guava-tests/test/com/google/common/cache/ |
D | CacheBuilderSpecTest.java | 497 .build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumWeight_withWeigher() 503 builder.build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumWeight_withoutWeigher() 512 .build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumSize_withWeigher() 517 builder.build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumSize_withoutWeigher() 527 CacheLoader.from(Suppliers.ofInstance(value))); in testDisableCaching()
|
/external/guava/guava/src/com/google/common/base/ |
D | Suppliers.java | 218 public static <T> Supplier<T> ofInstance(@Nullable T instance) { in ofInstance() method in Suppliers
|
/external/guava/guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/ |
D | CacheBuilder.java | 152 static final Supplier<? extends StatsCounter> NULL_STATS_COUNTER = Suppliers.ofInstance(
|
/external/guava/guava/src/com/google/common/cache/ |
D | CacheBuilder.java | 158 static final Supplier<? extends StatsCounter> NULL_STATS_COUNTER = Suppliers.ofInstance(
|