public void AmortStoreTest(string dt, AmortizeInterval type) { var amort1 = AmortDataProvider.Create(dt, type); foreach (var item in amort1.Schedule) { item.Value = 0; } m_Adapter.Upsert(amort1); Assert.NotNull(amort1.ID); var amort2 = m_Adapter.SelectAmortizations(DistributedQueryUnconstrained.Instance).Single(); Assert.Equal(amort1, amort2, new AmortEqualityComparer()); var amort3 = m_Adapter.SelectAmortization(amort1.ID.Value); Assert.Equal(amort1, amort3, new AmortEqualityComparer()); Assert.True(m_Adapter.DeleteAmortization(amort1.ID.Value)); Assert.False(m_Adapter.DeleteAmortization(amort1.ID.Value)); Assert.False(m_Adapter.SelectAmortizations(DistributedQueryUnconstrained.Instance).Any()); }