public void ActivityIOBroker_Zip_WhenOverwriteSetTrue_ShouldOverwriteFile()
{
//------------Setup for test--------------------------
tempFile = Path.GetTempFileName();
var zipPathName = Path.GetTempPath() + NewFileName + ".zip";
IActivityIOOperationsEndPoint scrEndPoint = ActivityIOFactory.CreateOperationEndPointFromIOPath(ActivityIOFactory.CreatePathFromString(tempFile, string.Empty, null, true,""));
IActivityIOOperationsEndPoint dstEndPoint = ActivityIOFactory.CreateOperationEndPointFromIOPath(ActivityIOFactory.CreatePathFromString(zipPathName, string.Empty, null, true,""));
Dev2ZipOperationTO zipTO = ActivityIOFactory.CreateZipTO(null, null, null, true);
File.WriteAllText(zipPathName, "");
//------------Assert Preconditions-------------------
Assert.IsTrue(zipTO.Overwrite);
Assert.IsTrue(File.Exists(zipPathName));
var readAllBytes = File.ReadAllBytes(zipPathName);
Assert.AreEqual(0, readAllBytes.Length);
//------------Execute Test---------------------------
ActivityIOFactory.CreateOperationsBroker().Zip(scrEndPoint, dstEndPoint, zipTO);
//------------Assert Results-------------------------
Assert.IsTrue(File.Exists(zipPathName));
readAllBytes = File.ReadAllBytes(zipPathName);
Assert.AreNotEqual(0, readAllBytes.Length);
File.Delete(tempFile);
File.Delete(zipPathName);
}