@@ -23,12 +23,14 @@ public partial class CPacketPlayerPosition : ClientPacket
2323 """ ;
2424
2525 TestAdapter < PacketGenerator > test = new ( testCode , "CPacketPlayerPosition.g.cs" ) ;
26- string generatedSource = test . Start ( ) ;
26+
27+ test . Start ( )
28+ . GetGeneratedSource ( out string source ) ;
2729
28- int idWriteIndex = generatedSource . IndexOf ( "writer.Write(Id);" ) ;
29- int positionWriteIndex = generatedSource . IndexOf ( "writer.Write(Position);" ) ;
30- int idReadIndex = generatedSource . IndexOf ( "Id = reader.ReadUInt();" ) ;
31- int positionReadIndex = generatedSource . IndexOf ( "Position = reader.ReadVector2();" ) ;
30+ int idWriteIndex = source . IndexOf ( "writer.Write(Id);" ) ;
31+ int positionWriteIndex = source . IndexOf ( "writer.Write(Position);" ) ;
32+ int idReadIndex = source . IndexOf ( "Id = reader.ReadUInt();" ) ;
33+ int positionReadIndex = source . IndexOf ( "Position = reader.ReadVector2();" ) ;
3234
3335 // Check if write read methods exist
3436 using ( Assert . EnterMultipleScope ( ) )
@@ -50,8 +52,8 @@ public partial class CPacketPlayerPosition : ClientPacket
5052 // Check that [NetExclude] property is actually excluded
5153 using ( Assert . EnterMultipleScope ( ) )
5254 {
53- Assert . That ( generatedSource , Does . Not . Contain ( "writer.Write(PrevPosition);" ) , "[NetExclude] PrevPosition write method exists" ) ;
54- Assert . That ( generatedSource , Does . Not . Contain ( "PrevPosition = reader.ReadVector2();" ) , "[NetExclude] PrevPosition read method exists" ) ;
55+ Assert . That ( source , Does . Not . Contain ( "writer.Write(PrevPosition);" ) , "[NetExclude] PrevPosition write method exists" ) ;
56+ Assert . That ( source , Does . Not . Contain ( "PrevPosition = reader.ReadVector2();" ) , "[NetExclude] PrevPosition read method exists" ) ;
5557 }
5658 }
5759}
0 commit comments