Moves Assert4A/B methods to methods and renames some parameters ... need to figure out what the rest mean

This commit is contained in:
Shannon
2019-09-30 15:59:45 +02:00
parent f992da41f7
commit af8c3459e3

View File

@@ -70,18 +70,6 @@ namespace Umbraco.Tests.Models
[Test]
public void ValidateVariationTests()
{
void Assert4A(ContentVariation v, string c, string s, bool xx)
{
Assert4B(v, c, s, xx, xx, xx, xx);
}
void Assert4B(ContentVariation v, string c, string s, bool ew, bool nn, bool en, bool nw)
{
Assert.AreEqual(ew, v.ValidateVariation(c, s, true, true, false));
Assert.AreEqual(nn, v.ValidateVariation(c, s, false, false, false));
Assert.AreEqual(en, v.ValidateVariation(c, s, true, false, false));
Assert.AreEqual(nw, v.ValidateVariation(c, s, false, true, false));
}
// All tests:
// 1. if exact is set to true: culture cannot be null when the ContentVariation.Culture flag is set
@@ -174,6 +162,19 @@ namespace Umbraco.Tests.Models
#endregion
}
private static void Assert4B(ContentVariation v, string culture, string segment, bool ew, bool nn, bool en, bool nw)
{
Assert.AreEqual(ew, v.ValidateVariation(culture, segment, true, true, false));
Assert.AreEqual(nn, v.ValidateVariation(culture, segment, false, false, false));
Assert.AreEqual(en, v.ValidateVariation(culture, segment, true, false, false));
Assert.AreEqual(nw, v.ValidateVariation(culture, segment, false, true, false));
}
private static void Assert4A(ContentVariation v, string culture, string segment, bool xx)
{
Assert4B(v, culture, segment, xx, xx, xx, xx);
}
[Test]
public void PropertyTests()
{