You've already forked linux-packaging-mono
Imported Upstream version 5.10.0.47
Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
This commit is contained in:
parent
88ff76fe28
commit
e46a49ecf1
@@ -91,12 +91,10 @@ namespace MonoTests.System.Web.Caching
|
||||
|
||||
static CacheItemPriorityQueueTest ()
|
||||
{
|
||||
dataDir =
|
||||
Path.Combine (
|
||||
Path.Combine (
|
||||
Path.Combine (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location), "Test"),
|
||||
"System.Web.Caching"),
|
||||
DATA_DIR);
|
||||
// Assumes this is compiled into mcs/class/lib/<profile>/test
|
||||
string class_dir = Directory.GetParent (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location)).Parent.Parent.FullName;
|
||||
string system_web_dir = Path.Combine (class_dir, "System.Web", "Test", "System.Web.Caching");
|
||||
dataDir = Path.Combine (system_web_dir, DATA_DIR);
|
||||
}
|
||||
|
||||
void RunTest (string testsFileName, string listFileName)
|
||||
|
@@ -33,7 +33,6 @@ using System.Web;
|
||||
using System.Web.Caching;
|
||||
|
||||
using NUnit.Framework;
|
||||
using MonoTests.Common;
|
||||
|
||||
namespace MonoTests.System.Web.Caching
|
||||
{
|
||||
@@ -45,15 +44,15 @@ namespace MonoTests.System.Web.Caching
|
||||
{
|
||||
FileResponseElement fre;
|
||||
|
||||
AssertExtensions.Throws<ArgumentNullException> (() => {
|
||||
Assert.Throws<ArgumentNullException> (() => {
|
||||
fre = new FileResponseElement (null, 0, 0);
|
||||
}, "#A1");
|
||||
|
||||
AssertExtensions.Throws<ArgumentOutOfRangeException> (() => {
|
||||
Assert.Throws<ArgumentOutOfRangeException> (() => {
|
||||
fre = new FileResponseElement ("file.txt", -1, 0);
|
||||
}, "#A2");
|
||||
|
||||
AssertExtensions.Throws<ArgumentOutOfRangeException> (() => {
|
||||
Assert.Throws<ArgumentOutOfRangeException> (() => {
|
||||
fre = new FileResponseElement ("file.txt", 0, -1);
|
||||
}, "#A3");
|
||||
|
||||
|
@@ -33,7 +33,6 @@ using System.Web;
|
||||
using System.Web.Caching;
|
||||
|
||||
using NUnit.Framework;
|
||||
using MonoTests.Common;
|
||||
|
||||
namespace MonoTests.System.Web.Caching
|
||||
{
|
||||
@@ -45,11 +44,11 @@ namespace MonoTests.System.Web.Caching
|
||||
{
|
||||
HeaderElement he;
|
||||
|
||||
AssertExtensions.Throws<ArgumentNullException> (() => {
|
||||
Assert.Throws<ArgumentNullException> (() => {
|
||||
he = new HeaderElement (null, String.Empty);
|
||||
}, "#A1");
|
||||
|
||||
AssertExtensions.Throws<ArgumentNullException> (() => {
|
||||
Assert.Throws<ArgumentNullException> (() => {
|
||||
he = new HeaderElement ("Header", null);
|
||||
}, "#A2");
|
||||
|
||||
|
@@ -33,7 +33,7 @@ using System.Web;
|
||||
using System.Web.Caching;
|
||||
|
||||
using NUnit.Framework;
|
||||
using MonoTests.Common;
|
||||
|
||||
|
||||
namespace MonoTests.System.Web.Caching
|
||||
{
|
||||
@@ -45,15 +45,15 @@ namespace MonoTests.System.Web.Caching
|
||||
{
|
||||
MemoryResponseElement mre;
|
||||
|
||||
AssertExtensions.Throws<ArgumentNullException> (() => {
|
||||
Assert.Throws<ArgumentNullException> (() => {
|
||||
mre = new MemoryResponseElement (null, 0);
|
||||
}, "#A1");
|
||||
|
||||
AssertExtensions.Throws<ArgumentOutOfRangeException> (() => {
|
||||
Assert.Throws<ArgumentOutOfRangeException> (() => {
|
||||
mre = new MemoryResponseElement (new byte[1], -1);
|
||||
}, "#A2");
|
||||
|
||||
AssertExtensions.Throws<ArgumentOutOfRangeException> (() => {
|
||||
Assert.Throws<ArgumentOutOfRangeException> (() => {
|
||||
mre = new MemoryResponseElement (new byte[1], 2);
|
||||
}, "#A2");
|
||||
|
||||
|
@@ -36,7 +36,6 @@ using System.Web.Caching;
|
||||
using System.Web.Configuration;
|
||||
|
||||
using NUnit.Framework;
|
||||
using MonoTests.Common;
|
||||
|
||||
namespace MonoTests.System.Web.Caching
|
||||
{
|
||||
@@ -166,17 +165,17 @@ namespace MonoTests.System.Web.Caching
|
||||
{
|
||||
ResponseElement data = new MemoryResponseElement (new byte[10], 10);
|
||||
|
||||
AssertExtensions.Throws<ArgumentNullException> (() => {
|
||||
Assert.Throws<ArgumentNullException> (() => {
|
||||
OutputCache.Serialize (null, data);
|
||||
}, "#A1");
|
||||
|
||||
var ms = new MemoryStream ();
|
||||
AssertExtensions.Throws<ArgumentException> (() => {
|
||||
Assert.Throws<ArgumentException> (() => {
|
||||
OutputCache.Serialize (ms, null);
|
||||
}, "#A2");
|
||||
|
||||
foreach (object o in serializeObjects) {
|
||||
AssertExtensions.Throws<ArgumentException> (() => {
|
||||
Assert.Throws<ArgumentException> (() => {
|
||||
OutputCache.Serialize (ms, o);
|
||||
}, String.Format ("#A3-{0}", o.GetType ()));
|
||||
}
|
||||
@@ -194,28 +193,28 @@ namespace MonoTests.System.Web.Caching
|
||||
#endif
|
||||
|
||||
byte[] bytes = SerializeElement (mre);
|
||||
AssertExtensions.AreEqual (bytes, memoryResponseElement, "#B1");
|
||||
Assert.AreEqual (bytes, memoryResponseElement, "#B1");
|
||||
|
||||
bytes = SerializeElement (fre);
|
||||
AssertExtensions.AreEqual (bytes, fileResponseElement, "#B2");
|
||||
Assert.AreEqual (bytes, fileResponseElement, "#B2");
|
||||
|
||||
bytes = SerializeElement (sre);
|
||||
AssertExtensions.AreEqual (bytes, substitutionResponseElement, "#B3");
|
||||
Assert.AreEqual (bytes, substitutionResponseElement, "#B3");
|
||||
|
||||
bytes = SerializeElement (sreBad);
|
||||
AssertExtensions.AreEqual (bytes, badSubstitutionResponseElement, "#B4");
|
||||
Assert.AreEqual (bytes, badSubstitutionResponseElement, "#B4");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Deserialize ()
|
||||
{
|
||||
AssertExtensions.Throws<ArgumentNullException> (() => {
|
||||
Assert.Throws<ArgumentNullException> (() => {
|
||||
OutputCache.Deserialize (null);
|
||||
}, "#A1");
|
||||
|
||||
foreach (object o in serializeObjects) {
|
||||
using (var m = new MemoryStream (SerializeToBinary (o))) {
|
||||
AssertExtensions.Throws<ArgumentException> (() => {
|
||||
Assert.Throws<ArgumentException> (() => {
|
||||
OutputCache.Deserialize (m);
|
||||
}, String.Format ("#A2-{0}", o.GetType ()));
|
||||
}
|
||||
@@ -231,7 +230,7 @@ namespace MonoTests.System.Web.Caching
|
||||
using (ms = new MemoryStream (memoryResponseElement))
|
||||
mreOrig = OutputCache.Deserialize (ms) as MemoryResponseElement;
|
||||
Assert.IsNotNull (mreOrig, "#B1-1");
|
||||
AssertExtensions.AreEqual (mreOrig.Buffer, mre.Buffer, "#B1-2");
|
||||
Assert.AreEqual (mreOrig.Buffer, mre.Buffer, "#B1-2");
|
||||
Assert.AreEqual (mreOrig.Length, mre.Length, "#B1-3");
|
||||
|
||||
using (ms = new MemoryStream (fileResponseElement))
|
||||
@@ -247,7 +246,7 @@ namespace MonoTests.System.Web.Caching
|
||||
Assert.AreEqual (sreOrig.Callback, sre.Callback, "#D1");
|
||||
|
||||
// Callback here is not a static method - Substitution delegates must be static
|
||||
AssertExtensions.Throws<ArgumentException> (() => {
|
||||
Assert.Throws<ArgumentException> (() => {
|
||||
using (ms = new MemoryStream (badSubstitutionResponseElement))
|
||||
sreBadOrig = OutputCache.Deserialize (ms) as SubstitutionResponseElement;
|
||||
}, "#E1");
|
||||
|
@@ -30,7 +30,6 @@ using System.Web;
|
||||
using System.Web.Caching;
|
||||
|
||||
using NUnit.Framework;
|
||||
using MonoTests.Common;
|
||||
|
||||
namespace MonoTests.System.Web.Caching
|
||||
{
|
||||
@@ -41,7 +40,7 @@ namespace MonoTests.System.Web.Caching
|
||||
public void Constructor_1 ()
|
||||
{
|
||||
SqlCacheDependency sqc;
|
||||
AssertExtensions.Throws<ArgumentNullException> (() => {
|
||||
Assert.Throws<ArgumentNullException> (() => {
|
||||
sqc = new SqlCacheDependency (null);
|
||||
}, "#A1");
|
||||
}
|
||||
@@ -51,16 +50,16 @@ namespace MonoTests.System.Web.Caching
|
||||
{
|
||||
SqlCacheDependency sqc;
|
||||
|
||||
AssertExtensions.Throws<ArgumentNullException> (() => {
|
||||
Assert.Throws<ArgumentNullException> (() => {
|
||||
sqc = new SqlCacheDependency (null, "myTable");
|
||||
}, "#A1");
|
||||
|
||||
AssertExtensions.Throws<ArgumentNullException> (() => {
|
||||
Assert.Throws<ArgumentNullException> (() => {
|
||||
sqc = new SqlCacheDependency ("myDatabase", null);
|
||||
}, "#A2");
|
||||
|
||||
// Cannot be tested without an existing database
|
||||
//AssertExtensions.Throws<ArgumentNullException> (() => {
|
||||
//Assert.Throws<ArgumentNullException> (() => {
|
||||
// sqc = new SqlCacheDependency ("myDatabase", "myTable");
|
||||
//}, "#A3");
|
||||
}
|
||||
@@ -70,15 +69,15 @@ namespace MonoTests.System.Web.Caching
|
||||
{
|
||||
CacheDependency sqc;
|
||||
|
||||
AssertExtensions.Throws<HttpException> (() => {
|
||||
Assert.Throws<HttpException> (() => {
|
||||
sqc = SqlCacheDependency.CreateOutputCacheDependency (null);
|
||||
}, "#A1");
|
||||
|
||||
AssertExtensions.Throws<ArgumentException> (() => {
|
||||
Assert.Throws<ArgumentException> (() => {
|
||||
sqc = SqlCacheDependency.CreateOutputCacheDependency (String.Empty);
|
||||
}, "#A2");
|
||||
|
||||
AssertExtensions.Throws<ArgumentException> (() => {
|
||||
Assert.Throws<ArgumentException> (() => {
|
||||
sqc = SqlCacheDependency.CreateOutputCacheDependency ("Database");
|
||||
}, "#A2");
|
||||
|
||||
|
@@ -33,7 +33,6 @@ using System.Web;
|
||||
using System.Web.Caching;
|
||||
|
||||
using NUnit.Framework;
|
||||
using MonoTests.Common;
|
||||
|
||||
namespace MonoTests.System.Web.Caching
|
||||
{
|
||||
@@ -50,7 +49,7 @@ namespace MonoTests.System.Web.Caching
|
||||
{
|
||||
SubstitutionResponseElement sre;
|
||||
|
||||
AssertExtensions.Throws<ArgumentNullException> (() => {
|
||||
Assert.Throws<ArgumentNullException> (() => {
|
||||
sre = new SubstitutionResponseElement (null);
|
||||
}, "#A1");
|
||||
|
||||
|
@@ -33,7 +33,7 @@ using System.Web.Compilation;
|
||||
using System.Web.Hosting;
|
||||
|
||||
using NUnit.Framework;
|
||||
using MonoTests.Common;
|
||||
|
||||
|
||||
namespace MonoTests.System.Web.Compilation
|
||||
{
|
||||
@@ -45,7 +45,7 @@ namespace MonoTests.System.Web.Compilation
|
||||
[Ignore ("Pending investigation if it is indeed the correct test.")]
|
||||
public void GetGlobalAsaxType ()
|
||||
{
|
||||
AssertExtensions.Throws<InvalidOperationException> (() => {
|
||||
Assert.Throws<InvalidOperationException> (() => {
|
||||
BuildManager.GetGlobalAsaxType ();
|
||||
}, "#A1");
|
||||
}
|
||||
|
@@ -39,7 +39,6 @@ using NUnit.Framework;
|
||||
|
||||
using MonoTests.SystemWeb.Framework;
|
||||
using MonoTests.stand_alone.WebHarness;
|
||||
using MonoTests.Common;
|
||||
|
||||
namespace MonoTests.System.Web.Compilation
|
||||
{
|
||||
@@ -49,25 +48,25 @@ namespace MonoTests.System.Web.Compilation
|
||||
[Test]
|
||||
public void RegisterBuildProvider ()
|
||||
{
|
||||
AssertExtensions.Throws<ArgumentException> (() => {
|
||||
Assert.Throws<ArgumentException> (() => {
|
||||
BuildProvider.RegisterBuildProvider (null, typeof (FooBuildProvider));
|
||||
}, "#A1-1");
|
||||
|
||||
AssertExtensions.Throws<ArgumentException> (() => {
|
||||
Assert.Throws<ArgumentException> (() => {
|
||||
BuildProvider.RegisterBuildProvider (String.Empty, typeof (FooBuildProvider));
|
||||
}, "#A1-2");
|
||||
|
||||
AssertExtensions.Throws<ArgumentNullException> (() => {
|
||||
Assert.Throws<ArgumentNullException> (() => {
|
||||
BuildProvider.RegisterBuildProvider (".foo", null);
|
||||
}, "#A1-3");
|
||||
|
||||
AssertExtensions.Throws<ArgumentException> (() => {
|
||||
Assert.Throws<ArgumentException> (() => {
|
||||
BuildProvider.RegisterBuildProvider (".foo", typeof (string));
|
||||
}, "#A1-4");
|
||||
|
||||
// This would have worked if we called the method during the pre-application start stage
|
||||
// (we have a test for this in the standalone test suite)
|
||||
AssertExtensions.Throws<InvalidOperationException> (() => {
|
||||
Assert.Throws<InvalidOperationException> (() => {
|
||||
BuildProvider.RegisterBuildProvider (".foo", typeof (BuildProvider));
|
||||
}, "#A1-5");
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ using NUnit.Framework;
|
||||
|
||||
using MonoTests.SystemWeb.Framework;
|
||||
using MonoTests.stand_alone.WebHarness;
|
||||
using MonoTests.Common;
|
||||
|
||||
|
||||
namespace MonoTests.System.Web.Compilation
|
||||
{
|
||||
@@ -84,11 +84,11 @@ namespace MonoTests.System.Web.Compilation
|
||||
obj = bldr.EvaluateExpression (null, entry, null, context);
|
||||
Assert.IsNull (obj, "#A4");
|
||||
|
||||
AssertExtensions.Throws<NullReferenceException> (() => {
|
||||
Assert.Throws<NullReferenceException> (() => {
|
||||
bldr.EvaluateExpression (null, null, null, context);
|
||||
}, "#A5-1");
|
||||
|
||||
AssertExtensions.Throws<NullReferenceException> (() => {
|
||||
Assert.Throws<NullReferenceException> (() => {
|
||||
bldr.EvaluateExpression (null, entry, null, null);
|
||||
}, "#A5-2");
|
||||
}
|
||||
@@ -105,7 +105,7 @@ namespace MonoTests.System.Web.Compilation
|
||||
[Test]
|
||||
public void GetRouteUrl ()
|
||||
{
|
||||
AssertExtensions.Throws<ArgumentNullException> (() => {
|
||||
Assert.Throws<ArgumentNullException> (() => {
|
||||
RouteUrlExpressionBuilder.GetRouteUrl (null, "bar=test");
|
||||
}, "#A1-1");
|
||||
|
||||
@@ -139,15 +139,15 @@ namespace MonoTests.System.Web.Compilation
|
||||
Assert.IsNotNull (url, "#A6-1");
|
||||
Assert.AreEqual ("/NunitWeb/test-foo", url, "#A6-2");
|
||||
|
||||
AssertExtensions.Throws<InvalidOperationException> (() => {
|
||||
Assert.Throws<InvalidOperationException> (() => {
|
||||
url = RouteUrlExpressionBuilder.GetRouteUrl (new Control (), "routename");
|
||||
}, "#A7-1");
|
||||
|
||||
AssertExtensions.Throws<InvalidOperationException> (() => {
|
||||
Assert.Throws<InvalidOperationException> (() => {
|
||||
url = RouteUrlExpressionBuilder.GetRouteUrl (new Control (), String.Empty);
|
||||
}, "#A7-2");
|
||||
|
||||
AssertExtensions.Throws<InvalidOperationException> (() => {
|
||||
Assert.Throws<InvalidOperationException> (() => {
|
||||
url = RouteUrlExpressionBuilder.GetRouteUrl (new Control (), null);
|
||||
}, "#A7-2");
|
||||
}
|
||||
@@ -165,7 +165,7 @@ namespace MonoTests.System.Web.Compilation
|
||||
Assert.AreEqual (1, rvd.Count, "#A1-4-1");
|
||||
Assert.AreEqual (String.Empty, rvd ["route"], "#A1-4-2");
|
||||
|
||||
AssertExtensions.Throws<NullReferenceException> (() => {
|
||||
Assert.Throws<NullReferenceException> (() => {
|
||||
RouteUrlExpressionBuilder.TryParseRouteExpression ("foo=bar", null, out routeName);
|
||||
}, "#A1-5");
|
||||
|
||||
@@ -235,7 +235,7 @@ namespace MonoTests.System.Web.Compilation
|
||||
var context = new ExpressionBuilderContext (new FakePage ());
|
||||
CodeExpression expr;
|
||||
|
||||
AssertExtensions.Throws<NullReferenceException> (() => {
|
||||
Assert.Throws<NullReferenceException> (() => {
|
||||
expr = bldr.GetCodeExpression (null, "data", context);
|
||||
}, "#A1-1");
|
||||
|
||||
|
@@ -32,7 +32,6 @@ using System;
|
||||
using System.Text;
|
||||
using System.Web.Security;
|
||||
|
||||
using MonoTests.Common;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace MonoTests.System.Web.Security
|
||||
@@ -53,7 +52,7 @@ namespace MonoTests.System.Web.Security
|
||||
#endif
|
||||
const int VALIDATION_EXPECTED_SIZE = 64;
|
||||
|
||||
AssertExtensions.Throws<ArgumentNullException> (() => {
|
||||
Assert.Throws<ArgumentNullException> (() => {
|
||||
MachineKey.Encode (null, MachineKeyProtection.All);
|
||||
}, "#A1-1");
|
||||
|
||||
@@ -79,11 +78,11 @@ namespace MonoTests.System.Web.Security
|
||||
{
|
||||
byte[] decoded;
|
||||
|
||||
AssertExtensions.Throws<ArgumentNullException> (() => {
|
||||
Assert.Throws<ArgumentNullException> (() => {
|
||||
MachineKey.Decode (null, MachineKeyProtection.All);
|
||||
}, "#A1-1");
|
||||
|
||||
AssertExtensions.Throws<ArgumentException> (() => {
|
||||
Assert.Throws<ArgumentException> (() => {
|
||||
decoded = MachineKey.Decode (String.Empty, MachineKeyProtection.All);
|
||||
}, "#A1-2");
|
||||
|
||||
@@ -107,15 +106,15 @@ namespace MonoTests.System.Web.Security
|
||||
Assert.IsNotNull (decoded, "#A5-1");
|
||||
Assert.AreEqual (5, decoded.Length, "#A5-2");
|
||||
|
||||
AssertExtensions.Throws<ArgumentException> (() => {
|
||||
Assert.Throws<ArgumentException> (() => {
|
||||
decoded = MachineKey.Decode ("test", MachineKeyProtection.All);
|
||||
}, "#B1-1");
|
||||
|
||||
AssertExtensions.Throws<ArgumentException> (() => {
|
||||
Assert.Throws<ArgumentException> (() => {
|
||||
decoded = MachineKey.Decode ("test", MachineKeyProtection.Encryption);
|
||||
}, "#B1-2");
|
||||
|
||||
AssertExtensions.Throws<ArgumentException> (() => {
|
||||
Assert.Throws<ArgumentException> (() => {
|
||||
decoded = MachineKey.Decode ("test", MachineKeyProtection.Validation);
|
||||
}, "#B1-3");
|
||||
|
||||
@@ -172,11 +171,11 @@ namespace MonoTests.System.Web.Security
|
||||
[Test]
|
||||
public void Protect ()
|
||||
{
|
||||
AssertExtensions.Throws<ArgumentNullException> (() =>
|
||||
Assert.Throws<ArgumentNullException> (() =>
|
||||
MachineKey.Protect (null, null),
|
||||
"MachineKey.Protect not throwing an ArgumentNullException");
|
||||
|
||||
AssertExtensions.Throws<ArgumentNullException> (() =>
|
||||
Assert.Throws<ArgumentNullException> (() =>
|
||||
MachineKey.Protect (null, new [] { "test" }),
|
||||
"MachineKey.Protect not throwing an ArgumentNullException");
|
||||
|
||||
@@ -191,11 +190,11 @@ namespace MonoTests.System.Web.Security
|
||||
|
||||
Assert.AreEqual (plainBytes, validDecryptedBytes, "Decryption didn't work");
|
||||
|
||||
AssertExtensions.Throws<CryptographicException> (() =>
|
||||
Assert.Throws<CryptographicException> (() =>
|
||||
MachineKey.Unprotect (encryptedBytes, invalidUsages),
|
||||
"Purposes not encrypting properly");
|
||||
|
||||
AssertExtensions.Throws<CryptographicException> (() =>
|
||||
Assert.Throws<CryptographicException> (() =>
|
||||
MachineKey.Unprotect (encryptedBytes, oneUsage),
|
||||
"Single purpose working when multiple supplied");
|
||||
}
|
||||
|
@@ -32,7 +32,6 @@ using System.Text;
|
||||
using System.Web.Security;
|
||||
|
||||
using NUnit.Framework;
|
||||
using MonoTests.Common;
|
||||
|
||||
namespace MonoTests.System.Web.Security {
|
||||
|
||||
@@ -70,19 +69,19 @@ namespace MonoTests.System.Web.Security {
|
||||
{
|
||||
MembershipUser user;
|
||||
|
||||
AssertExtensions.Throws<MembershipCreateUserException> (() => {
|
||||
Assert.Throws<MembershipCreateUserException> (() => {
|
||||
user = Membership.CreateUser (null, "password");
|
||||
}, "#A1");
|
||||
|
||||
AssertExtensions.Throws<MembershipCreateUserException> (() => {
|
||||
Assert.Throws<MembershipCreateUserException> (() => {
|
||||
user = Membership.CreateUser (String.Empty, "password");
|
||||
}, "#A2");
|
||||
|
||||
AssertExtensions.Throws<MembershipCreateUserException> (() => {
|
||||
Assert.Throws<MembershipCreateUserException> (() => {
|
||||
user = Membership.CreateUser ("user", null);
|
||||
}, "#B1");
|
||||
|
||||
AssertExtensions.Throws<MembershipCreateUserException> (() => {
|
||||
Assert.Throws<MembershipCreateUserException> (() => {
|
||||
user = Membership.CreateUser ("user", String.Empty);
|
||||
}, "#B2");
|
||||
}
|
||||
|
@@ -40,7 +40,6 @@ using System.Web.Security;
|
||||
using System.Text.RegularExpressions;
|
||||
using MonoTests.SystemWeb.Framework;
|
||||
using MonoTests.stand_alone.WebHarness;
|
||||
using MonoTests.Common;
|
||||
|
||||
using NUnit.Framework;
|
||||
using System.Collections.Specialized;
|
||||
@@ -879,7 +878,7 @@ namespace MonoTests.System.Web.UI.WebControls
|
||||
using (var sw = new StringWriter ()) {
|
||||
using (var w = new HtmlTextWriter (sw)) {
|
||||
if (shouldFail)
|
||||
AssertExtensions.Throws<InvalidOperationException> (() => {
|
||||
Assert.Throws<InvalidOperationException> (() => {
|
||||
cp.RenderControl (w);
|
||||
}, message);
|
||||
else {
|
||||
|
@@ -38,7 +38,6 @@ using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
using NUnit.Framework;
|
||||
using MonoTests.Common;
|
||||
|
||||
namespace MonoTests.System.Web.UI.WebControls {
|
||||
|
||||
@@ -327,11 +326,11 @@ namespace MonoTests.System.Web.UI.WebControls {
|
||||
{
|
||||
TestDataList dl = new TestDataList ();
|
||||
|
||||
AssertExtensions.Throws<ArgumentOutOfRangeException> (() => {
|
||||
Assert.Throws<ArgumentOutOfRangeException> (() => {
|
||||
dl.RepeatLayout = RepeatLayout.OrderedList;
|
||||
}, "#A1");
|
||||
|
||||
AssertExtensions.Throws<ArgumentOutOfRangeException> (() => {
|
||||
Assert.Throws<ArgumentOutOfRangeException> (() => {
|
||||
dl.RepeatLayout = RepeatLayout.UnorderedList;
|
||||
}, "#A2");
|
||||
}
|
||||
|
@@ -42,7 +42,6 @@ using System.Collections;
|
||||
using MonoTests.SystemWeb.Framework;
|
||||
using MonoTests.stand_alone.WebHarness;
|
||||
using System.Threading;
|
||||
using MonoTests.Common;
|
||||
|
||||
namespace MonoTests.System.Web.UI.WebControls
|
||||
{
|
||||
@@ -219,17 +218,17 @@ namespace MonoTests.System.Web.UI.WebControls
|
||||
var mp = new MasterPage ();
|
||||
ITemplate template = new MyTemplate ();
|
||||
|
||||
AssertExtensions.Throws<NullReferenceException> (() => {
|
||||
Assert.Throws<NullReferenceException> (() => {
|
||||
mp.InstantiateInContentPlaceHolder (null, template);
|
||||
}, "#A1-1");
|
||||
|
||||
Control container = new Control ();
|
||||
AssertExtensions.Throws<NullReferenceException> (() => {
|
||||
Assert.Throws<NullReferenceException> (() => {
|
||||
mp.InstantiateInContentPlaceHolder (container, null);
|
||||
}, "#A1-2");
|
||||
#if DOTNET
|
||||
// TODO: why does it throw? Unchecked 'as' type cast?
|
||||
AssertExtensions.Throws<NullReferenceException> (() => {
|
||||
Assert.Throws<NullReferenceException> (() => {
|
||||
mp.InstantiateInContentPlaceHolder (container, template);
|
||||
}, "#B1-1");
|
||||
#endif
|
||||
@@ -257,12 +256,12 @@ namespace MonoTests.System.Web.UI.WebControls
|
||||
|
||||
ITemplate template = new MyTemplate ();
|
||||
|
||||
AssertExtensions.Throws<NullReferenceException> (() => {
|
||||
Assert.Throws<NullReferenceException> (() => {
|
||||
mp.InstantiateInContentPlaceHolder (null, template);
|
||||
}, "#A1-1");
|
||||
|
||||
Control container = new Control ();
|
||||
AssertExtensions.Throws<NullReferenceException> (() => {
|
||||
Assert.Throws<NullReferenceException> (() => {
|
||||
mp.InstantiateInContentPlaceHolder (container, null);
|
||||
}, "#A1-2");
|
||||
|
||||
|
@@ -47,8 +47,6 @@ using System.Text.RegularExpressions;
|
||||
using System.Reflection;
|
||||
using System.Xml;
|
||||
|
||||
using MonoTests.Common;
|
||||
|
||||
namespace MonoTests.System.Web.UI.WebControls
|
||||
{
|
||||
class MenuTable : Menu
|
||||
@@ -1774,11 +1772,11 @@ namespace MonoTests.System.Web.UI.WebControls
|
||||
maxValue = value;
|
||||
}
|
||||
|
||||
AssertExtensions.Throws<ArgumentOutOfRangeException> (() => {
|
||||
Assert.Throws<ArgumentOutOfRangeException> (() => {
|
||||
m.RenderingMode = (MenuRenderingMode) (minValue - 1);
|
||||
}, "#A2-1");
|
||||
|
||||
AssertExtensions.Throws<ArgumentOutOfRangeException> (() => {
|
||||
Assert.Throws<ArgumentOutOfRangeException> (() => {
|
||||
m.RenderingMode = (MenuRenderingMode) (maxValue + 1);
|
||||
}, "#A2-2");
|
||||
}
|
||||
|
@@ -31,7 +31,6 @@ using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
using NUnit.Framework;
|
||||
using MonoTests.Common;
|
||||
using MonoTests.System.Web;
|
||||
|
||||
namespace MonoTests.System.Web.UI.WebControls
|
||||
@@ -60,7 +59,7 @@ namespace MonoTests.System.Web.UI.WebControls
|
||||
RouteParameter rp;
|
||||
RouteParameter original;
|
||||
|
||||
AssertExtensions.Throws<NullReferenceException> (() => {
|
||||
Assert.Throws<NullReferenceException> (() => {
|
||||
rp = new FakeRouteParameter ((RouteParameter) null);
|
||||
}, "#A1");
|
||||
|
||||
@@ -137,7 +136,7 @@ namespace MonoTests.System.Web.UI.WebControls
|
||||
|
||||
Assert.IsNull (rp.DoEvaluate (null, new Control ()), "#A1-1");
|
||||
Assert.IsNull (rp.DoEvaluate (ctx, null), "#A1-2");
|
||||
AssertExtensions.Throws <NullReferenceException> (() => {
|
||||
Assert.Throws <NullReferenceException> (() => {
|
||||
rp.DoEvaluate (ctx, new Control ());
|
||||
}, "#A1-2");
|
||||
}
|
||||
|
@@ -46,9 +46,6 @@ using MonoTests.SystemWeb.Framework;
|
||||
using MonoTests.stand_alone.WebHarness;
|
||||
using System.Threading;
|
||||
|
||||
using MonoTests.Common;
|
||||
|
||||
|
||||
namespace MonoTests.System.Web.UI.WebControls
|
||||
{
|
||||
|
||||
@@ -1501,7 +1498,7 @@ namespace MonoTests.System.Web.UI.WebControls
|
||||
t.UserData = "Empty";
|
||||
string result;
|
||||
|
||||
AssertExtensions.Throws<InvalidOperationException> (() => {
|
||||
Assert.Throws<InvalidOperationException> (() => {
|
||||
result = t.Run ();
|
||||
}, "#A1");
|
||||
}
|
||||
@@ -1517,7 +1514,7 @@ namespace MonoTests.System.Web.UI.WebControls
|
||||
Assert.AreEqual (String.Empty, renderedHtml, "#A1");
|
||||
|
||||
t.UserData = "OptionalSideBar_WithSideBar";
|
||||
AssertExtensions.Throws<InvalidOperationException> (() => {
|
||||
Assert.Throws<InvalidOperationException> (() => {
|
||||
result = t.Run ();
|
||||
}, "#A2");
|
||||
}
|
||||
@@ -1552,7 +1549,7 @@ namespace MonoTests.System.Web.UI.WebControls
|
||||
Assert.AreEqual (String.Empty, renderedHtml, "#A1");
|
||||
|
||||
t.UserData = "OptionalHeader_WithHeaderTemplate";
|
||||
AssertExtensions.Throws<InvalidOperationException> (() => {
|
||||
Assert.Throws<InvalidOperationException> (() => {
|
||||
result = t.Run ();
|
||||
}, "#A2");
|
||||
}
|
||||
@@ -1580,7 +1577,7 @@ namespace MonoTests.System.Web.UI.WebControls
|
||||
{
|
||||
WebTest t = new WebTest (PageInvoker.CreateOnInit (LayoutTemplateRender));
|
||||
t.UserData = "StepPlaceHolder";
|
||||
AssertExtensions.Throws<InvalidOperationException> (() => {
|
||||
Assert.Throws<InvalidOperationException> (() => {
|
||||
string result = t.Run ();
|
||||
}, "#A1");
|
||||
}
|
||||
@@ -1590,7 +1587,7 @@ namespace MonoTests.System.Web.UI.WebControls
|
||||
{
|
||||
WebTest t = new WebTest (PageInvoker.CreateOnInit (LayoutTemplateRender));
|
||||
t.UserData = "NavigationPlaceHolder";
|
||||
AssertExtensions.Throws<InvalidOperationException> (() => {
|
||||
Assert.Throws<InvalidOperationException> (() => {
|
||||
string result = t.Run ();
|
||||
}, "#A1");
|
||||
}
|
||||
|
@@ -40,7 +40,6 @@ using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using MonoTests.SystemWeb.Framework;
|
||||
using MonoTests.stand_alone.WebHarness;
|
||||
using MonoTests.Common;
|
||||
|
||||
using System.Web.UI.Adapters;
|
||||
|
||||
@@ -1059,7 +1058,7 @@ namespace MonoTests.System.Web.UI
|
||||
var ctl = new Control ();
|
||||
object obj = new { foo = "one", bar = "two" };
|
||||
string path;
|
||||
AssertExtensions.Throws<ArgumentException> (() => {
|
||||
Assert.Throws<ArgumentException> (() => {
|
||||
path = ctl.GetRouteUrl ("myroute1", obj);
|
||||
}, "#A1");
|
||||
|
||||
@@ -1090,7 +1089,7 @@ namespace MonoTests.System.Web.UI
|
||||
{"bar", "two"}
|
||||
};
|
||||
string path;
|
||||
AssertExtensions.Throws<ArgumentException> (() => {
|
||||
Assert.Throws<ArgumentException> (() => {
|
||||
path = ctl.GetRouteUrl ("myroute", rvd);
|
||||
}, "#A1");
|
||||
|
||||
|
@@ -32,7 +32,6 @@ using System.Text;
|
||||
using System.Web.UI;
|
||||
|
||||
using NUnit.Framework;
|
||||
using MonoTests.Common;
|
||||
|
||||
namespace MonoTests.System.Web.UI
|
||||
{
|
||||
@@ -76,7 +75,7 @@ namespace MonoTests.System.Web.UI
|
||||
Assert.AreEqual (0, cvt.ConvertFrom (null, null, String.Empty), "#A1-2");
|
||||
Assert.AreEqual (0, cvt.ConvertFrom (null, null, "infinite"), "#A1-3");
|
||||
Assert.AreEqual (0, cvt.ConvertFrom (null, null, "INfINiTE"), "#A1-4");
|
||||
AssertExtensions.Throws<Exception> (() => {
|
||||
Assert.Throws<Exception> (() => {
|
||||
cvt.ConvertFrom (null, null, "dummy");
|
||||
}, "#A1-5");
|
||||
Assert.AreEqual (5, cvt.ConvertFrom (null, null, "5"), "#A1-6");
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user