Azavea.NijPredictivePolicing.ACSAlchemistLibrary.Transfer.AcsDataManager.GetLocalBlockGroupZipFileName C# (CSharp) Method

GetLocalBlockGroupZipFileName() public method

public GetLocalBlockGroupZipFileName ( ) : string
return string
        public string GetLocalBlockGroupZipFileName()
        {
            string remoteFilename = FileLocator.GetStateBlockGroupFileName(this.State);
            string localFilename = Settings.RequestedYear + "_" + remoteFilename;
            return FileUtilities.PathCombine(this.WorkingPath, localFilename);
        }

Usage Example

        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;
            }
        }