public void Read2Test() { var mem = new MemoryStream(_etalon2); var tagReader = new SwfTagDeserializer(new SwfFile()); var tagData = new SwfTagData { Type = SwfTagType.DefineShape, Data = mem.ToArray() }; var res = tagReader.ReadTag <DefineShapeTag>(tagData); AssertTag.AreEqual(GetDefineShapeTag2(), res); }
public void ReadTest() { var mem = new MemoryStream(_etalon); var tagReader = new SwfTagDeserializer(new SwfFile()); var tagData = new SwfTagData { Type = SwfTagType.Metadata, Data = mem.ToArray() }; var res = tagReader.ReadTag <MetadataTag>(tagData); Assert.IsNotNull(res); AssertTag.AreEqual(GetMetadataTag(), res); }
public void ParseTest() { var tag = ParseTagFromResource("ControlTags.DefineSceneAndFrameLabelDataTag.xml"); AssertTag.AreEqual(GetDefineSceneAndFrameLabelDataTag(), tag, "DefineSceneAndFrameLabelDataTag"); }