Merged feature-xml into dev and resolved main.cpp conflict

This commit is contained in:
2026-04-21 11:10:20 +03:00
7 changed files with 15268 additions and 6 deletions

View File

@@ -1,15 +1,22 @@
#include <iostream>
#include <exception>
#include "JsonService.h"
#include "XmlService.h"
#include "Weather.h"
int main() {
try {
std::cout << "Testing JsonService" << std::endl;
JsonService js;
Weather w = js.getWeather("endpoints/weather.json");
Weather w1 = js.getWeather("endpoints/weather.json");
std::cout << "Weather object created (JSON)" << std::endl;
w1.printWeather();
std::cout << "Weather object created" << std::endl;
w.printWeather();
std::cout << "\nTesting XmlService" << std::endl;
XmlService xs;
Weather w2 = xs.getWeather("endpoints/weather.xml");
std::cout << "Weather object created (XML)" << std::endl;
w2.printWeather();
}
catch (const std::exception& e) {
std::cerr << "Error: " << e.what() << std::endl;