summaryrefslogtreecommitdiff
path: root/src/DllPlugInTester/CommandLineParserTest.h
blob: ce2693cb23998eb6fe52b37a9d2a5232661a2e8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef COMMANDLINEPARSERTEST_H
#define COMMANDLINEPARSERTEST_H

#include <cppunit/extensions/HelperMacros.h>


class CommandLineParser;
class CommandLineParserException;


class CommandLineParserTest : public CPPUNIT_NS::TestCase
{
  CPPUNIT_TEST_SUITE( CommandLineParserTest );
  CPPUNIT_TEST( testEmptyCommandLine );
  CPPUNIT_TEST( testFlagCompiler );
  CPPUNIT_TEST( testLongFlagBriefProgress );
  CPPUNIT_TEST( testFileName );
  CPPUNIT_TEST( testTestPath );
  CPPUNIT_TEST( testParameterWithSpace );
  CPPUNIT_TEST_EXCEPTION( testMissingStyleSheetParameterThrow, CommandLineParserException);
  CPPUNIT_TEST_EXCEPTION( testMissingEncodingParameterThrow, CommandLineParserException);
  CPPUNIT_TEST( testXmlFileNameIsOptional );
  CPPUNIT_TEST( testPlugInsWithParameters );
  CPPUNIT_TEST_SUITE_END();

public:
  CommandLineParserTest();
  virtual ~CommandLineParserTest();

  void setUp();
  void tearDown();

  void testEmptyCommandLine();
  void testFlagCompiler();
  void testLongFlagBriefProgress();
  void testFileName();
  void testTestPath();
  void testParameterWithSpace();
  void testMissingStyleSheetParameterThrow();
  void testMissingEncodingParameterThrow();
  void testXmlFileNameIsOptional();
  void testPlugInsWithParameters();

private:
  CommandLineParserTest( const CommandLineParserTest &other );
  void operator =( const CommandLineParserTest &other );

  void parse( const char **lines );

private:
  CommandLineParser *_parser;
};



// Inlines methods for CommandLineParserTest:
// ------------------------------------------



#endif  // COMMANDLINEPARSERTEST_H