diff options
author | Marcos Henrich <marcos.henrich@xamarin.com> | 2016-08-01 12:27:37 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2016-10-29 15:09:33 +0300 |
commit | 863dc73d1984175cb52734e1cb755c9d57de53bd (patch) | |
tree | 064bd05b59629fd58d317b6853334de013607b4e /mcs/class/System.Web.DynamicData | |
parent | 01c9543e084d1196a051c4a980b255b0f8b399d5 (diff) |
[bcl] Add NUnitHelper.cs with API not in nunit-lite
NUnitHelper.cs adds CollectionAssert, FileAssert, StringAssert.
Also adds AssertHelper class with methods that are not part of nunitlite
Assert class.
Diffstat (limited to 'mcs/class/System.Web.DynamicData')
-rw-r--r-- | mcs/class/System.Web.DynamicData/System.Web.DynamicData_test.dll.sources | 1 | ||||
-rw-r--r-- | mcs/class/System.Web.DynamicData/Test/System.Web.DynamicData/FieldTemplateFactoryTest.cs | 30 |
2 files changed, 16 insertions, 15 deletions
diff --git a/mcs/class/System.Web.DynamicData/System.Web.DynamicData_test.dll.sources b/mcs/class/System.Web.DynamicData/System.Web.DynamicData_test.dll.sources index f619c25efb8..f32bc204565 100644 --- a/mcs/class/System.Web.DynamicData/System.Web.DynamicData_test.dll.sources +++ b/mcs/class/System.Web.DynamicData/System.Web.DynamicData_test.dll.sources @@ -1,3 +1,4 @@ +../../test-helpers/NunitHelpers.cs ../../System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/crc32.cs ../../System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/Header.cs ../../System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/HtmlAttribute.cs diff --git a/mcs/class/System.Web.DynamicData/Test/System.Web.DynamicData/FieldTemplateFactoryTest.cs b/mcs/class/System.Web.DynamicData/Test/System.Web.DynamicData/FieldTemplateFactoryTest.cs index 4398b8bf4f5..76d1ccedb18 100644 --- a/mcs/class/System.Web.DynamicData/Test/System.Web.DynamicData/FieldTemplateFactoryTest.cs +++ b/mcs/class/System.Web.DynamicData/Test/System.Web.DynamicData/FieldTemplateFactoryTest.cs @@ -647,7 +647,7 @@ namespace MonoTests.System.Web.DynamicData // Custom with UIHint attribute mc = t.GetColumn ("CustomColumn2"); Assert.IsNotNull (mc.UIHint, "#A2"); - Assert.Greater (mc.UIHint.Length, 0, "#A2-1"); + AssertHelper.Greater (mc.UIHint.Length, 0, "#A2-1"); // Proves that UIHint on the column is not used, just the uiHint argument AssertExtensions.Throws<InvalidOperationException> (() => { @@ -669,7 +669,7 @@ namespace MonoTests.System.Web.DynamicData // Custom with UIHint attribute mc = t.GetColumn ("CustomColumn4"); Assert.IsNotNull (mc.UIHint, "#A4"); - Assert.Greater (mc.UIHint.Length, 0, "#A4-1"); + AssertHelper.Greater (mc.UIHint.Length, 0, "#A4-1"); // Proves that UIHint on the column is not used, just the uiHint argument Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#A4-2"); @@ -686,7 +686,7 @@ namespace MonoTests.System.Web.DynamicData mc = t.GetColumn ("DateTimeColumn2"); Assert.IsNotNull (mc.UIHint, "#B2"); - Assert.Greater (mc.UIHint.Length, 0, "#B2-1"); + AssertHelper.Greater (mc.UIHint.Length, 0, "#B2-1"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "DateTime.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#B2-3"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "DateTime.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#B2-4"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "DateTime.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#B2-5"); @@ -701,7 +701,7 @@ namespace MonoTests.System.Web.DynamicData mc = t.GetColumn ("DateColumn2"); Assert.IsNotNull (mc.UIHint, "#C2"); - Assert.Greater (mc.UIHint.Length, 0, "#C2-1"); + AssertHelper.Greater (mc.UIHint.Length, 0, "#C2-1"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#C2-3"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#C2-4"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#C2-5"); @@ -715,7 +715,7 @@ namespace MonoTests.System.Web.DynamicData mc = t.GetColumn ("DateColumn4"); Assert.IsNotNull (mc.UIHint, "#C4"); - Assert.Greater (mc.UIHint.Length, 0, "#C4-1"); + AssertHelper.Greater (mc.UIHint.Length, 0, "#C4-1"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#C4-3"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#C4-4"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#C4-5"); @@ -730,7 +730,7 @@ namespace MonoTests.System.Web.DynamicData mc = t.GetColumn ("TimeColumn2"); Assert.IsNotNull (mc.UIHint, "#D2"); - Assert.Greater (mc.UIHint.Length, 0, "#D2-1"); + AssertHelper.Greater (mc.UIHint.Length, 0, "#D2-1"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#D2-3"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#D2-4"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#D2-5"); @@ -745,7 +745,7 @@ namespace MonoTests.System.Web.DynamicData mc = t.GetColumn ("DurationColumn2"); Assert.IsNotNull (mc.UIHint, "#E2"); - Assert.Greater (mc.UIHint.Length, 0, "#E2-1"); + AssertHelper.Greater (mc.UIHint.Length, 0, "#E2-1"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#E2-3"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#E2-4"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#E2-5"); @@ -760,7 +760,7 @@ namespace MonoTests.System.Web.DynamicData mc = t.GetColumn ("PhoneNumberColumn2"); Assert.IsNotNull (mc.UIHint, "#F2"); - Assert.Greater (mc.UIHint.Length, 0, "#F2-1"); + AssertHelper.Greater (mc.UIHint.Length, 0, "#F2-1"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#F2-3"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#F2-4"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#F2-5"); @@ -775,7 +775,7 @@ namespace MonoTests.System.Web.DynamicData mc = t.GetColumn ("CurrencyColumn2"); Assert.IsNotNull (mc.UIHint, "#G2"); - Assert.Greater (mc.UIHint.Length, 0, "#G2-1"); + AssertHelper.Greater (mc.UIHint.Length, 0, "#G2-1"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#G2-3"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#G2-4"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#G2-5"); @@ -790,7 +790,7 @@ namespace MonoTests.System.Web.DynamicData mc = t.GetColumn ("TextColumn2"); Assert.IsNotNull (mc.UIHint, "#H2"); - Assert.Greater (mc.UIHint.Length, 0, "#H2-1"); + AssertHelper.Greater (mc.UIHint.Length, 0, "#H2-1"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#H2-3"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#H2-4"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#H2-5"); @@ -805,7 +805,7 @@ namespace MonoTests.System.Web.DynamicData mc = t.GetColumn ("HtmlColumn2"); Assert.IsNotNull (mc.UIHint, "#I2"); - Assert.Greater (mc.UIHint.Length, 0, "#I2-1"); + AssertHelper.Greater (mc.UIHint.Length, 0, "#I2-1"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#I2-3"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#I2-4"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#I2-5"); @@ -820,7 +820,7 @@ namespace MonoTests.System.Web.DynamicData mc = t.GetColumn ("MultilineTextColumn2"); Assert.IsNotNull (mc.UIHint, "#J2"); - Assert.Greater (mc.UIHint.Length, 0, "#J2-1"); + AssertHelper.Greater (mc.UIHint.Length, 0, "#J2-1"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#J2-3"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#J2-4"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#J2-5"); @@ -835,7 +835,7 @@ namespace MonoTests.System.Web.DynamicData mc = t.GetColumn ("EmailAddressColumn2"); Assert.IsNotNull (mc.UIHint, "#K2"); - Assert.Greater (mc.UIHint.Length, 0, "#K2-1"); + AssertHelper.Greater (mc.UIHint.Length, 0, "#K2-1"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#K2-3"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#K2-4"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#K2-5"); @@ -850,7 +850,7 @@ namespace MonoTests.System.Web.DynamicData mc = t.GetColumn ("PasswordColumn2"); Assert.IsNotNull (mc.UIHint, "#L2"); - Assert.Greater (mc.UIHint.Length, 0, "#L2-1"); + AssertHelper.Greater (mc.UIHint.Length, 0, "#L2-1"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#L2-3"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#L2-4"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#L2-5"); @@ -865,7 +865,7 @@ namespace MonoTests.System.Web.DynamicData mc = t.GetColumn ("UrlColumn2"); Assert.IsNotNull (mc.UIHint, "#M2"); - Assert.Greater (mc.UIHint.Length, 0, "#M2-1"); + AssertHelper.Greater (mc.UIHint.Length, 0, "#M2-1"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#M2-3"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#M2-4"); Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#M2-5"); |