40 lines
758 B
C++
40 lines
758 B
C++
#include "stdafx.h"
|
|
#include "CppUnitTest.h"
|
|
#include "SiaApi.h"
|
|
#include "UploadManager.h"
|
|
#include "MockSiad.h"
|
|
#include "SiaDriveConfig.h"
|
|
|
|
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
|
using namespace Sia::Api;
|
|
|
|
namespace UnitTests
|
|
{
|
|
TEST_CLASS(UnitTests)
|
|
{
|
|
private:
|
|
const SiaHostConfig hostConfig = { L"localhost", 19980, L"1.1.0" };
|
|
std::unique_ptr<CMockSiad> siad;
|
|
|
|
public:
|
|
TEST_METHOD_INITIALIZE(Initialize)
|
|
{
|
|
siad.reset(new CMockSiad(hostConfig));
|
|
}
|
|
|
|
TEST_METHOD_CLEANUP(Cleanup)
|
|
{
|
|
siad->Stop();
|
|
}
|
|
|
|
TEST_METHOD(TestMethod1)
|
|
{
|
|
siad->Start(SiadTestType::UploadFile);
|
|
|
|
CSiaDriveConfig driveConfig;
|
|
CSiaCurl siaCurl(hostConfig);
|
|
|
|
CUploadManager uploadManager(siaCurl, &driveConfig);
|
|
}
|
|
};
|
|
} |