public void Register() { var codec = Codec.Register("something-new", 0x0bad); try { Assert.AreEqual("something-new", codec.Name); Assert.AreEqual("something-new", codec.ToString()); Assert.AreEqual(0x0bad, codec.Code); } finally { Codec.Deregister(codec); } }