SlideShare a Scribd company logo
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
context = new RenamingDelegatingContext(
    getContext(),
    "test_"
);

helper = new TestterSQLiteOpenHelper(
    context
);
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
public class IconSQLiteDaoTest extends DatabaseTestCase {

    private IconDao iconDao;

   @Override
   protected void setUp() throws Exception {
       super.setUp();

       importData(FileType.Yaml, "IconSQLiteDaoTest");
       iconDao = new IconSQLiteDao(getSQLiteDatabase());
   }

   @Override
   protected SQLiteOpenHelper createSQLiteOpenHelper() {
       return new TestterSQLiteOpenHelper(getDatabaseContext());
   }

    public void testFindByUrl() {
        Icon icon = iconDao.findByUrl("http://a2.twimg.com/
profile_images/1039340061/face_normal.png");
        assertEquals(1, icon.id.intValue());
        assertEquals("http://a2.twimg.com/profile_images/1039340061/
face_normal.png", icon.url);
        assertEquals(1307203506481L, icon.createdAt.longValue());
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
public class MigrationTest extends DatabaseTestCase {

   @Override
   protected SQLiteOpenHelper createSQLiteOpenHelper() {
       return new FixtureV1MigrationOpenHelper(getDatabaseContext());
   }

    public void testV1Migration() {
        importData(FileType.Csv, "migrationTest");

       ColumnInfo[] infos = loadColumnInfos("user");
       assertEquals(5, infos.length);
       assertEquals("_id", infos[0].getName());
       assertEquals("name", infos[1].getName());
       assertEquals("weight", infos[2].getName());
       assertEquals("image", infos[3].getName());
       assertEquals("created", infos[4].getName());

        replaceSQLiteOpenHelper(new
FixtureMigrationOpenHelper(getDatabaseContext()));



       infos = loadColumnInfos("user");
       assertEquals(6, infos.length);
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう
SQLite 周りのテストをしよう

More Related Content

What's hot (20)

MySql:Basics
MySql:BasicsMySql:Basics
MySql:Basics
DataminingTools Inc
 
MySql:Introduction
MySql:IntroductionMySql:Introduction
MySql:Introduction
DataminingTools Inc
 
Presentation Android Architecture Components
Presentation Android Architecture ComponentsPresentation Android Architecture Components
Presentation Android Architecture Components
Attract Group
 
Android Architecture components
Android Architecture componentsAndroid Architecture components
Android Architecture components
Michelantonio Trizio
 
Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1
Kevin Octavian
 
The Ring programming language version 1.6 book - Part 31 of 189
The Ring programming language version 1.6 book - Part 31 of 189The Ring programming language version 1.6 book - Part 31 of 189
The Ring programming language version 1.6 book - Part 31 of 189
Mahmoud Samir Fayed
 
Architecture Components
Architecture ComponentsArchitecture Components
Architecture Components
Sang Eel Kim
 
The Ring programming language version 1.5.4 book - Part 29 of 185
The Ring programming language version 1.5.4 book - Part 29 of 185The Ring programming language version 1.5.4 book - Part 29 of 185
The Ring programming language version 1.5.4 book - Part 29 of 185
Mahmoud Samir Fayed
 
Html web sql database
Html web sql databaseHtml web sql database
Html web sql database
AbhishekMondal42
 
Clustering your Application with Hazelcast
Clustering your Application with HazelcastClustering your Application with Hazelcast
Clustering your Application with Hazelcast
Hazelcast
 
The Ring programming language version 1.5.3 book - Part 29 of 184
The Ring programming language version 1.5.3 book - Part 29 of 184The Ring programming language version 1.5.3 book - Part 29 of 184
The Ring programming language version 1.5.3 book - Part 29 of 184
Mahmoud Samir Fayed
 
Android architecture components
Android architecture componentsAndroid architecture components
Android architecture components
Diego Figueredo
 
Entity System Architecture with Unity - Unite Europe 2015
Entity System Architecture with Unity - Unite Europe 2015Entity System Architecture with Unity - Unite Europe 2015
Entity System Architecture with Unity - Unite Europe 2015
Simon Schmid
 
The Ring programming language version 1.8 book - Part 34 of 202
The Ring programming language version 1.8 book - Part 34 of 202The Ring programming language version 1.8 book - Part 34 of 202
The Ring programming language version 1.8 book - Part 34 of 202
Mahmoud Samir Fayed
 
Creating, Updating and Deleting Document in MongoDB
Creating, Updating and Deleting Document in MongoDBCreating, Updating and Deleting Document in MongoDB
Creating, Updating and Deleting Document in MongoDB
Wildan Maulana
 
Android sq lite-chapter 22
Android sq lite-chapter 22Android sq lite-chapter 22
Android sq lite-chapter 22
Dr. Ramkumar Lakshminarayanan
 
Azure Table Storage: The Good, the Bad, the Ugly (15 min. lightning talk)
Azure Table Storage: The Good, the Bad, the Ugly (15 min. lightning talk)Azure Table Storage: The Good, the Bad, the Ugly (15 min. lightning talk)
Azure Table Storage: The Good, the Bad, the Ugly (15 min. lightning talk)
Sirar Salih
 
The Ring programming language version 1.9 book - Part 36 of 210
The Ring programming language version 1.9 book - Part 36 of 210The Ring programming language version 1.9 book - Part 36 of 210
The Ring programming language version 1.9 book - Part 36 of 210
Mahmoud Samir Fayed
 
Accessing data with android cursors
Accessing data with android cursorsAccessing data with android cursors
Accessing data with android cursors
info_zybotech
 
Windows Mobile 5.0 Data Access And Storage Webcast
Windows Mobile 5.0 Data Access And Storage WebcastWindows Mobile 5.0 Data Access And Storage Webcast
Windows Mobile 5.0 Data Access And Storage Webcast
Vinod Kumar
 
Presentation Android Architecture Components
Presentation Android Architecture ComponentsPresentation Android Architecture Components
Presentation Android Architecture Components
Attract Group
 
Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1
Kevin Octavian
 
The Ring programming language version 1.6 book - Part 31 of 189
The Ring programming language version 1.6 book - Part 31 of 189The Ring programming language version 1.6 book - Part 31 of 189
The Ring programming language version 1.6 book - Part 31 of 189
Mahmoud Samir Fayed
 
Architecture Components
Architecture ComponentsArchitecture Components
Architecture Components
Sang Eel Kim
 
The Ring programming language version 1.5.4 book - Part 29 of 185
The Ring programming language version 1.5.4 book - Part 29 of 185The Ring programming language version 1.5.4 book - Part 29 of 185
The Ring programming language version 1.5.4 book - Part 29 of 185
Mahmoud Samir Fayed
 
Clustering your Application with Hazelcast
Clustering your Application with HazelcastClustering your Application with Hazelcast
Clustering your Application with Hazelcast
Hazelcast
 
The Ring programming language version 1.5.3 book - Part 29 of 184
The Ring programming language version 1.5.3 book - Part 29 of 184The Ring programming language version 1.5.3 book - Part 29 of 184
The Ring programming language version 1.5.3 book - Part 29 of 184
Mahmoud Samir Fayed
 
Android architecture components
Android architecture componentsAndroid architecture components
Android architecture components
Diego Figueredo
 
Entity System Architecture with Unity - Unite Europe 2015
Entity System Architecture with Unity - Unite Europe 2015Entity System Architecture with Unity - Unite Europe 2015
Entity System Architecture with Unity - Unite Europe 2015
Simon Schmid
 
The Ring programming language version 1.8 book - Part 34 of 202
The Ring programming language version 1.8 book - Part 34 of 202The Ring programming language version 1.8 book - Part 34 of 202
The Ring programming language version 1.8 book - Part 34 of 202
Mahmoud Samir Fayed
 
Creating, Updating and Deleting Document in MongoDB
Creating, Updating and Deleting Document in MongoDBCreating, Updating and Deleting Document in MongoDB
Creating, Updating and Deleting Document in MongoDB
Wildan Maulana
 
Azure Table Storage: The Good, the Bad, the Ugly (15 min. lightning talk)
Azure Table Storage: The Good, the Bad, the Ugly (15 min. lightning talk)Azure Table Storage: The Good, the Bad, the Ugly (15 min. lightning talk)
Azure Table Storage: The Good, the Bad, the Ugly (15 min. lightning talk)
Sirar Salih
 
The Ring programming language version 1.9 book - Part 36 of 210
The Ring programming language version 1.9 book - Part 36 of 210The Ring programming language version 1.9 book - Part 36 of 210
The Ring programming language version 1.9 book - Part 36 of 210
Mahmoud Samir Fayed
 
Accessing data with android cursors
Accessing data with android cursorsAccessing data with android cursors
Accessing data with android cursors
info_zybotech
 
Windows Mobile 5.0 Data Access And Storage Webcast
Windows Mobile 5.0 Data Access And Storage WebcastWindows Mobile 5.0 Data Access And Storage Webcast
Windows Mobile 5.0 Data Access And Storage Webcast
Vinod Kumar
 

Similar to SQLite 周りのテストをしよう (20)

Creating an Uber Clone - Part XXXX.pdf
Creating an Uber Clone - Part XXXX.pdfCreating an Uber Clone - Part XXXX.pdf
Creating an Uber Clone - Part XXXX.pdf
ShaiAlmog1
 
Unit testing with mock libs
Unit testing with mock libsUnit testing with mock libs
Unit testing with mock libs
Valentin Kolesnikov
 
Accessing data with android cursors
Accessing data with android cursorsAccessing data with android cursors
Accessing data with android cursors
info_zybotech
 
I am looking for some assistance with SQLite database. I have tried se.pdf
I am looking for some assistance with SQLite database. I have tried se.pdfI am looking for some assistance with SQLite database. I have tried se.pdf
I am looking for some assistance with SQLite database. I have tried se.pdf
Conint29
 
Bkbiet day2 & 3
Bkbiet day2 & 3Bkbiet day2 & 3
Bkbiet day2 & 3
mihirio
 
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
탑크리에듀(구로디지털단지역3번출구 2분거리)
 
Test-driven Development with AEM
Test-driven Development with AEMTest-driven Development with AEM
Test-driven Development with AEM
Jan Wloka
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
javatwo2011
 
Selenium Webdriver with data driven framework
Selenium Webdriver with data driven frameworkSelenium Webdriver with data driven framework
Selenium Webdriver with data driven framework
David Rajah Selvaraj
 
Requery overview
Requery overviewRequery overview
Requery overview
Sunghyouk Bae
 
Wicket 6
Wicket 6Wicket 6
Wicket 6
codepitbull
 
ERRest
ERRestERRest
ERRest
WO Community
 
Beautiful java script
Beautiful java scriptBeautiful java script
Beautiful java script
Ürgo Ringo
 
Vaadin7
Vaadin7Vaadin7
Vaadin7
Joonas Lehtinen
 
Teste de Integração com DbUnit e jIntegrity
Teste de Integração com DbUnit e jIntegrityTeste de Integração com DbUnit e jIntegrity
Teste de Integração com DbUnit e jIntegrity
Washington Botelho
 
Deep dive into new ASP.NET MVC 4 Features
Deep dive into new ASP.NET MVC 4 Features Deep dive into new ASP.NET MVC 4 Features
Deep dive into new ASP.NET MVC 4 Features
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Initial UI Mockup - Part 3.pdf
Initial UI Mockup - Part 3.pdfInitial UI Mockup - Part 3.pdf
Initial UI Mockup - Part 3.pdf
ShaiAlmog1
 
【Unity】Scriptable object 入門と活用例
【Unity】Scriptable object 入門と活用例【Unity】Scriptable object 入門と活用例
【Unity】Scriptable object 入門と活用例
Unity Technologies Japan K.K.
 
Learning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security APILearning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security API
caswenson
 
package net.codejava.swing.mail;import java.awt.Font;import java.pdf
package net.codejava.swing.mail;import java.awt.Font;import java.pdfpackage net.codejava.swing.mail;import java.awt.Font;import java.pdf
package net.codejava.swing.mail;import java.awt.Font;import java.pdf
sudhirchourasia86
 
Creating an Uber Clone - Part XXXX.pdf
Creating an Uber Clone - Part XXXX.pdfCreating an Uber Clone - Part XXXX.pdf
Creating an Uber Clone - Part XXXX.pdf
ShaiAlmog1
 
Accessing data with android cursors
Accessing data with android cursorsAccessing data with android cursors
Accessing data with android cursors
info_zybotech
 
I am looking for some assistance with SQLite database. I have tried se.pdf
I am looking for some assistance with SQLite database. I have tried se.pdfI am looking for some assistance with SQLite database. I have tried se.pdf
I am looking for some assistance with SQLite database. I have tried se.pdf
Conint29
 
Bkbiet day2 & 3
Bkbiet day2 & 3Bkbiet day2 & 3
Bkbiet day2 & 3
mihirio
 
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
탑크리에듀(구로디지털단지역3번출구 2분거리)
 
Test-driven Development with AEM
Test-driven Development with AEMTest-driven Development with AEM
Test-driven Development with AEM
Jan Wloka
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
javatwo2011
 
Selenium Webdriver with data driven framework
Selenium Webdriver with data driven frameworkSelenium Webdriver with data driven framework
Selenium Webdriver with data driven framework
David Rajah Selvaraj
 
Beautiful java script
Beautiful java scriptBeautiful java script
Beautiful java script
Ürgo Ringo
 
Teste de Integração com DbUnit e jIntegrity
Teste de Integração com DbUnit e jIntegrityTeste de Integração com DbUnit e jIntegrity
Teste de Integração com DbUnit e jIntegrity
Washington Botelho
 
Initial UI Mockup - Part 3.pdf
Initial UI Mockup - Part 3.pdfInitial UI Mockup - Part 3.pdf
Initial UI Mockup - Part 3.pdf
ShaiAlmog1
 
Learning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security APILearning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security API
caswenson
 
package net.codejava.swing.mail;import java.awt.Font;import java.pdf
package net.codejava.swing.mail;import java.awt.Font;import java.pdfpackage net.codejava.swing.mail;import java.awt.Font;import java.pdf
package net.codejava.swing.mail;import java.awt.Font;import java.pdf
sudhirchourasia86
 

Recently uploaded (20)

Google News Consideration for SEO | Google Search NYC
Google News Consideration for SEO | Google Search NYCGoogle News Consideration for SEO | Google Search NYC
Google News Consideration for SEO | Google Search NYC
Primary Position
 
UiPath Automation Developer Associate Training Series 2025 - Session 7
UiPath Automation Developer Associate Training Series 2025 - Session 7UiPath Automation Developer Associate Training Series 2025 - Session 7
UiPath Automation Developer Associate Training Series 2025 - Session 7
DianaGray10
 
Unleash the Power of Symfony Messenger
Unleash the  Power  of Symfony MessengerUnleash the  Power  of Symfony Messenger
Unleash the Power of Symfony Messenger
Kris Wallsmith
 
Security Policies MuleSoft API Manager Mule4
Security Policies MuleSoft API Manager Mule4Security Policies MuleSoft API Manager Mule4
Security Policies MuleSoft API Manager Mule4
Adalberto Toledo
 
The Best of Both Worlds: Hybrid Clustering with Delta Lake
The Best of Both Worlds: Hybrid Clustering with Delta LakeThe Best of Both Worlds: Hybrid Clustering with Delta Lake
The Best of Both Worlds: Hybrid Clustering with Delta Lake
carlyakerly1
 
IObit Driver Booster Pro Crack 12.2.0 with License Key [2025]
IObit Driver Booster Pro Crack 12.2.0 with License Key [2025]IObit Driver Booster Pro Crack 12.2.0 with License Key [2025]
IObit Driver Booster Pro Crack 12.2.0 with License Key [2025]
jamesfolkner123
 
Measuring Copilot and Gen AI Success with Viva Insights and Purview
Measuring Copilot and Gen AI Success with Viva Insights and PurviewMeasuring Copilot and Gen AI Success with Viva Insights and Purview
Measuring Copilot and Gen AI Success with Viva Insights and Purview
Nikki Chapple
 
Salesforce Welly March 2025User Group Meeting
Salesforce Welly March 2025User Group MeetingSalesforce Welly March 2025User Group Meeting
Salesforce Welly March 2025User Group Meeting
Anna Loughnan Colquhoun
 
Safer’s Picks: The 6 FME Transformers You Didn’t Know You Needed
Safer’s Picks: The 6 FME Transformers You Didn’t Know You NeededSafer’s Picks: The 6 FME Transformers You Didn’t Know You Needed
Safer’s Picks: The 6 FME Transformers You Didn’t Know You Needed
Safe Software
 
B2B SaaS - Reduce Churn using Proactive Support.pdf
B2B SaaS - Reduce Churn using Proactive Support.pdfB2B SaaS - Reduce Churn using Proactive Support.pdf
B2B SaaS - Reduce Churn using Proactive Support.pdf
Vijay Chandran
 
TrustArc Webinar: Strategies for Future-Proofing Privacy for Healthcare
TrustArc Webinar: Strategies for Future-Proofing Privacy for HealthcareTrustArc Webinar: Strategies for Future-Proofing Privacy for Healthcare
TrustArc Webinar: Strategies for Future-Proofing Privacy for Healthcare
TrustArc
 
Comprehensive Guide to Ansible Application Roles.pdf
Comprehensive Guide to Ansible Application Roles.pdfComprehensive Guide to Ansible Application Roles.pdf
Comprehensive Guide to Ansible Application Roles.pdf
RHCSA Guru
 
Real World RAG: 5 common issues encountered when building Real World Applicat...
Real World RAG: 5 common issues encountered when building Real World Applicat...Real World RAG: 5 common issues encountered when building Real World Applicat...
Real World RAG: 5 common issues encountered when building Real World Applicat...
walterheck3
 
Open-Source GenAI vs. Enterprise GenAI: Navigating the Future of AI Innovatio...
Open-Source GenAI vs. Enterprise GenAI: Navigating the Future of AI Innovatio...Open-Source GenAI vs. Enterprise GenAI: Navigating the Future of AI Innovatio...
Open-Source GenAI vs. Enterprise GenAI: Navigating the Future of AI Innovatio...
All Things Open
 
Precisely Showcase - Data Governance, Quality & MDM.pdf
Precisely Showcase - Data Governance, Quality & MDM.pdfPrecisely Showcase - Data Governance, Quality & MDM.pdf
Precisely Showcase - Data Governance, Quality & MDM.pdf
Precisely
 
Taking Your Legacy Data Beyond Modernization with AWS.pdf
Taking Your Legacy Data Beyond Modernization with AWS.pdfTaking Your Legacy Data Beyond Modernization with AWS.pdf
Taking Your Legacy Data Beyond Modernization with AWS.pdf
Precisely
 
AI Revolution unleashed with AI Foundry at AI Tour Brussels
AI Revolution unleashed with AI Foundry at AI Tour BrusselsAI Revolution unleashed with AI Foundry at AI Tour Brussels
AI Revolution unleashed with AI Foundry at AI Tour Brussels
Nathan Bijnens
 
EaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial KeyEaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial Key
piolttruth25
 
Cloud Computing The Future of Technology
Cloud Computing The Future of TechnologyCloud Computing The Future of Technology
Cloud Computing The Future of Technology
joelmcapg
 
Best Crane Manufacturers in India Industry Leaders & Innovations.pdf
Best Crane Manufacturers in India Industry Leaders & Innovations.pdfBest Crane Manufacturers in India Industry Leaders & Innovations.pdf
Best Crane Manufacturers in India Industry Leaders & Innovations.pdf
Hercules Hoists
 
Google News Consideration for SEO | Google Search NYC
Google News Consideration for SEO | Google Search NYCGoogle News Consideration for SEO | Google Search NYC
Google News Consideration for SEO | Google Search NYC
Primary Position
 
UiPath Automation Developer Associate Training Series 2025 - Session 7
UiPath Automation Developer Associate Training Series 2025 - Session 7UiPath Automation Developer Associate Training Series 2025 - Session 7
UiPath Automation Developer Associate Training Series 2025 - Session 7
DianaGray10
 
Unleash the Power of Symfony Messenger
Unleash the  Power  of Symfony MessengerUnleash the  Power  of Symfony Messenger
Unleash the Power of Symfony Messenger
Kris Wallsmith
 
Security Policies MuleSoft API Manager Mule4
Security Policies MuleSoft API Manager Mule4Security Policies MuleSoft API Manager Mule4
Security Policies MuleSoft API Manager Mule4
Adalberto Toledo
 
The Best of Both Worlds: Hybrid Clustering with Delta Lake
The Best of Both Worlds: Hybrid Clustering with Delta LakeThe Best of Both Worlds: Hybrid Clustering with Delta Lake
The Best of Both Worlds: Hybrid Clustering with Delta Lake
carlyakerly1
 
IObit Driver Booster Pro Crack 12.2.0 with License Key [2025]
IObit Driver Booster Pro Crack 12.2.0 with License Key [2025]IObit Driver Booster Pro Crack 12.2.0 with License Key [2025]
IObit Driver Booster Pro Crack 12.2.0 with License Key [2025]
jamesfolkner123
 
Measuring Copilot and Gen AI Success with Viva Insights and Purview
Measuring Copilot and Gen AI Success with Viva Insights and PurviewMeasuring Copilot and Gen AI Success with Viva Insights and Purview
Measuring Copilot and Gen AI Success with Viva Insights and Purview
Nikki Chapple
 
Salesforce Welly March 2025User Group Meeting
Salesforce Welly March 2025User Group MeetingSalesforce Welly March 2025User Group Meeting
Salesforce Welly March 2025User Group Meeting
Anna Loughnan Colquhoun
 
Safer’s Picks: The 6 FME Transformers You Didn’t Know You Needed
Safer’s Picks: The 6 FME Transformers You Didn’t Know You NeededSafer’s Picks: The 6 FME Transformers You Didn’t Know You Needed
Safer’s Picks: The 6 FME Transformers You Didn’t Know You Needed
Safe Software
 
B2B SaaS - Reduce Churn using Proactive Support.pdf
B2B SaaS - Reduce Churn using Proactive Support.pdfB2B SaaS - Reduce Churn using Proactive Support.pdf
B2B SaaS - Reduce Churn using Proactive Support.pdf
Vijay Chandran
 
TrustArc Webinar: Strategies for Future-Proofing Privacy for Healthcare
TrustArc Webinar: Strategies for Future-Proofing Privacy for HealthcareTrustArc Webinar: Strategies for Future-Proofing Privacy for Healthcare
TrustArc Webinar: Strategies for Future-Proofing Privacy for Healthcare
TrustArc
 
Comprehensive Guide to Ansible Application Roles.pdf
Comprehensive Guide to Ansible Application Roles.pdfComprehensive Guide to Ansible Application Roles.pdf
Comprehensive Guide to Ansible Application Roles.pdf
RHCSA Guru
 
Real World RAG: 5 common issues encountered when building Real World Applicat...
Real World RAG: 5 common issues encountered when building Real World Applicat...Real World RAG: 5 common issues encountered when building Real World Applicat...
Real World RAG: 5 common issues encountered when building Real World Applicat...
walterheck3
 
Open-Source GenAI vs. Enterprise GenAI: Navigating the Future of AI Innovatio...
Open-Source GenAI vs. Enterprise GenAI: Navigating the Future of AI Innovatio...Open-Source GenAI vs. Enterprise GenAI: Navigating the Future of AI Innovatio...
Open-Source GenAI vs. Enterprise GenAI: Navigating the Future of AI Innovatio...
All Things Open
 
Precisely Showcase - Data Governance, Quality & MDM.pdf
Precisely Showcase - Data Governance, Quality & MDM.pdfPrecisely Showcase - Data Governance, Quality & MDM.pdf
Precisely Showcase - Data Governance, Quality & MDM.pdf
Precisely
 
Taking Your Legacy Data Beyond Modernization with AWS.pdf
Taking Your Legacy Data Beyond Modernization with AWS.pdfTaking Your Legacy Data Beyond Modernization with AWS.pdf
Taking Your Legacy Data Beyond Modernization with AWS.pdf
Precisely
 
AI Revolution unleashed with AI Foundry at AI Tour Brussels
AI Revolution unleashed with AI Foundry at AI Tour BrusselsAI Revolution unleashed with AI Foundry at AI Tour Brussels
AI Revolution unleashed with AI Foundry at AI Tour Brussels
Nathan Bijnens
 
EaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial KeyEaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial Key
piolttruth25
 
Cloud Computing The Future of Technology
Cloud Computing The Future of TechnologyCloud Computing The Future of Technology
Cloud Computing The Future of Technology
joelmcapg
 
Best Crane Manufacturers in India Industry Leaders & Innovations.pdf
Best Crane Manufacturers in India Industry Leaders & Innovations.pdfBest Crane Manufacturers in India Industry Leaders & Innovations.pdf
Best Crane Manufacturers in India Industry Leaders & Innovations.pdf
Hercules Hoists
 

SQLite 周りのテストをしよう

  • 9. context = new RenamingDelegatingContext( getContext(), "test_" ); helper = new TestterSQLiteOpenHelper( context );
  • 16. public class IconSQLiteDaoTest extends DatabaseTestCase { private IconDao iconDao; @Override protected void setUp() throws Exception { super.setUp(); importData(FileType.Yaml, "IconSQLiteDaoTest"); iconDao = new IconSQLiteDao(getSQLiteDatabase()); } @Override protected SQLiteOpenHelper createSQLiteOpenHelper() { return new TestterSQLiteOpenHelper(getDatabaseContext()); } public void testFindByUrl() { Icon icon = iconDao.findByUrl("http://a2.twimg.com/ profile_images/1039340061/face_normal.png"); assertEquals(1, icon.id.intValue()); assertEquals("http://a2.twimg.com/profile_images/1039340061/ face_normal.png", icon.url); assertEquals(1307203506481L, icon.createdAt.longValue());
  • 23. public class MigrationTest extends DatabaseTestCase { @Override protected SQLiteOpenHelper createSQLiteOpenHelper() { return new FixtureV1MigrationOpenHelper(getDatabaseContext()); } public void testV1Migration() { importData(FileType.Csv, "migrationTest"); ColumnInfo[] infos = loadColumnInfos("user"); assertEquals(5, infos.length); assertEquals("_id", infos[0].getName()); assertEquals("name", infos[1].getName()); assertEquals("weight", infos[2].getName()); assertEquals("image", infos[3].getName()); assertEquals("created", infos[4].getName()); replaceSQLiteOpenHelper(new FixtureMigrationOpenHelper(getDatabaseContext())); infos = loadColumnInfos("user"); assertEquals(6, infos.length);

Editor's Notes