DocumentData: fix
This commit is contained in:
parent
210e740e99
commit
f20e66fa52
@ -28,7 +28,7 @@ namespace ASC.Files.Tests
|
||||
|
||||
[TestCaseSource(typeof(DocumentData), nameof(DocumentData.GetFolderItems))]
|
||||
[Category("section 'My Documents'")]
|
||||
public void GetFolderReturnsFolderContentWrapperTest(int folderId, bool withSubFolders)
|
||||
public void GetFolderReturnsFolderContentWrapperTest(int folderId, bool withSubFolders,int filesCountExpected,int foldersCountExpected)
|
||||
{
|
||||
var folderContentWrapper = FilesControllerHelper.GetFolder(
|
||||
folderId,
|
||||
@ -39,8 +39,8 @@ namespace ASC.Files.Tests
|
||||
var filesCount = folderContentWrapper.Files.Count;
|
||||
var foldersCount = folderContentWrapper.Folders.Count;
|
||||
Assert.IsNotNull(folderContentWrapper);
|
||||
Assert.AreEqual(0, filesCount);
|
||||
Assert.AreEqual(0, foldersCount);
|
||||
Assert.AreEqual(filesCountExpected, filesCount);
|
||||
Assert.AreEqual(foldersCountExpected, foldersCount);
|
||||
}
|
||||
|
||||
[TestCaseSource(typeof(DocumentData), nameof(DocumentData.GetFolderInfoItems))]
|
||||
@ -90,7 +90,7 @@ namespace ASC.Files.Tests
|
||||
[Category("section 'My Documents'")]
|
||||
public void CreateFileReturnsFileWrapperTest(string fileTitle)
|
||||
{
|
||||
var fileWrapper = FilesControllerHelper.CreateFile(GlobalFolderHelper.FolderMy, fileTitle);
|
||||
var fileWrapper = FilesControllerHelper.CreateFile(54, fileTitle);
|
||||
|
||||
Assert.IsNotNull(fileWrapper);
|
||||
Assert.AreEqual(fileTitle, fileWrapper.Title);
|
||||
|
@ -14,7 +14,7 @@ namespace ASC.Files.Tests
|
||||
|
||||
public static IEnumerable<TestCaseData> GetFolderItems()
|
||||
{
|
||||
yield return new TestCaseData(14, true);
|
||||
yield return new TestCaseData(14, true, 0, 0);
|
||||
}
|
||||
|
||||
public static IEnumerable<TestCaseData> GetFolderInfoItems()
|
||||
@ -34,8 +34,8 @@ namespace ASC.Files.Tests
|
||||
|
||||
public static IEnumerable<TestCaseData> GetCreateFileItems()
|
||||
{
|
||||
yield return new TestCaseData("FileOne");
|
||||
yield return new TestCaseData("FileTwo");
|
||||
yield return new TestCaseData("FileOne.docx");
|
||||
yield return new TestCaseData("FileTwo.docx");
|
||||
}
|
||||
|
||||
public static IEnumerable<TestCaseData> GetFileInfoItems()
|
||||
|
Loading…
Reference in New Issue
Block a user