-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDocNegativeImportTests.cs
More file actions
38 lines (32 loc) · 1.29 KB
/
DocNegativeImportTests.cs
File metadata and controls
38 lines (32 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// ----------------------------------------------------------------------------
// <copyright file="DocNegativeImportTests.cs" company="Relativity ODA LLC">
// © Relativity All Rights Reserved.
// </copyright>
// ----------------------------------------------------------------------------
using NUnit.Framework;
using Relativity.Server.Import.SDK.Samples.Helpers;
namespace Relativity.Server.Import.SDK.Samples.Tests
{
/// <summary>
/// Represents tests that fails to import documents and validates the results.
/// </summary>
[TestFixture]
public class DocNegativeImportTests : DocImportTestsBase
{
[Test]
public void ShouldNotImportWhenTheFolderExceedsTheMaxLength()
{
// Arrange
string controlNumber = GenerateControlNumber();
string folder = "\\" + new string('x', FunctionalTestParameters.MaxFolderLength + 1);
kCura.Relativity.DataReaderClient.ImportBulkArtifactJob job =
this.ArrangeImportJob(controlNumber, folder, SampleDocPdfFileName);
// Act
job.Execute();
// Assert - the job failed with a single non-fatal exception.
this.AssertImportFailed(1);
// Assert - exceeding the max folder length yields a doc-level error.
this.AssertError(0, 1, controlNumber, FunctionalTestParameters.MaxFolderLength.ToString());
}
}
}