public void RemoveAt_WrongKeyIndex() { ChangeTrackingSessionStateItemCollection items = new ChangeTrackingSessionStateItemCollection(); items["key"] = "value"; Assert.Equal(1, items.Count); Assert.Equal(0, items.GetDeletedKeys().Count); Assert.Equal(1, items.GetModifiedKeys().Count); Assert.Throws<ArgumentOutOfRangeException>(() => items.RemoveAt(1)); }
public void RemoveAt_WrongKeyIndex() { ChangeTrackingSessionStateItemCollection items = new ChangeTrackingSessionStateItemCollection(); items["key"] = "value"; Assert.Equal(1, items.Count); Assert.Equal(0, items.GetDeletedKeys().Count); Assert.Equal(1, items.GetModifiedKeys().Count); Assert.Throws <ArgumentOutOfRangeException>(() => items.RemoveAt(1)); }
public void RemoveAt_WrongKeyIndex() { ChangeTrackingSessionStateItemCollection items = Utility.GetChangeTrackingSessionStateItemCollection(); items["key"] = "value"; Assert.Single(items); Assert.Empty(items.GetDeletedKeys()); Assert.Single(items.GetModifiedKeys()); Assert.Throws <ArgumentOutOfRangeException>(() => items.RemoveAt(1)); }
public void RemoveAt_Successful() { ChangeTrackingSessionStateItemCollection items = new ChangeTrackingSessionStateItemCollection(); items["key"] = "value"; Assert.Equal(1, items.Count); Assert.Equal(0, items.GetDeletedKeys().Count); Assert.Equal(1, items.GetModifiedKeys().Count); items.RemoveAt(0); Assert.Equal(0, items.Count); Assert.Equal(1, items.GetDeletedKeys().Count); Assert.Equal(0, items.GetModifiedKeys().Count); }
public void RemoveAt_Successful() { ChangeTrackingSessionStateItemCollection items = new ChangeTrackingSessionStateItemCollection(); items["key"] = "value"; Assert.Equal(1, items.Count); Assert.Equal(0, items.GetDeletedKeys().Count); Assert.Equal(1, items.GetModifiedKeys().Count); items.RemoveAt(0); Assert.Equal(0, items.Count); Assert.Equal(1, items.GetDeletedKeys().Count); Assert.Equal(0, items.GetModifiedKeys().Count); }
public void RemoveAt_Successful() { ChangeTrackingSessionStateItemCollection items = Utility.GetChangeTrackingSessionStateItemCollection(); items["key"] = "value"; Assert.Single(items); Assert.Empty(items.GetDeletedKeys()); Assert.Single(items.GetModifiedKeys()); items.RemoveAt(0); Assert.Empty(items); Assert.Single(items.GetDeletedKeys()); Assert.Empty(items.GetModifiedKeys()); }