Added ArchiveAutoService test

This commit is contained in:
MF
2020-06-08 20:33:47 +01:00
parent 1e720fe3af
commit b40a9b91d4
2 changed files with 28 additions and 9 deletions
+2 -9
View File
@@ -1,22 +1,15 @@
#ifndef ARCHIVEAUTOSERVICE_H
#define ARCHIVEAUTOSERVICE_H
#include <bsapacker/IModDto.h>
#include "bsapacker_global.h"
#include <bsapacker/IArchiveAutoService.h>
#include <qlibbsarch/BSArchiveAuto.h>
namespace BsaPacker
{
class ArchiveAutoService : public IArchiveAutoService
class BSAPACKER_EXPORT ArchiveAutoService : public IArchiveAutoService
{
public:
ArchiveAutoService() = default;
~ArchiveAutoService() override = default;
ArchiveAutoService(const ArchiveAutoService&) = delete;
ArchiveAutoService& operator=(const ArchiveAutoService&) = delete;
ArchiveAutoService(ArchiveAutoService&&) = default;
ArchiveAutoService& operator=(ArchiveAutoService&&) = default;
void CreateBSA(BSArchiveAuto* archive, const QString& archiveName, bsa_archive_type_e type) const override;
};
} // namespace BsaPacker
+26
View File
@@ -0,0 +1,26 @@
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include <bsapacker/ArchiveAutoService.h>
using namespace BsaPacker;
namespace BsaPackerTests
{
class ArchiveAutoServiceFacts : public ::testing::Test
{
protected:
void SetUp() override {
}
void TearDown() override {
}
};
TEST_F(ArchiveAutoServiceFacts, Ctor_Always_Constructs)
{
EXPECT_NO_THROW(
auto result = ArchiveAutoService();
);
}
}