HomeSort by relevance Sort by last modified time
    Searched refs:mockPath (Results 1 - 3 of 3) sorted by null

  /libcore/luni/src/test/java/libcore/java/nio/file/
FilesTest.java 69 private Path mockPath;
79 when(mockPath.getFileSystem()).thenReturn(mockFileSystem);
88 when(mockFileSystemProvider.newInputStream(mockPath, READ)).thenReturn(is);
90 assertSame(is, Files.newInputStream(mockPath, READ));
92 verify(mockFileSystemProvider).newInputStream(mockPath, READ);
100 when(mockFileSystemProvider.newOutputStream(mockPath, APPEND)).thenReturn(os);
102 assertSame(os, Files.newOutputStream(mockPath, APPEND));
104 verify(mockFileSystemProvider).newOutputStream(mockPath, APPEND);
114 when(mockFileSystemProvider.newByteChannel(mockPath, openOptions)).thenReturn(sfc);
116 assertSame(sfc, Files.newByteChannel(mockPath, READ))
    [all...]
Files2Test.java 102 private Path mockPath;
112 when(mockPath.getFileSystem()).thenReturn(mockFileSystem);
120 assertEquals(mockPath2, Files.move(mockPath, mockPath2, mockCopyOption));
121 verify(mockFileSystemProvider).move(mockPath, mockPath2, mockCopyOption);
126 when(mockFileSystemProvider.readSymbolicLink(mockPath)).thenReturn(mockPath2);
127 assertEquals(mockPath2, Files.readSymbolicLink(mockPath));
128 verify(mockFileSystemProvider).readSymbolicLink(mockPath);
133 when(mockFileSystemProvider.isSameFile(mockPath, mockPath2)).thenReturn(true);
134 when(mockFileSystemProvider.isSameFile(mockPath2, mockPath)).thenReturn(false);
135 assertTrue(Files.isSameFile(mockPath, mockPath2))
    [all...]
  /libcore/luni/src/test/java/libcore/java/nio/channels/
FileChannelTest.java 302 Path mockPath = mock(Path.class);
314 when(mockPath.getFileSystem()).thenReturn(mockFileSystem);
316 when(mockFileSystemProvider.newFileChannel(mockPath, standardOpenOptions,
319 assertEquals(mockFileChannel, FileChannel.open(mockPath, standardOpenOptions,
330 Path mockPath = mock(Path.class);
339 when(mockPath.getFileSystem()).thenReturn(mockFileSystem);
341 when(mockFileSystemProvider.newFileChannel(mockPath, standardOpenOptions))
344 assertEquals(mockFileChannel, FileChannel.open(mockPath, READ, WRITE));

Completed in 169 milliseconds