MobilityData / gtfs-realtime-bindings

Language bindings generated from the GTFS Realtime protocol buffer spec for popular languages.
Apache License 2.0
370 stars 127 forks source link

Create unit tests for .NET (dotnet) bindings #41

Closed barbeau closed 5 years ago

barbeau commented 5 years ago

Right now we do not have unit tests for the dotnet bindings: https://github.com/google/gtfs-realtime-bindings/tree/master/dotnet

This can potentially cause issues when we update the bindings if there have been changes in the toolchain - process for updating the bindings is described here: https://github.com/google/gtfs-realtime-bindings/blob/master/dotnet/UPDATING.md

For comparison, we currently have unit tests for the Java bindings, and the code can be seen here: https://github.com/google/gtfs-realtime-bindings/blob/master/java/src/test/java/com/google/transit/realtime/GtfsRealtimeTest.java

...which test the consumption of a sample bundled protobuf file included in this directory: https://github.com/google/gtfs-realtime-bindings/tree/master/java/src/test/resources/com/google/transit/realtime

These tests are run as part of the process for updating the Java bindings, as described here: https://github.com/google/gtfs-realtime-bindings/blob/master/java/UPDATING.md

We should implement similar unit tests in the .NET bindings so we can be confident we aren't breaking anything when we update the bindings.

Sample .NET code for consuming a protobuf file can be seen in the .NET README: https://github.com/google/gtfs-realtime-bindings/blob/master/dotnet/README.md#example-code

barbeau commented 5 years ago

We should add tests for VehiclePositions, TripUpdates, and Alerts protobuf files:

barbeau commented 5 years ago

.NET test for VP was added here - https://github.com/MobilityData/gtfs-realtime-bindings/pull/43.

I'm going to open a new issue for adding TU and Alert tests for all languages. EDIT New issue is at https://github.com/MobilityData/gtfs-realtime-bindings/issues/49.