//------------------------------------------------------------------------------
// Lamp : Open source game middleware
// Copyright (C) 2004  Junpei Ohtani ( Email : junpee@users.sourceforge.jp )
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//------------------------------------------------------------------------------

/** @file
 * 変換ピクチャマネージャのテスト実装
 * @author Junpee
 */

#include "System/stdafx.h"
#include "Translator/Picture/TranslationPictureManagerTest.h"
#include "Translator/Texture/TranslationTextureManager.h"
#include "Translator/Picture/TranslationPictureManager.h"

namespace LampForMaya{

//------------------------------------------------------------------------------
// テストスィートの取得
Test* TranslationPictureManagerTest::suite(){
	TestSuite* suite = new TestSuite("TranslationPictureManagerTest");
	suite->addTest(new TestCaller(
		TranslationPictureManagerTest, testCollectPicture));
	return suite;
}
//------------------------------------------------------------------------------
// ピクチャの収集テスト
void TranslationPictureManagerTest::testCollectPicture(){
/*
	MGlobal::executeCommand(
		"file -f -o \"TranslationPictureManagerTestCollectPicture.mb\"",
		true, true);
	TranslationTextureManager* textureManager_ =
		new TranslationTextureManager();
	textureManager_->collectTextures();
	TranslationPictureManager* pictureManager_ =
		new TranslationPictureManager();
	pictureManager_->collectPictures(textureManager_);
	TestEquals(2, pictureManager_->getCount());
	// 一枚目ピクチャ
	TranslationPicture* picture0 = pictureManager_->get(0);
	TestEquals("brick1", picture0->getName());
	TestEquals(
		"D:/!Cur/Lamp/LampForMaya/Projects/MayaProject/textures/brick1.tga",
		picture0->getPath());
	// 二枚目ピクチャ
	TranslationPicture* picture1 = pictureManager_->get(1);
	TestEquals("brick2", picture1->getName());
	TestEquals(
		"D:/!Cur/Lamp/LampForMaya/Projects/MayaProject/textures/brick2.tga",
		picture1->getPath());
	// 後始末
	pictureManager_->clear();
	delete pictureManager_;
	textureManager_->clear();
	delete textureManager_;
*/
}
//------------------------------------------------------------------------------
} // End of namespace LampForMaya
//------------------------------------------------------------------------------
