public void AreWeAbleToWriteNonExistingDir() { var actualResult = AreWe.AbleToWrite("C:\\this\\is\\a\\path\\that\\does\\not\\exist", false); Assert.IsFalse(actualResult, "Passing a non-existing dir to 'AreWe.AbleToWrite' returned 'true'"); }
public void AreWeAbleToWriteNonExistingDirThrow() { Assert.Throws <DirectoryNotFoundException>(() => { AreWe.AbleToWrite("C:\\this\\is\\a\\path\\that\\does\\not\\exist", true); }); }
public void AreWeAbleToWriteWritablePath() { //The 'Documents' folder of the current user var path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); var ableToWrite = AreWe.AbleToWrite(path, false); Assert.IsTrue(ableToWrite, "'AreWe.AbleToWrite' is 'false' even though we are able to write to the path"); }
public void AreWeAbleToWriteNull() { var actualResult = AreWe.AbleToWrite(null, false); Assert.IsFalse(actualResult, "Passing 'null' to 'AreWe.AbleToWrite' returned 'true'"); }
public void AreWeAbleToWriteEmptyString() { var actualResult = AreWe.AbleToWrite(string.Empty, false); Assert.IsFalse(actualResult, "Passing an empty string to 'AreWe.AbleToWrite' returned 'true'"); }