Fix tests after merge

This commit is contained in:
Stephan
2013-10-11 12:05:52 +02:00
parent 7718adfca1
commit 52640a94ee
2 changed files with 13 additions and 18 deletions

View File

@@ -544,6 +544,11 @@ namespace Umbraco.Tests.PublishedContent
{
var asDynamic = GetDynamicNode(1174);
// NOTE: that test breaks because of U4-3094 fix in DynamicPublishedContent
// previously, DynamicPublishedContent.GetProperty would honor the '_' and '@' syntax.
// now that it's just using the original proper IPublishedContent way, it does not anymore
// I *think* it makes sense. Then kill that test. Do we all agree? - Stephan
Assert.AreEqual("admin", asDynamic.GetPropertyValue("@creatorName"));
Assert.AreEqual("admin", asDynamic.GetPropertyValue("@CreatorName"));
}
@@ -598,7 +603,8 @@ namespace Umbraco.Tests.PublishedContent
Assert.IsNotNull(result);
Assert.AreEqual((int) 1046, (int) result.Id);
// ancestor-or-self has to be self!
Assert.AreEqual(1173, (int)result.Id);
}
[Test]

View File

@@ -317,24 +317,12 @@ namespace Umbraco.Tests.PublishedContent
{
var doc = GetNode(1046);
var currentLevel = 0;
var lastSortOrder = 0;
var levelChangesAt = new[] { 1046, 1173, 1174 };
var expected = new[] {1046, 1173, 1174, 1177, 1178, 1176, 1175, 4444, 1172};
var exindex = 0;
// must respect the XPath descendants-or-self axis!
foreach (var d in doc.DescendantsOrSelf())
{
if (levelChangesAt.Contains(d.Id))
{
Assert.Greater(d.Level, currentLevel);
currentLevel = d.Level;
}
else
{
Assert.AreEqual(currentLevel, d.Level);
Assert.Greater(d.SortOrder, lastSortOrder);
}
lastSortOrder = d.SortOrder;
}
Assert.AreEqual(expected[exindex++], d.Id);
}
[Test]
@@ -521,7 +509,8 @@ namespace Umbraco.Tests.PublishedContent
Assert.IsNotNull(result);
Assert.AreEqual((int)1046, (int)result.Id);
// ancestor-or-self has to be self!
Assert.AreEqual(1173, result.Id);
}
[Test]