public void ShouldClearLookup() { // Arrange using (MySqlProvider provider = new MySqlProvider(ConfigSettings.MySqlConnectionString)) { Shipper shipper = DataProvider.PreInsertArrange(provider); // Act provider.DeleteAll<ShipperType>(); // Assert Assert.AreEqual(provider.Select<ShipperType>().Count, 0); } }
public void ShouldDeleteAll() { // Arrange using (MySqlProvider provider = new MySqlProvider(ConfigSettings.MySqlConnectionString)) { Shipper shipper = DataProvider.PreInsertArrange(provider); provider.Insert<Shipper>(shipper); // Act provider.DeleteAll<Shipper>(); // Assert Assert.IsNull(provider.SelectById<Shipper>(shipper.Id)); Assert.IsNull(provider.SelectById<Shipper>(shipper.ShipperContacts[0].Id)); } }