fixing Stylesheet tests to fit with new line breaks and tabs added.

This commit is contained in:
Claus
2018-11-06 15:10:01 +01:00
parent 872932145f
commit cfa3f58c33
3 changed files with 5 additions and 16 deletions

View File

@@ -4,7 +4,6 @@ using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Runtime.Serialization;
using Umbraco.Core.IO;
using Umbraco.Core.Strings.Css;
namespace Umbraco.Core.Models

View File

@@ -1,5 +1,4 @@
using System;
using System.Diagnostics;
using System.Diagnostics;
using System.Linq;
using NUnit.Framework;
using Umbraco.Core.Models;
@@ -41,7 +40,7 @@ namespace Umbraco.Tests.Models
Assert.AreEqual(1, stylesheet.Properties.Count());
Assert.AreEqual("Test", stylesheet.Properties.Single().Name);
Assert.AreEqual("p", stylesheet.Properties.Single().Alias);
Assert.AreEqual("font-weight:bold; font-family:Arial;", stylesheet.Properties.Single().Value);
Assert.AreEqual("font-weight:bold;\r\nfont-family:Arial;", stylesheet.Properties.Single().Value);
}
[Test]
@@ -76,7 +75,7 @@ namespace Umbraco.Tests.Models
prop = stylesheet.Properties.Single();
Assert.AreEqual("li", prop.Alias);
Assert.AreEqual("font-size:5em;", prop.Value);
Assert.AreEqual("body { color:#000; } /**umb_name:Hello*/\r\nli{font-size:5em;} .bold {font-weight:bold;}", stylesheet.Content);
Assert.AreEqual("body { color:#000; } /**umb_name:Hello*/\r\nli {\r\n\tfont-size:5em;\r\n} .bold {font-weight:bold;}", stylesheet.Content);
}
[Test]

View File

@@ -1,17 +1,11 @@
using System;
using System.Data;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using Moq;
using NUnit.Framework;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.Repositories;
using Umbraco.Core.Persistence.Repositories.Implement;
using Umbraco.Core.Scoping;
using Umbraco.Tests.TestHelpers;
using Umbraco.Tests.Testing;
@@ -118,10 +112,7 @@ namespace Umbraco.Tests.Persistence.Repositories
stylesheet = repository.Get(stylesheet.Name);
//Assert
Assert.That(stylesheet.Content, Is.EqualTo(@"body { color:#000; } .bold {font-weight:bold;}
/**umb_name:Test*/
p{font-size:2em;}"));
Assert.That(stylesheet.Content, Is.EqualTo("body { color:#000; } .bold {font-weight:bold;}\r\n\r\n/**umb_name:Test*/\r\np {\r\n\tfont-size:2em;\r\n}"));
Assert.AreEqual(1, stylesheet.Properties.Count());
}
}