public void GetAll_CountGtZero_Test() { string fileName = DateTime.Now.Ticks.ToString() + ".kpsdb"; string folderName = DateTime.Now.Ticks.ToString(); var provider = new Provider(fileName, folderName); using (var connection = provider.GetConnection()) { connection.Open(); using (var command = new SqliteCommand(connection)) { this.InsertDummyData(CreateDummyData(), command); this.InsertDummyData(CreateDummyData(), command); this.InsertDummyData(CreateDummyData(), command); ISyncItemServices services = new SyncItemServices(provider); var outputData = services.GetAll(); Assert.AreEqual(outputData.Count, 3); } connection.Close(); } File.Delete(provider.DbFile); Directory.Delete(folderName, true); }
public void GetAll_None_Test() { string fileName = DateTime.Now.Ticks.ToString() + ".kpsdb"; string folderName = DateTime.Now.Ticks.ToString(); var provider = new Provider(fileName, folderName); ISyncItemServices services = new SyncItemServices(provider); var outputData = services.GetAll(); Assert.AreEqual(outputData.Count, 0); File.Delete(provider.DbFile); Directory.Delete(folderName, true); }