private void SwapPixelInternal() { using (var testBitmap = TestingHelper.GetTestBitmap()) using (var fast = new FastBitmapPixelProvider(testBitmap, true)) { for (int x = 0; x < testBitmap.Width; ++x) { for (int y = 0; y < testBitmap.Height; ++y) { var expected = fast.GetPixel(x, y); var actual = fast.SwapPixel(x, y, TestingHelper.GetRandomColor()); AssertEx.AreEqual<NativeColor>(expected, actual); } } } }