Пример #1
0
            public void CallGetAllStateVectors()
            {
                //ARRANGE
                var client  = new OpenSkyClient(_httpClientFixture.HttpClient);
                var builder = new AllStateVectorsRequestBuilder();
                //ACT
                var response = client.GetAllStateVectors(builder.WithBoundingBox(45.8389m, 5.9962m, 47.8229m, 10.5226m).Build());

                //ASSERT
                Assert.True(response.StateVectors.Count > 0);
            }
Пример #2
0
            public void CallGetTrackByAircraft()
            {
                //ARRANGE
                var client = new OpenSkyClient(_httpClientFixture.HttpClient);
                var trackByAircraftRequestBuilder = new TrackByAircraftRequestBuilder();
                var allStateVectorRequestBuilder  = new AllStateVectorsRequestBuilder();
                //ACT
                var flyingAircraftIcao24 = client.GetAllStateVectors(allStateVectorRequestBuilder.WithBoundingBox(45m, 5m, 47m, 10m).Build()).StateVectors.Last().Icao24;
                var response             = client.GetTrackByAircraft(trackByAircraftRequestBuilder.WithIcao24(flyingAircraftIcao24).WithTime(0).Build());

                //ASSERT
                Assert.True(response.Path.Count > 0);
            }
Пример #3
0
            public void CallGetFlightsByAircraft()
            {
                //ARRANGE
                var client = new OpenSkyClient(_httpClientFixture.HttpClient);
                var allStateVectorRequestBuilder    = new AllStateVectorsRequestBuilder();
                var flightsByAircraftRequestBuilder = new FlightsByAircraftRequestBuilder();

                //ACT
                var flyingAircraftIcao24 = client.GetAllStateVectors(allStateVectorRequestBuilder.WithBoundingBox(45m, 5m, 47m, 10m).Build()).StateVectors.First().Icao24;
                var response             = client.GetFlightsByAircraft(flightsByAircraftRequestBuilder.WithIcao24(flyingAircraftIcao24).WithIntervalBegin(DateTime.UtcNow.AddHours(-480).ToUnixTimestamp()).WithIntervalEnd(DateTime.UtcNow.ToUnixTimestamp()).Build());

                //ASSERT
                Assert.True(response.Count > 0);
            }