public void RemoveAtFrame_CanRemoveFrameZeroIfMultipleFramesExist() { var collection = new ImageFrameCollection <Rgba32>(new[] { new ImageFrame <Rgba32>(10, 10), new ImageFrame <Rgba32>(10, 10), }); collection.RemoveAt(0); Assert.Equal(1, collection.Count); }
public void RemoveAtFrame_ThrowIfRemovingLastFrame() { var collection = new ImageFrameCollection <Rgba32>(new[] { new ImageFrame <Rgba32>(10, 10) }); InvalidOperationException ex = Assert.Throws <InvalidOperationException>(() => { collection.RemoveAt(0); }); Assert.Equal("Cannot remove last frame.", ex.Message); }