#include <cassert>
#include <iostream>

#include "url.h"


void test_basic() {
	URL url_0 = "http://example.org/";
	assert(url_0.get_url() == "http://example.org/");
	assert(url_0.scheme() == Scheme::http);
	assert(url_0.domain() == "example.org");
	assert(url_0.path() == "/");
}

void test_port() {
	URL url_0 = "http://example.org:8888/";
	assert(url_0.port() == 8888);
}

int main() {
	std::cout<<"Testing URL"<<"\n";

	test_basic();
	test_port();

	return 0;
}