Exemplo n.º 1
0
        public void HappyPath()
        {
            FileIdentifier identifier = FileIdentifier.Decloak(Obfuscator.Cloak("myPath::myHash"));

            Assert.Equal("myPath", identifier.Path);
            Assert.Equal("myHash", identifier.Hash);
        }
Exemplo n.º 2
0
 public static void TagPackage(ITetriSettings settings, string tag, string packageId)
 {
     Directory.CreateDirectory(Path.Combine(settings.TagsPath, Obfuscator.Cloak(tag)));
     File.WriteAllText(Path.Combine(settings.TagsPath, Obfuscator.Cloak(tag), packageId), string.Empty);
 }
Exemplo n.º 3
0
 public void GracefulInvalidContent()
 {
     Assert.Throws <InvalidFileIdentifierException>(() => {
         FileIdentifier.Decloak(Obfuscator.Cloak("an-inproperly-formatted-id"));
     });
 }