secureswitools/swisistools/test/txmlparser/txmlparser.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 31 Mar 2010 21:44:47 +0300
branchRCL_3
changeset 13 0817e13c927e
parent 0 ba25891c3a9e
permissions -rw-r--r--
Revision: 201011 Kit: 201013

/*
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
* CTestXmlParser - Used to testing retrieval of data pertianing to creation and updation 
* of database.
*
*/


/**
 @file 
 @released
 @internalTechnology
*/

#ifndef TXMLPARSER_H
#define TXMLPARSER_H

#include <vector>
#include <string>
#include "logger.h"
#include "xmlparser.h"

class CTestXmlParser
	{
	public:
		CTestXmlParser();
		~CTestXmlParser();
		TestParser();
	
	private:
		bool TestValidDbFile();
		bool TestDbFileNotPresent();
		bool TestEmptyDbFile();
		bool TestInvalidDbFiles();
		
		bool TestInvalidRoot();
		bool TestEndTagMissing();
		bool AgainstDtdSpec();

		
		bool TestValidUpdateDb();
		bool TestUpdateFileNotPresent();
		bool TestXmlFileNotPresent();
		bool TestEmptyUpdateFile();
		bool TestInvalidUpdateDb();
		
		bool TestUpdateDbEndTagMissing();
		bool TestUpdateDbInvalidRoot();
		bool UpdateDbAgainstDtdSpec();

		void DisplayDetails(std::vector<std::string>& aDetails);
		void DisplayDetails(std::vector<CScrXmlParser::TScrEnvironmentDetails>& aEnvDetails);
		void PrintResult(const char* aMethodName, bool aResult);
	private:
		CScrXmlParser* iXmlParser;
		CLogger* iLogger;
		static std::string Passed;
		static std::string Failed;
	};



#endif // TXMLPARSER_H