public void JsonData_ShouldDeserializeWithCorrectCity(Provider source, string expectedValue)
        {
            // Arrange
            var json = TestData.GetJson(source);

            // Act
            var result = GeolocationSerializer.Deserialize(source, json);

            // Assert
            Assert.AreEqual(expectedValue, result?.City);
        }
        public void JsonData_WhenInvalidJson_ShouldThrownJsonException()
        {
            // Arrange
            var json = TestData.GetJson("Invalid");

            // Act
            Action action = () =>
            {
                var result = GeolocationSerializer.Deserialize(Provider.AbstractApi, json);
            };

            // Assert
            Assert.ThrowsException <JsonException>(action);
        }
        public void JsonData_ShouldDeserializeWithData(Provider source)
        {
            // Arrange
            var json = TestData.GetJson(source);

            // Act
            var result = GeolocationSerializer.Deserialize(source, json);

            // Assert
            Assert.IsNotNull(result);
            Assert.IsNotNull(result.City);
            Assert.IsNotNull(result.RegionCode);
            Assert.IsNotNull(result.RegionName);
            Assert.IsNotNull(result.CountryCode);
            Assert.IsNotNull(result.CountryName);
            Assert.IsNotNull(result.Latitude);
            Assert.IsNotNull(result.Longitude);
        }