michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: package org.mozilla.gecko.background.healthreport; michael@0: michael@0: import java.io.File; michael@0: import java.io.FileNotFoundException; michael@0: import java.io.IOException; michael@0: michael@0: import org.json.JSONException; michael@0: import org.json.JSONObject; michael@0: import org.mozilla.gecko.background.healthreport.ProfileInformationCache; michael@0: michael@0: public class MockProfileInformationCache extends ProfileInformationCache { michael@0: public MockProfileInformationCache(String profilePath) { michael@0: super(profilePath); michael@0: } michael@0: michael@0: public boolean isInitialized() { michael@0: return this.initialized; michael@0: } michael@0: public boolean needsWrite() { michael@0: return this.needsWrite; michael@0: } michael@0: public File getFile() { michael@0: return this.file; michael@0: } michael@0: michael@0: public void writeJSON(JSONObject toWrite) throws IOException { michael@0: writeToFile(toWrite); michael@0: } michael@0: michael@0: public JSONObject readJSON() throws FileNotFoundException, JSONException { michael@0: return readFromFile(); michael@0: } michael@0: michael@0: public void setInitialized(final boolean initialized) { michael@0: this.initialized = initialized; michael@0: } michael@0: }