KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_http_lib_connection.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <chrono>
#include <thread>
#include <http_lib/http_lib_connection.h>
#include <http_lib/http_lib_settings.h>
#include "http_lib_fake_server.h"

Go to the source code of this file.

Functions

static HTTP_LIB_SOURCE makeTestSource ()
 
static HTTP_LIB_CONNECTION connectToStandardLibrary (HTTP_LIB_FAKE_SERVER &aServer)
 
 BOOST_AUTO_TEST_CASE (ValidEndpointSyncsCategories)
 
 BOOST_AUTO_TEST_CASE (EmptyResponseIsInvalid)
 
 BOOST_AUTO_TEST_CASE (Non200ResponseIsInvalid)
 
 BOOST_AUTO_TEST_CASE (MalformedJsonIsInvalid)
 
 BOOST_AUTO_TEST_CASE (TransportFailureIsInvalid)
 
 BOOST_AUTO_TEST_CASE (SelectAllPopulatesPartsAndCache)
 
 BOOST_AUTO_TEST_CASE (SelectOneFetchesAndCaches)
 
 BOOST_AUTO_TEST_CASE (SelectOneRefetchesWhenCacheExpired)
 
 BOOST_AUTO_TEST_CASE (SelectOneReports404)
 
 BOOST_AUTO_TEST_CASE (SelectAllRejectsNonJsonBody)
 
 BOOST_AUTO_TEST_CASE (SelectOneFetchCacheLifetime)
 

Variables

static const std::string RootUrl = "http://fake.test/v1/"
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/11]

◆ BOOST_AUTO_TEST_CASE() [2/11]

◆ BOOST_AUTO_TEST_CASE() [3/11]

◆ BOOST_AUTO_TEST_CASE() [4/11]

◆ BOOST_AUTO_TEST_CASE() [5/11]

◆ BOOST_AUTO_TEST_CASE() [6/11]

◆ BOOST_AUTO_TEST_CASE() [7/11]

◆ BOOST_AUTO_TEST_CASE() [8/11]

◆ BOOST_AUTO_TEST_CASE() [9/11]

◆ BOOST_AUTO_TEST_CASE() [10/11]

BOOST_AUTO_TEST_CASE ( TransportFailureIsInvalid )

Definition at line 104 of file test_http_lib_connection.cpp.

References BOOST_CHECK_EQUAL(), and makeTestSource().

◆ BOOST_AUTO_TEST_CASE() [11/11]

◆ connectToStandardLibrary()

◆ makeTestSource()

Variable Documentation

◆ RootUrl