public void WriteARGBTest() { var val = new SwfRGBA(0x0a, 0xff, 0x83, 0x12); var mem = new MemoryStream(); var writer = new SwfStreamWriter(mem); writer.WriteARGB(val); mem.Seek(0, SeekOrigin.Begin); Assert.AreEqual(0x12, mem.ReadByte(), "Byte 0"); Assert.AreEqual(0x0a, mem.ReadByte(), "Byte 1"); Assert.AreEqual(0xff, mem.ReadByte(), "Byte 2"); Assert.AreEqual(0x83, mem.ReadByte(), "Byte 3"); Assert.AreEqual(mem.Length, mem.Position, "Should reach end of the stream"); }