Esempio n. 1
0
        public void DeepEquals()
        {
            var storeA = new FlatSymbolStore(fakeFileSystem, fakeBinaryFileUtil, STORE_PATH);
            var storeB = new FlatSymbolStore(fakeFileSystem, fakeBinaryFileUtil, STORE_PATH);

            Assert.True(storeA.DeepEquals(storeB));
            Assert.True(storeB.DeepEquals(storeA));
        }
Esempio n. 2
0
        public async Task FindFile_InvalidStoreAsync()
        {
            var store = new FlatSymbolStore(fakeFileSystem, fakeBinaryFileUtil, INVALID_PATH);

            var fileReference = await store.FindFileAsync(FILENAME, BUILD_ID, true, log);

            Assert.Null(fileReference);
            StringAssert.Contains(Strings.FailedToSearchFlatStore(INVALID_PATH, FILENAME, ""),
                                  log.ToString());
        }
Esempio n. 3
0
        public async Task FindFile_ReadBuildIdFailureAsync()
        {
            var mockBinaryFileUtil = Substitute.For <IBinaryFileUtil>();

            mockBinaryFileUtil.ReadBuildIdAsync(Arg.Any <string>()).Returns <BuildId>(x => {
                throw new BinaryFileUtilException("test exception");
            });
            var store = new FlatSymbolStore(fakeFileSystem, mockBinaryFileUtil, STORE_PATH);

            fakeBuildIdWriter.WriteBuildId(Path.Combine(STORE_PATH, FILENAME), BUILD_ID);

            var fileReference = await store.FindFileAsync(FILENAME, BUILD_ID, true, log);

            Assert.Null(fileReference);
            StringAssert.Contains("test exception", log.ToString());
        }