Created
June 11, 2015 13:04
-
-
Save dampee/e453a88a6d5a874119c9 to your computer and use it in GitHub Desktop.
Sort Order check after Content Delete unit test (U4-6642)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void Delete_SortOrder_Is_Correct() | |
{ | |
// Arrange | |
var contentService = ServiceContext.ContentService; | |
var root = contentService.GetById(NodeDto.NodeIdSeed + 4); | |
var contentType = ServiceContext.ContentTypeService.GetContentType("umbTextpage"); | |
var contentList = CreateChildrenOf(contentType, root, 3); | |
contentService.Save(contentList); | |
var contentToDelete = contentList.ElementAt(1); | |
// Act | |
contentService.Delete(contentToDelete, 0); | |
// Assert | |
Assert.That(contentService.GetById(contentList.ElementAt(0).Id).SortOrder, Is.EqualTo(0)); | |
Assert.That(contentService.GetById(contentList.ElementAt(2).Id).SortOrder, Is.EqualTo(1)); // FAILS, result is 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment