using Schaad.OpenData.Traffic.Models; using Schaad.OpenData.Traffic.Source; namespace Schaad.OpenData.Tests; internal static class TestData { public static readonly GeoPoint Origin = new(47.5, 9.0); public static GeoPoint Meters(double east, double north) => new( Origin.Lat + north / 111_320, Origin.Lon + east / (111_320 * Math.Cos(Origin.Lat * Math.PI / 180))); public static VehicleCounts Cars(int cars, int trucks = 0) => new(0, 0, cars, 0, 0, 0, 0, trucks, 0, 0); public static HourlyCount Count(int station, string direction, DateOnly date, int hour, int cars, int trucks = 0) => new(station, direction, date, hour, Cars(cars, trucks)); public static Station Station(int code, params string[] directions) => new(code, $"Station {code}", "Gemeinde", "Strasse", "H1", Origin, directions); public static ThurgauTrafficRecord Record( int code = 49, string direction = "nach Diessenhofen", string date = "2026-10-27", int hour = 13, int? cars = 220, ThurgauCoordinates? coordinates = null) => new() { Code = code, Name = "WAGENHAUSEN Wagenhausen - Diessenhofen", Municipality = "Wagenhausen", Address = "Hauptstrasse", Road = "H13", Direction = direction, Date = date, Hour = hour, Bus = 1, Motorcycle = 12, Car = cars, Truck = 6, SemiTrailerTruck = 5, Coordinates = coordinates ?? new ThurgauCoordinates { Lat = 47.66, Lon = 8.84 }, }; }