Exemple #1
0
        public void IsPlaceholderModule()
        {
            var placeholderModule = CreatePlaceholderModule();

            Assert.True(moduleUtil.IsPlaceholderModule(placeholderModule));
            Assert.False(moduleUtil.HasBinaryLoaded(placeholderModule));
        }
Exemple #2
0
        public void RecordBeforeLoad(IList <SbModule> modules)
        {
            var loadSymbolDataBuilder = new LoadSymbolData();

            moduleFileFinder.RecordMetrics(loadSymbolDataBuilder);
            loadSymbolDataBuilder.ModulesBeforeCount = modules.Count;
            loadSymbolDataBuilder.ModulesWithSymbolsLoadedBeforeCount =
                modules.Count(m => moduleUtil.HasSymbolsLoaded(m));
            loadSymbolDataBuilder.BinariesLoadedBeforeCount =
                modules.Count(m => moduleUtil.HasBinaryLoaded(m));
            action.UpdateEvent(new DeveloperLogEvent
            {
                LoadSymbolData = loadSymbolDataBuilder
            });
        }
Exemple #3
0
        /// <summary>
        /// Creates a new mock module, and configures the values that mockModuleUtil returns in
        /// regards to said module.
        /// </summary>
        SbModule CreateMockModule(bool binaryLoaded, bool symbolsLoaded)
        {
            var module = Substitute.For <SbModule>();

            mockModuleUtil.HasSymbolsLoaded(module).Returns(symbolsLoaded);
            mockModuleUtil.HasBinaryLoaded(module).Returns(binaryLoaded);
            return(module);
        }