Example #1
0
        public void GetObjectByGuidReturnsSavedObject()
        {
            var storage = new MetaDataStorage(this.engine, Mock.Of <IPathMatcher>());
            var uuid    = Guid.NewGuid();
            var file    = new MappedObject("name", "rootId", MappedObjectType.File, null, "token")
            {
                Guid = uuid
            };

            storage.SaveMappedObject(file);

            Assert.That(storage.GetObjectByGuid(uuid), Is.EqualTo(file));
        }
Example #2
0
        public void GetObjectByGuidReturnsNullIfNoEntryExists()
        {
            var storage = new MetaDataStorage(this.engine, Mock.Of <IPathMatcher>());

            Assert.That(storage.GetObjectByGuid(Guid.NewGuid()), Is.Null);
        }
Example #3
0
        public void GetObjectByGuidReturnsNullIfNoEntryExists([Values(true, false)] bool withValidation)
        {
            var storage = new MetaDataStorage(this.engine, Mock.Of <IPathMatcher>(), withValidation);

            Assert.That(storage.GetObjectByGuid(Guid.NewGuid()), Is.Null);
        }