diff --git a/CMakeLists.txt b/CMakeLists.txt index 89326ec..0a43511 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,4 +17,5 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) -add_subdirectory(src) \ No newline at end of file +add_subdirectory(src) +add_subdirectory(test) \ No newline at end of file diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..c52571c --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,8 @@ +enable_testing() + +find_package(Boost COMPONENTS unit_test_framework REQUIRED) + +set(TEST_SOURCES test_seller.cpp) + +add_executable(testsuite ${TEST_SOURCES}) +target_link_libraries(testsuite Boost::unit_test_framework) \ No newline at end of file diff --git a/test/test_seller.cpp b/test/test_seller.cpp new file mode 100644 index 0000000..34c0b6c --- /dev/null +++ b/test/test_seller.cpp @@ -0,0 +1,10 @@ +#include "../src/core/seller.h" + +#define BOOST_TEST_MODULE seller + +#include + +BOOST_AUTO_TEST_CASE( initial_test ) { + Seller seller{}; + BOOST_TEST(seller.getUuid().is_nil() == true); +}