Index: installer/src/installer-lib/test/database_test.cpp |
=================================================================== |
--- a/installer/src/installer-lib/test/database_test.cpp |
+++ b/installer/src/installer-lib/test/database_test.cpp |
@@ -8,14 +8,14 @@ |
TEST( Database, open ) |
{ |
- File_System_Database db( L"test-installer-lib.msi" ) ; |
+ FileSystemDatabase db( L"test-installer-lib.msi" ) ; |
} |
class Database_F |
: public ::testing::Test |
{ |
protected: |
- File_System_Database db ; |
+ FileSystemDatabase db ; |
Database_F() |
: db( L"test-installer-lib.msi" ) |
@@ -25,12 +25,12 @@ |
TEST_F( Database_F, view_n_columns_and_n_rows ) |
{ |
View v( db, L"SELECT * FROM AbpUIText" ) ; |
- Record r( v.first() ) ; |
+ Record r( v.First() ) ; |
unsigned int j ; |
- for ( j = 0 ; r != v.end() ; ++ j ) |
+ for ( j = 0 ; r != v.End() ; ++ j ) |
{ |
- ASSERT_EQ( 3, r.n_fields() ) ; |
- r = v.next() ; |
+ ASSERT_EQ( 3, r.NumberOfFields() ) ; |
+ r = v.Next() ; |
} |
ASSERT_EQ( 4, j ) ; |
} |
@@ -38,29 +38,29 @@ |
TEST_F( Database_F, view_single_record ) |
{ |
View v( db, L"SELECT `content` FROM `AbpUIText` WHERE `component`='close_ie' and `id`='dialog_unknown'" ) ; |
- Record r( v.first() ) ; |
- ASSERT_EQ( 1, r.n_fields() ) ; |
- std::wstring s( r.value_string( 1 ) ) ; |
+ Record r( v.First() ) ; |
+ ASSERT_EQ( 1, r.NumberOfFields() ) ; |
+ std::wstring s( r.ValueString( 1 ) ) ; |
std::wstring expected( L"IE is still running" ) ; |
ASSERT_GT( s.length(), expected.length() ) ; |
std::wstring prefix( s.substr( 0, expected.length() ) ) ; |
ASSERT_EQ( prefix, expected ) ; |
- r = v.next() ; |
- ASSERT_EQ( v.end(), r ) ; |
+ r = v.Next() ; |
+ ASSERT_EQ( v.End(), r ) ; |
} |
TEST_F( Database_F, view_single_record_parametric ) |
{ |
View v( db, L"SELECT `content` FROM `AbpUIText` WHERE `component`='close_ie' and `id`=?" ) ; |
Record arg( 1 ) ; |
- arg.assign_string( 1, L"dialog_unknown" ) ; |
- Record r( v.first( arg ) ) ; |
- ASSERT_EQ( 1, r.n_fields() ) ; |
- std::wstring s( r.value_string( 1 ) ) ; |
+ arg.AssignString( 1, L"dialog_unknown" ) ; |
+ Record r( v.First( arg ) ) ; |
+ ASSERT_EQ( 1, r.NumberOfFields() ) ; |
+ std::wstring s( r.ValueString( 1 ) ) ; |
std::wstring expected( L"IE is still running" ) ; |
ASSERT_GT( s.length(), expected.length() ) ; |
std::wstring prefix( s.substr( 0, expected.length() ) ) ; |
ASSERT_EQ( prefix, expected ) ; |
- r = v.next() ; |
- ASSERT_EQ( v.end(), r ) ; |
+ r = v.Next() ; |
+ ASSERT_EQ( v.End(), r ) ; |
} |