Update Safe Exam Browser Patch to 3.10.0.826
This commit is contained in:
@@ -102,13 +102,13 @@ namespace SafeExamBrowser.Browser.UnitTests.Filters
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(NotImplementedException))]
|
||||
public void MustNotAllowUnsupportedResult()
|
||||
{
|
||||
var rule = new Mock<IRule>();
|
||||
|
||||
rule.SetupGet(r => r.Result).Returns((FilterResult) (-1));
|
||||
sut.Load(rule.Object);
|
||||
|
||||
Assert.ThrowsExactly<NotImplementedException>(() => sut.Load(rule.Object));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -33,10 +33,9 @@ namespace SafeExamBrowser.Browser.UnitTests.Filters
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(NotImplementedException))]
|
||||
public void MustNotAllowUnsupportedFilterType()
|
||||
{
|
||||
sut.CreateRule((FilterRuleType) (-1));
|
||||
Assert.ThrowsExactly<NotImplementedException>(() => sut.CreateRule((FilterRuleType) (-1)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -51,17 +51,15 @@ namespace SafeExamBrowser.Browser.UnitTests.Filters.Rules
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(ArgumentNullException))]
|
||||
public void MustNotAllowUndefinedExpression()
|
||||
{
|
||||
sut.Initialize(new FilterRuleSettings());
|
||||
Assert.ThrowsExactly<ArgumentNullException>(() => sut.Initialize(new FilterRuleSettings()));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(ArgumentException))]
|
||||
public void MustValidateExpression()
|
||||
{
|
||||
sut.Initialize(new FilterRuleSettings { Expression = "ç+\"}%&*/(+)=?{=*+¦]@#°§]`?´^¨'°[¬|¢" });
|
||||
Assert.ThrowsExactly<ArgumentException>(() => sut.Initialize(new FilterRuleSettings { Expression = "ç+\"}%&*/(+)=?{=*+¦]@#°§]`?´^¨'°[¬|¢" }));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -51,10 +51,9 @@ namespace SafeExamBrowser.Browser.UnitTests.Filters.Rules
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(ArgumentNullException))]
|
||||
public void MustNotAllowUndefinedExpression()
|
||||
{
|
||||
sut.Initialize(new FilterRuleSettings());
|
||||
Assert.ThrowsExactly<ArgumentNullException>(() => sut.Initialize(new FilterRuleSettings()));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -73,7 +72,7 @@ namespace SafeExamBrowser.Browser.UnitTests.Filters.Rules
|
||||
|
||||
foreach (var expression in invalid)
|
||||
{
|
||||
Assert.ThrowsException<ArgumentException>(() => sut.Initialize(new FilterRuleSettings { Expression = expression }));
|
||||
Assert.ThrowsExactly<ArgumentException>(() => sut.Initialize(new FilterRuleSettings { Expression = expression }));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user