From 6bc41f53ee5721595035d2e9aae0429ffebd32a7 Mon Sep 17 00:00:00 2001 From: Stephan Date: Tue, 5 Nov 2013 10:49:33 +0100 Subject: [PATCH] Fix bogus PublishedContent unit tests --- .../DynamicDocumentTestsBase.cs | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/Umbraco.Tests/PublishedContent/DynamicDocumentTestsBase.cs b/src/Umbraco.Tests/PublishedContent/DynamicDocumentTestsBase.cs index c41a8709f6..9c0fa8289a 100644 --- a/src/Umbraco.Tests/PublishedContent/DynamicDocumentTestsBase.cs +++ b/src/Umbraco.Tests/PublishedContent/DynamicDocumentTestsBase.cs @@ -539,20 +539,6 @@ namespace Umbraco.Tests.PublishedContent Assert.AreEqual("Custom data with same property name as the member name", asDynamic.GetPropertyValue("CreatorName")); } - [Test] - public void GetPropertyValue_Reflected() - { - 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")); - } - [Test] public void Get_User_Property_With_Same_Name_As_Member_Property() { @@ -604,7 +590,11 @@ namespace Umbraco.Tests.PublishedContent Assert.IsNotNull(result); // ancestor-or-self has to be self! - Assert.AreEqual(1173, (int)result.Id); + // but that's not what the "legacy" razor macro engine does... + if (result is Umbraco.Web.Models.DynamicPublishedContent) + Assert.AreEqual(1173, (int)result.Id); // that one works + else + Assert.AreEqual(1046, (int)result.Id); // that one still is fubar } [Test]