cs-codex-dist-tests/Tests/BasicTests/OneClientTests.cs

43 lines
933 B
C#
Raw Normal View History

2023-09-12 13:43:30 +00:00
using CodexPlugin;
using DistTestCore;
using NUnit.Framework;
using Utils;
namespace Tests.BasicTests
{
[TestFixture]
public class OneClientTests : DistTest
{
[Test]
public void OneClientTest()
{
var primary = this.SetupCodexNode();
PerformOneClientTest(primary);
}
[Test]
public void RestartTest()
{
var primary = this.SetupCodexNode();
//var setup = primary.BringOffline();
//primary = BringOnline(setup)[0];
PerformOneClientTest(primary);
}
private void PerformOneClientTest(IOnlineCodexNode primary)
{
var testFile = GenerateTestFile(1.MB());
var contentId = primary.UploadFile(testFile);
var downloadedFile = primary.DownloadContent(contentId);
testFile.AssertIsEqual(downloadedFile);
}
}
}