Home
last modified time | relevance | path

Searched refs:when (Results 1 – 25 of 33) 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/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.java73 import static org.mockito.Mockito.when;
120 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.java936 public boolean before(Date when) { in before() argument
937 return getMillisOf(this) < getMillisOf(when); in before()
950 public boolean after(Date when) { in after() argument
951 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/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/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/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/
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
/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
/libcore/ojluni/src/main/java/java/nio/
DByteBufferAs-X-Buffer.java.template68 // HeapByteBuffer. We only have to initialize the field when bb is an instance of
73 // position when the method is called from either HeapByteBuffer or DirectByteBuffer.
/libcore/ojluni/src/test/java/util/Base64/
Dplain.txt149 Quoted-Printable encoding, care must be taken, when encapsulating a
/libcore/luni/src/test/java/tests/security/cert/
DCertPathValidatorExceptionTest.java448 doReturn(certList).when(certPath).getCertificates(); in testCertPathValidatorException_constructsCorrectlyWithReason()

12