KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > cruisecontrol > testutil > UnreadableMockFile


1 package net.sourceforge.cruisecontrol.testutil;
2
3 import java.io.File JavaDoc;
4
5 public class UnreadableMockFile extends File JavaDoc {
6     private boolean canReadWasCalled = false;
7
8     public UnreadableMockFile() {
9         super("DOESNTMATTER");
10     }
11
12     public boolean canRead() {
13         canReadWasCalled = true;
14         return false;
15     }
16
17     public boolean exists() {
18         return true;
19     }
20
21     public boolean canReadWasCalled() {
22         return canReadWasCalled;
23     }
24 }
25
Popular Tags