/[svn]/linuxsampler/trunk/src/testcases/LSCPTest.h
ViewVC logotype

Annotation of /linuxsampler/trunk/src/testcases/LSCPTest.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 217 - (hide annotations) (download) (as text)
Sun Aug 15 18:52:23 2004 UTC (19 years, 9 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 1751 byte(s)
added test for "GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO" LSCP command

1 schoenebeck 211 #ifndef __LS_LSCPTEST_H__
2     #define __LS_LSCPTEST_H__
3    
4     #include <cppunit/TestFixture.h>
5     #include <cppunit/extensions/HelperMacros.h>
6    
7     #include <unistd.h>
8     #include <sys/socket.h>
9     #include <netinet/in.h>
10     #include <netinet/tcp.h>
11     #include <arpa/inet.h>
12     #include <netdb.h>
13    
14     #include <string>
15     #include <vector>
16    
17     #include "../Sampler.h"
18     #include "../network/lscpserver.h"
19    
20     using namespace std;
21    
22     class LSCPTest : public CppUnit::TestFixture {
23    
24     CPPUNIT_TEST_SUITE(LSCPTest);
25     CPPUNIT_TEST(printTestSuiteName);
26     CPPUNIT_TEST(testLaunchLSCPServer);
27     CPPUNIT_TEST(testConnectToLSCPServer);
28     CPPUNIT_TEST(test_ADD_CHANNEL);
29     CPPUNIT_TEST(test_GET_CHANNELS);
30     CPPUNIT_TEST(test_REMOVE_CHANNEL);
31 schoenebeck 217 CPPUNIT_TEST(test_GET_AUDIO_OUTPUT_CHANNEL_PARAMETER_INFO);
32 schoenebeck 211 CPPUNIT_TEST(testShutdownLSCPServer);
33     CPPUNIT_TEST_SUITE_END();
34    
35     private:
36     bool launchLSCPServer();
37     bool shutdownLSCPServer();
38    
39     bool connectToLSCPServer();
40     bool closeConnectionToLSCPServer();
41    
42     void sendCommandToLSCPServer(string cmd);
43     string receiveSingleLineAnswerFromLSCPServer();
44 schoenebeck 217 vector<string> receiveMultiLineAnswerFromLSCPServer(uint timeout_seconds = 0) throw (LinuxSamplerException);
45     string receiveAnswerFromLSCPServer(string delimiter, uint timeout_seconds = 0) throw (LinuxSamplerException);
46 schoenebeck 211 public:
47     void setUp();
48     void tearDown();
49    
50     void printTestSuiteName();
51    
52     void testLaunchLSCPServer();
53     void testConnectToLSCPServer();
54     void test_ADD_CHANNEL();
55     void test_GET_CHANNELS();
56     void test_REMOVE_CHANNEL();
57 schoenebeck 217 void test_GET_AUDIO_OUTPUT_CHANNEL_PARAMETER_INFO();
58 schoenebeck 211 void testShutdownLSCPServer();
59     };
60    
61     #endif // __LS_LSCPTEST_H__

  ViewVC Help
Powered by ViewVC