public void ExistsThrowsOnNullOrEmptyHash()
        {
            GitLooseFilesDictionary dict = new GitLooseFilesDictionary(new InMemoryFileSystem(), new NullCompressionStrategy());

            Assert.Throws <ArgumentException>(() => dict.Exists(null))
            .WithParamName("hash");
            Assert.Throws <ArgumentException>(() => dict.Exists(String.Empty))
            .WithParamName("hash");
        }
        public void ExistsReturnsTrueIfHashFileExists()
        {
            // Arrange
            InMemoryFileSystem      fs = new InMemoryFileSystem();
            GitLooseFilesDictionary db = new GitLooseFilesDictionary(fs, new NullCompressionStrategy());

            fs.WriteTestFile(@"ab\cdefghijk", "Foo");

            // Act/Assert
            Assert.True(db.Exists("abcdefghijk"));
        }
        public void ExistsReturnsFalseIfHashFileDoesNotExist()
        {
            // Arrange
            InMemoryFileSystem      fs = new InMemoryFileSystem();
            GitLooseFilesDictionary db = new GitLooseFilesDictionary(fs, new NullCompressionStrategy());

            // Assume
            Assert.False(fs.Exists(@"ab\cdefghijk"));

            // Act/Assert
            Assert.False(db.Exists("abcdefghijk"));
        }