<commit_before>#include <vector>
#include <algorithm>
#include <cppunit/extensions/HelperMacros.h>
#include <musicbrainz3/filters.h>
#include <musicbrainz3/webservice.h>
#include <musicbrainz3/query.h>

using namespace std;
using namespace MusicBrainz;

#ifdef BUILD_WS_TESTS

class WebServiceTest : public CppUnit::TestFixture
{
	CPPUNIT_TEST_SUITE(WebServiceTest);
	CPPUNIT_TEST(testGetArtistById);
	CPPUNIT_TEST(testGetUserByName);
	CPPUNIT_TEST(testAuthenticationError);
	CPPUNIT_TEST(testResourceNotFoundError);
	CPPUNIT_TEST(testConnectionError);
	CPPUNIT_TEST_SUITE_END();
	
protected:

	void testGetArtistById()
	{
		WebService::init();
		WebService ws("test.musicbrainz.org");
		Query q(&ws, "test-1");
		Artist *a = q.getArtistById("72c536dc-7137-4477-a521-567eeb840fa8");
		CPPUNIT_ASSERT(a != NULL);
		CPPUNIT_ASSERT_EQUAL(string("<NAME>"), a->getName());
	}
		
	void testGetUserByName()
	{
		WebService::init();
		WebService ws("test.musicbrainz.org", 80, "/ws", "libmb_test", "libmb_test");
		Query q(&ws, "test-1");
		User *a = q.getUserByName("libmb_test");
		CPPUNIT_ASSERT(a != NULL);<commit_msg>Forgot to define one of the tests as CPPUNIT_TEST.<commit_after>#include <vector>
#include <algorithm>
#include <cppunit/extensions/HelperMacros.h>
#include <musicbrainz3/filters.h>
#include <musicbrainz3/webservice.h>
#include <musicbrainz3/query.h>

using namespace std;
using namespace MusicBrainz;

#ifdef BUILD_WS_TESTS

class WebServiceTest : public CppUnit::TestFixture
{
	CPPUNIT_TEST_SUITE(WebServiceTest);
	CPPUNIT_TEST(testGetArtistById);
	CPPUNIT_TEST(testGetUserByName);
	CPPUNIT_TEST(testAuthenticationError);
	CPPUNIT_TEST(testResourceNotFoundError);
	CPPUNIT_TEST(testRequestError);
	CPPUNIT_TEST(testConnectionError);
	CPPUNIT_TEST_SUITE_END();
	
protected:

	void testGetArtistById()
	{
		WebService::init();
		WebService ws("test.musicbrainz.org");
		Query q(&ws, "test-1");
		Artist *a = q.getArtistById("72c536dc-7137-4477-a521-567eeb840fa8");
		CPPUNIT_ASSERT(a != NULL);
		CPPUNIT_ASSERT_EQUAL(string("<NAME>"), a->getName());
	}
		
	void testGetUserByName()
	{
		WebService::init();
		WebService ws("test.musicbrainz.org", 80, "/ws", "libmb_test", "libmb_test");
		Query q(&ws, "test-1");
		User *a = q.getUserByName("libmb_test");
		CPPUNIT_ASSERT(a != NULL);
{'fraction_non_alphanumeric': 0.14186248912097477, 'fraction_numerical': 0.02610966057441253, 'mean_word_length': 6.982638888888889, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4246150', 'n_tokens_mistral': 924, 'n_tokens_neox': 844, 'n_words': 136}