public void ReadEventTestThrows() { byte[] rawData = { 0x43, 0x00, 0x00, 0x00, 0x55, 0x6E, 0x73, 0x61, 0x76, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6C, 0x61, 0x79, 0x2D, 0x32, 0x30, 0x31, 0x39, 0x2E, 0x31, 0x31, 0x2E, 0x31, 0x38, 0x2D, 0x32, 0x30, 0x2E, 0x33, 0x36, 0x2E, 0x31, 0x33, 0x5F, 0x42, 0x43, 0x35, 0x38, 0x32, 0x44, 0x44, 0x41, 0x34, 0x42, 0x42, 0x31, 0x43, 0x38, 0x45, 0x34, 0x30, 0x37, 0x36, 0x32, 0x46, 0x31, 0x39, 0x39, 0x38, 0x45, 0x43, 0x44, 0x44, 0x43, 0x34, 0x30, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x70, 0x6C, 0x61, 0x79, 0x65, 0x72, 0x45, 0x6C, 0x69, 0x44, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6E, 0x74, 0x00, 0x66, 0xD3, 0x13, 0x00, 0x66, 0xD3, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00 }; using var stream = new MemoryStream(rawData); using var archive = new Unreal.Core.BinaryReader(stream) { EngineNetworkVersion = EngineNetworkVersionHistory.HISTORY_JITTER_IN_HEADER }; var reader = new MockReplayReader(); reader.SetReplay(new FortniteReplay() { Info = new ReplayInfo() { IsEncrypted = false } }); reader.SetMode(ParseMode.Debug); Assert.Throws <UnknownEventException>(() => reader.ReadEvent(archive)); archive.Reset(); reader.SetMode(ParseMode.Normal); var exception = Record.Exception(() => reader.ReadEvent(archive)); Assert.Null(exception); }
public void ReadEventTest(byte[] rawData) { using var stream = new MemoryStream(rawData); using var archive = new Unreal.Core.BinaryReader(stream); var reader = new MockReplayReader(); reader.SetReplay(new FortniteReplay() { Info = new ReplayInfo() { IsEncrypted = false } }); reader.ReadEvent(archive); Assert.True(archive.AtEnd()); Assert.False(archive.IsError); }
public void ReadEventTestThrows() { byte[] rawData = { 0x43, 0x00, 0x00, 0x00, 0x55, 0x6E, 0x73, 0x61, 0x76, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6C, 0x61, 0x79, 0x2D, 0x32, 0x30, 0x31, 0x39, 0x2E, 0x31, 0x31, 0x2E, 0x31, 0x38, 0x2D, 0x32, 0x30, 0x2E, 0x33, 0x36, 0x2E, 0x31, 0x33, 0x5F, 0x42, 0x43, 0x35, 0x38, 0x32, 0x44, 0x44, 0x41, 0x34, 0x42, 0x42, 0x31, 0x43, 0x38, 0x45, 0x34, 0x30, 0x37, 0x36, 0x32, 0x46, 0x31, 0x39, 0x39, 0x38, 0x45, 0x43, 0x44, 0x44, 0x43, 0x34, 0x30, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x70, 0x6C, 0x61, 0x79, 0x65, 0x72, 0x45, 0x6C, 0x69, 0x44, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6E, 0x74, 0x00, 0x66, 0xD3, 0x13, 0x00, 0x66, 0xD3, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00 }; using var stream = new MemoryStream(rawData); using var archive = new Unreal.Core.BinaryReader(stream); var reader = new MockReplayReader(); Assert.Throws <UnknownEventException>(() => reader.ReadEvent(archive)); }