mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 20:00:05 +00:00 
			
		
		
		
	Add county database interface and test
This commit is contained in:
		
							parent
							
								
									25f73ae105
								
							
						
					
					
						commit
						305e5c3698
					
				
					 6 changed files with 214 additions and 3 deletions
				
			
		
							
								
								
									
										38
									
								
								test/source/scwx/qt/config/county_database.test.cpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								test/source/scwx/qt/config/county_database.test.cpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,38 @@ | |||
| #include <scwx/qt/config/county_database.hpp> | ||||
| 
 | ||||
| #include <gtest/gtest.h> | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace qt | ||||
| { | ||||
| namespace config | ||||
| { | ||||
| 
 | ||||
| class CountyDatabaseTest : | ||||
|     public testing::TestWithParam<std::pair<std::string, std::string>> | ||||
| { | ||||
|    virtual void SetUp() { scwx::qt::config::CountyDatabase::Initialize(); } | ||||
| }; | ||||
| 
 | ||||
| TEST_P(CountyDatabaseTest, CountyName) | ||||
| { | ||||
|    auto& [id, name] = GetParam(); | ||||
| 
 | ||||
|    std::string actualName = CountyDatabase::GetCountyName(id); | ||||
| 
 | ||||
|    EXPECT_EQ(actualName, name); | ||||
| } | ||||
| 
 | ||||
| INSTANTIATE_TEST_SUITE_P( | ||||
|    CountyDatabase, | ||||
|    CountyDatabaseTest, | ||||
|    testing::Values(std::make_pair("AZC013", "Maricopa"), | ||||
|                    std::make_pair("MOC183", "St. Charles"), | ||||
|                    std::make_pair("TXZ211", "Austin"), | ||||
|                    std::make_pair("GMZ335", "Galveston Bay"), | ||||
|                    std::make_pair("ANZ338", "New York Harbor"))); | ||||
| 
 | ||||
| } // namespace config
 | ||||
| } // namespace qt
 | ||||
| } // namespace scwx
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat