public void TestXboxFileExistsCallsXboxFileInfoExistsImplCorrectly() { // test when a file exists: bool success = false; ShimXboxFileInfo.ExistsImplStringXboxPathXboxConsoleAdapterBase = (systemIpAddress, xboxPath, adapterBase) => { success = true; Assert.AreEqual(this.XboxConsole.Adapter, adapterBase, "The passed adapter does not equal the original one."); return(true); }; Assert.IsTrue(XboxFile.Exists(this.xboxFilePath, this.XboxConsole), "The file should exist."); Assert.IsTrue(success, "XboxFileInfo.ExistsImpl wasn't called."); // test when a file doesn't exist: success = false; ShimXboxFileInfo.ExistsImplStringXboxPathXboxConsoleAdapterBase = (systemIpAddress, xboxPath, adapterBase) => { success = true; return(false); }; Assert.IsFalse(XboxFile.Exists(this.xboxFilePath, this.XboxConsole), "The file shouldn't exist."); Assert.IsTrue(success, "XboxFileInfo.ExistsImpl wasn't called."); }
public void TestXboxFileExistsArgumentNullConsole() { XboxFile.Exists(this.xboxFilePath, null); }