Home
last modified time | relevance | path

Searched refs:when (Results 1 – 25 of 37) sorted by relevance

12

/libcore/luni/src/test/java/libcore/java/nio/channels/
DChannelsTest.java37 import static org.mockito.Mockito.when;
80 when(abc.read(bbCaptor.capture())).thenReturn(result); in testInputStreamAsynchronousByteChannel()
81 when(result.get()).thenAnswer( in testInputStreamAsynchronousByteChannel()
108 when(abc.write(bbCaptor.capture())).thenReturn(result); in testOutputStreamAsynchronousByteChannel()
109 when(result.get()).thenAnswer( in testOutputStreamAsynchronousByteChannel()
DFileChannelTest.java22 import static org.mockito.Mockito.when;
314 when(mockPath.getFileSystem()).thenReturn(mockFileSystem); in test_open_Path_Set_FileAttributes()
315 when(mockFileSystem.provider()).thenReturn(mockFileSystemProvider); in test_open_Path_Set_FileAttributes()
316 when(mockFileSystemProvider.newFileChannel(mockPath, standardOpenOptions, in test_open_Path_Set_FileAttributes()
339 when(mockPath.getFileSystem()).thenReturn(mockFileSystem); in test_open_Path_OpenOptions()
340 when(mockFileSystem.provider()).thenReturn(mockFileSystemProvider); in test_open_Path_OpenOptions()
341 when(mockFileSystemProvider.newFileChannel(mockPath, standardOpenOptions)) in test_open_Path_OpenOptions()
/libcore/luni/src/main/java/libcore/internal/
DJava21LanguageFeatures.java88 case String str when str.equalsIgnoreCase("android") -> "Yes";
89 case String str when str.equalsIgnoreCase("marvin") -> "Yes";
187 when type == RoundedShapeType.CIRCLE -> RoundedShapeType.CIRCLE;
189 when color == Color.RED -> Color.RED;
191 case GeometricBlob (int sides) when sides > 1000 -> Integer.valueOf(1000);
/libcore/luni/src/test/java/libcore/java/nio/file/
DFilesTest.java58 import static org.mockito.Mockito.when;
79 when(mockPath.getFileSystem()).thenReturn(mockFileSystem); in setUp()
80 when(mockPath2.getFileSystem()).thenReturn(mockFileSystem); in setUp()
81 when(mockFileSystem.provider()).thenReturn(mockFileSystemProvider); in setUp()
88 when(mockFileSystemProvider.newInputStream(mockPath, READ)).thenReturn(is); in test_newInputStream()
100 when(mockFileSystemProvider.newOutputStream(mockPath, APPEND)).thenReturn(os); in test_newOutputStream()
114 when(mockFileSystemProvider.newByteChannel(mockPath, openOptions)).thenReturn(sfc); in test_newByteChannel()
377 when(mockFileSystemProvider.deleteIfExists(mockPath)).thenReturn(true); in test_deleteIfExist()
DFiles2Test.java94 import static org.mockito.Mockito.when;
112 when(mockPath.getFileSystem()).thenReturn(mockFileSystem); in setUp()
113 when(mockPath2.getFileSystem()).thenReturn(mockFileSystem); in setUp()
114 when(mockFileSystem.provider()).thenReturn(mockFileSystemProvider); in setUp()
126 when(mockFileSystemProvider.readSymbolicLink(mockPath)).thenReturn(mockPath2); in test_readSymbolicLink()
133 when(mockFileSystemProvider.isSameFile(mockPath, mockPath2)).thenReturn(true); in test_isSameFile()
134 when(mockFileSystemProvider.isSameFile(mockPath2, mockPath)).thenReturn(false); in test_isSameFile()
141 when(mockFileSystemProvider.getFileStore(mockPath)).thenThrow(new SecurityException()); in test_getFileStore()
151 when(mockFileSystemProvider.isHidden(mockPath)).thenReturn(true); in test_isHidden()
152 when(mockFileSystemProvider.isHidden(mockPath2)).thenReturn(false); in test_isHidden()
[all …]
/libcore/ojluni/src/main/java/java/nio/charset/
Dexceptions36 * Checked exception thrown when a character encoding
44 * Unchecked exception thrown when a string that is not a
50 * Unchecked exception thrown when no support is available
/libcore/luni/src/test/java/libcore/javax/xml/validation/
DSchemaFactoryTest.java21 import static org.mockito.Mockito.when;
88 when(classLoader.loadClass(eq("factoryClassName"))) in newInstance3_ClassNotFoundException()
/libcore/luni/src/test/java/libcore/libcore/io/
DForwardingOsTest.java45 Mockito.when(mockOs.toString()).thenReturn(msg); in toStringContainsDelegate()
DBlockGuardOsTest.java77 import static org.mockito.Mockito.when;
124 when(mockOsDelegate.android_getaddrinfo(anyString(), any(), anyInt())) in test_android_getaddrinfo_networkPolicy()
/libcore/luni/src/main/java/libcore/util/
DZoneInfo.java228 public int getOffset(long when) { in getOffset() argument
229 return mDelegate.getOffset(when); in getOffset()
/libcore/ojluni/src/main/java/java/util/
DDate.java937 public boolean before(Date when) { in before() argument
938 return getMillisOf(this) < getMillisOf(when); in before()
951 public boolean after(Date when) { in after() argument
952 return getMillisOf(this) > getMillisOf(when); in after()
DCalendar.java2819 public boolean before(Object when) { in before() argument
2820 return when instanceof Calendar in before()
2821 && compareTo((Calendar)when) < 0; in before()
2840 public boolean after(Object when) { in after() argument
2841 return when instanceof Calendar in after()
2842 && compareTo((Calendar)when) > 0; in after()
/libcore/luni/src/test/java/libcore/java/net/
DNetworkInterfaceTest.java238 Mockito.when(mockOs.getifaddrs()).thenReturn(new StructIfaddrs[] { in testGetNetworkInterfaces_OrphanInterfaceDoesNotThrow()
242 Mockito.when(mockOs.if_nametoindex(anyString())).thenReturn(1); in testGetNetworkInterfaces_OrphanInterfaceDoesNotThrow()
/libcore/ojluni/annotations/sdk/nullability/java/util/
DCalendar.annotated.java108 public boolean before(@libcore.util.Nullable java.lang.Object when) { throw new RuntimeException("S… in before() argument
110 public boolean after(@libcore.util.Nullable java.lang.Object when) { throw new RuntimeException("St… in after() argument
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DFilterOutputStreamTest.java69 Mockito.doThrow(testException).when(outputStream).flush(); in test_doubleClose()
/libcore/ojluni/annotations/hiddenapi/java/util/
DCalendar.java258 public boolean before(java.lang.Object when) { in before() argument
262 public boolean after(java.lang.Object when) { in after() argument
/libcore/luni/src/test/java/libcore/java/security/
DSignatureTest.java479 doReturn(service).when(provider).getService(service.getType(), service.getAlgorithm()); in testGetParameters_IsCalled()
480 doReturn(signatureSpi).when(service).newInstance(null); in testGetParameters_IsCalled()
/libcore/tools/expected_upstream/
DREADME.md15 storing the OpenJDK version of each file. Thus, we can use `git merge` when
123 when you reland your change
219 an error when checking out the branch that is based on main.
/libcore/ojluni/src/test/resources/data/unicodedata/
DSpecialCasing.txt14 # Unicode characters, for situations when casing incurs a change in string length
116 # IMPORTANT-when iota-subscript (0345) is uppercased or titlecased,
233 # Lithuanian retains the dot in a lowercase i when followed by accents.
239 # Introduce an explicit dot above when lowercasing capital I's and J's
/libcore/ojluni/src/test/
DLICENSE104 when run, you must cause it, when started running for such
118 sections when you distribute them as separate works. But when you
313 when it starts in an interactive mode:
/libcore/ojluni/src/tools/
DLICENSE104 when run, you must cause it, when started running for such
118 sections when you distribute them as separate works. But when you
313 when it starts in an interactive mode:
/libcore/
DLICENSE99 c) If the modified program normally reads commands interactively when run,
100 you must cause it, when started running for such interactive use in the
112 its terms, do not apply to those sections when you distribute them as separate
113 works. But when you distribute the same sections as part of a whole which is a
295 If the program is interactive, make it output a short notice like this when it
Dlibcore.aconfig104 description: "This flag controls if read only is enforced when loading native code"
/libcore/ojluni/annotations/
DREADME2 the main source files by metalava when it is producing API stubs. This
/libcore/ojluni/src/test/java/util/Scanner/
Dinput.txt221 # how should smbd talk to the local system when changing a UNIX
250 # only used when acting as a DC for WinNT/2k/XP. Ignored by Win9x clients
254 # only used when acting as a DC for WinNT/2k/XP. Ignored by Win9x clients

12