public void GetCompressedAssetFileName_ValidFilePath_ReturnsNewFilename(string fileName) { var result = AssetCompression.GetCompressedAssetFileName(fileName, false); Check.That(result) .IsNotNull() .And.IsEqualTo("this_is_a_file.lz"); }
public void CompressAsset_InvalidTargetFilePath_ReturnsFalse() { const string sourceFilePath = "test_file.txt"; _assetCompression.Get <IFile>() .Exists(sourceFilePath) .Returns(true); _assetCompression.Get <IFile>() .Exists(AssetCompression.GetCompressedAssetFileName(sourceFilePath, false)) .Returns(true); var result = _assetCompression.ClassUnderTest.CompressAsset(sourceFilePath, string.Empty, overwrite: false); Check.That(result).IsFalse(); }
private bool GetCompressedDatabaseFilePathIfExists(out string compressedFilePath, bool encrypted) { compressedFilePath = Path.Combine(_fileSystemService.GetLocalPathToDataFolder(), AssetCompression.GetCompressedAssetFileName(Constants.AllMyBricksDbFile, encrypted)); return(_file.Exists(compressedFilePath)); }
public void GetCompressedAssetFileName_InvalidFilePath_ReturnsNull(string fileName) { var result = AssetCompression.GetCompressedAssetFileName(fileName, false); Check.That(result).IsNull(); }