1
0
This repository has been archived on 2025-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
Files
siadrive/UnitTests/SiaWalletApiTests.cpp
Scott E. Graves 316d20c495 More unit tests
2017-02-03 15:35:15 -06:00

31 lines
669 B
C++

#include "stdafx.h"
#include "CppUnitTest.h"
#include <SiaApi.h>
#include "UnitTestConfig.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace UnitTests
{
TEST_CLASS(SiaWalletApi)
{
private:
CSiaApi _api = CSiaApi({ TEST_SERVER_AND_PORT, TEST_SERVER_VERSION });
public:
TEST_METHOD(GetWallet)
{
CSiaWalletPtr wallet = _api.GetWallet();
Assert::IsNotNull(wallet.get());
Assert::IsFalse(wallet->GetCreated());
Assert::IsFalse(wallet->GetLocked());
}
TEST_METHOD(CreateWallet)
{
CSiaWalletPtr wallet = _api.GetWallet();
String seed;
Assert::IsTrue(API_SUCCESS(SiaApiError, wallet->Create(seed)));
}
};
}