public void EmptyDataTest()
        {
            var metadataDeserializer = new MetadataDeserializer(
                _methodCache,
                _classCache,
                _moduleCache,
                _assemblyCache,
                _srcLocatorMockupFkt);
            metadataDeserializer.DeserializeAllMetadataAndCacheIt(_empty.ConvertToMemoryStream());

            Assert.AreEqual(0, _methodCache.Cache.Count);
            Assert.AreEqual(0, _classCache.Cache.Count);
            Assert.AreEqual(0, _moduleCache.Cache.Count);
            Assert.AreEqual(0, _assemblyCache.Cache.Count);
        }
        public void EmptyDataWithOffsetInStreamTest()
        {
            MemoryStream memoryStream = _emptyWithOffset.ConvertToMemoryStream();
            uint dummy = memoryStream.DeserializeUint32();

            var metadataDeserializer = new MetadataDeserializer(
                _methodCache,
                _classCache,
                _moduleCache,
                _assemblyCache,
                _srcLocatorMockupFkt);
            metadataDeserializer.DeserializeAllMetadataAndCacheIt(memoryStream);

            Assert.AreEqual(0, _methodCache.Cache.Count);
            Assert.AreEqual(0, _classCache.Cache.Count);
            Assert.AreEqual(0, _moduleCache.Cache.Count);
            Assert.AreEqual(0, _assemblyCache.Cache.Count);
        }
        public void SetUp()
        {
            _memoryStream = _metadataBytes.ConvertToMemoryStream();
            _methodCache = new MetadataCache<MethodMetadata>();
            _classCache = new MetadataCache<ClassMetadata>();
            _moduleCache = new MetadataCache<ModuleMetadata>();
            _assemblyCache = new MetadataCache<AssemblyMetadata>();

            var mockSourceLocatorFaktory = new Mock<ISourceLocatorFactory>(MockBehavior.Strict);
            var metadataDeserializer = new MetadataDeserializer(
                _methodCache,
                _classCache,
                _moduleCache,
                _assemblyCache,
                mockSourceLocatorFaktory.Object);
            metadataDeserializer.DeserializeAllMetadataAndCacheIt(_memoryStream);
        }