2
0
mirror of synced 2025-01-10 08:36:13 +00:00
2024-04-25 10:25:12 +02:00

42 lines
881 B
C#

using CodexPlugin;
using NUnit.Framework;
using Utils;
namespace CodexTests.BasicTests
{
[TestFixture]
public class OneClientTests : CodexDistTest
{
[Test]
public void OneClientTest()
{
var primary = AddCodex();
PerformOneClientTest(primary);
}
[Test]
public void RestartTest()
{
var primary = AddCodex();
primary.Stop(waitTillStopped: true);
primary = AddCodex();
PerformOneClientTest(primary);
}
private void PerformOneClientTest(ICodexNode primary)
{
var testFile = GenerateTestFile(1.MB());
var contentId = primary.UploadFile(testFile);
var downloadedFile = primary.DownloadContent(contentId);
testFile.AssertIsEqual(downloadedFile);
}
}
}