Ejemplo n.º 1
0
        public void Count()
        {
            _driver.GetRandomName().Returns(TestFileName);
            _driver.Write(Arg.Any <string>()).Returns(x => new MemoryStream());

            var storage = new XmlStorage(_driver, new XmlStorageIndex(_driver));

            Assert.DoesNotThrow(() => storage.Count());
            Assert.AreEqual(0, storage.Count());

            storage.Write(_info, _info.Url);

            Assert.AreEqual(1, storage.Count());
        }