Azavea.NijPredictivePolicing.Test.ACSAlchemistLibrary.AreaDownloaderTests.TestFileDownload C# (CSharp) Method

TestFileDownload() private method

private TestFileDownload ( ) : void
return void
        public void TestFileDownload()
        {
            var oldConfig = Settings.ConfigFile;
            try
            {
                // Wyoming has smallest file to download
                var manager = new AcsDataManager(AcsState.Wyoming, BaseDir, "2012");
                manager.SummaryLevel = "150";

                //Settings.ConfigFile = new Config("configs\\AcsAlchemist.json.2012.config");
                if (manager.CheckCensusAggregatedDataFile())
                {
                    string filename = manager.GetLocalBlockGroupZipFileName();

                    Assert.IsTrue(File.Exists(filename), "File wasn't downloaded!");
                }
                else
                {
                    Assert.Fail("Some error was thrown during the download");
                }
            }
            finally
            {
                Settings.ConfigFile = oldConfig;
            }
        }