예제 #1
0
        public void Load_Should_Return_What_LoadDbFromTxt_Returns()
        {
            // Arrangements
            A.CallTo(() => _unzipper.UnzipArchive("never mind")).Returns(null);
            A.CallTo(() => _txtLoader.LoadDbFromTxt("path from settings")).Returns(mDbLoadResult);

            // Act and Assert
            _underTest.Load("never mind").Should().Be(mDbLoadResult);
        }
예제 #2
0
        public DbLoadResult Load(string filename)
        {
            var loadResult = mUnzipper.UnzipArchive(filename);

            if (loadResult != null)
            {
                return(loadResult);
            }

            return(mTxtLoader.LoadDbFromTxt(Settings.Default.TemporaryTxtDbPath));
        }