Make Tests Green Again
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
namespace Umbraco.Core.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a section defined in the app.config file
|
||||
/// Represents a section defined in the app.config file.
|
||||
/// </summary>
|
||||
public class Section
|
||||
{
|
||||
@@ -13,9 +13,7 @@
|
||||
}
|
||||
|
||||
public Section()
|
||||
{
|
||||
|
||||
}
|
||||
{ }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Alias { get; set; }
|
||||
|
||||
@@ -175,7 +175,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
|
||||
{
|
||||
var list = new List<string>
|
||||
{
|
||||
"DELETE FROM cmsTask WHERE nodeId = @id",
|
||||
"DELETE FROM umbracoUser2NodeNotify WHERE nodeId = @id",
|
||||
"DELETE FROM umbracoUserGroup2NodePermission WHERE nodeId = @id",
|
||||
"DELETE FROM umbracoRelation WHERE parentId = @id",
|
||||
|
||||
@@ -421,8 +421,6 @@ ORDER BY colName";
|
||||
{
|
||||
var list = new List<string>
|
||||
{
|
||||
"DELETE FROM cmsTask WHERE userId = @id",
|
||||
"DELETE FROM cmsTask WHERE parentUserId = @id",
|
||||
"DELETE FROM umbracoUser2UserGroup WHERE userId = @id",
|
||||
"DELETE FROM umbracoUser2NodeNotify WHERE userId = @id",
|
||||
"DELETE FROM umbracoUser WHERE id = @id",
|
||||
|
||||
@@ -258,7 +258,7 @@ AnotherContentFinder
|
||||
public void Resolves_Assigned_Mappers()
|
||||
{
|
||||
var foundTypes1 = _typeLoader.GetAssignedMapperTypes();
|
||||
Assert.AreEqual(30, foundTypes1.Count());
|
||||
Assert.AreEqual(29, foundTypes1.Count());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -279,7 +279,7 @@ AnotherContentFinder
|
||||
public void Resolves_Trees()
|
||||
{
|
||||
var trees = _typeLoader.GetTrees();
|
||||
Assert.AreEqual(3, trees.Count());
|
||||
Assert.AreEqual(1, trees.Count());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -62,17 +62,21 @@ namespace Umbraco.Tests.PublishedContent
|
||||
|
||||
internal override void PopulateCache(PublishedContentTypeFactory factory, SolidPublishedContentCache cache)
|
||||
{
|
||||
var prop1Type = factory.CreatePropertyType("prop1", 1);
|
||||
var welcomeType = factory.CreatePropertyType("welcomeText", 1);
|
||||
var welcome2Type = factory.CreatePropertyType("welcomeText2", 1);
|
||||
var props = new[]
|
||||
{
|
||||
factory.CreatePropertyType("prop1", 1),
|
||||
factory.CreatePropertyType("welcomeText", 1),
|
||||
factory.CreatePropertyType("welcomeText2", 1),
|
||||
prop1Type,
|
||||
welcomeType,
|
||||
welcome2Type,
|
||||
};
|
||||
var contentType1 = factory.CreateContentType(1, "ContentType1", Enumerable.Empty<string>(), props);
|
||||
|
||||
var prop1 = new SolidPublishedPropertyWithLanguageVariants
|
||||
{
|
||||
Alias = "welcomeText",
|
||||
PropertyType = welcomeType
|
||||
};
|
||||
prop1.SetSourceValue("en-US", "Welcome", true);
|
||||
prop1.SetValue("en-US", "Welcome", true);
|
||||
@@ -84,6 +88,7 @@ namespace Umbraco.Tests.PublishedContent
|
||||
var prop2 = new SolidPublishedPropertyWithLanguageVariants
|
||||
{
|
||||
Alias = "welcomeText2",
|
||||
PropertyType = welcome2Type
|
||||
};
|
||||
prop2.SetSourceValue("en-US", "Welcome", true);
|
||||
prop2.SetValue("en-US", "Welcome", true);
|
||||
@@ -91,6 +96,7 @@ namespace Umbraco.Tests.PublishedContent
|
||||
var prop3 = new SolidPublishedPropertyWithLanguageVariants
|
||||
{
|
||||
Alias = "welcomeText",
|
||||
PropertyType = welcomeType
|
||||
};
|
||||
prop3.SetSourceValue("en-US", "Welcome", true);
|
||||
prop3.SetValue("en-US", "Welcome", true);
|
||||
|
||||
@@ -11,8 +11,9 @@ namespace Umbraco.Web.Models.Mapping
|
||||
{
|
||||
CreateMap<Core.Models.Section, Section>()
|
||||
.ForMember(dest => dest.RoutePath, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.Icon, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.Name, opt => opt.MapFrom(src => textService.Localize("sections/" + src.Alias, (IDictionary<string, string>)null)))
|
||||
.ReverseMap(); //backwards too!
|
||||
.ReverseMap(); //backwards too!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user