本文整理汇总了C#中System.NotImplementedException类的典型用法代码示例。如果您正苦于以下问题:C# NotImplementedException类的具体用法?C# NotImplementedException怎么用?C# NotImplementedException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NotImplementedException类属于System命名空间,在下文中一共展示了NotImplementedException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DefaultConstructorWorks
public void DefaultConstructorWorks()
{
var ex = new NotImplementedException();
Assert.True((object)ex is NotImplementedException, "is NotImplementedException");
Assert.AreEqual(ex.InnerException, null, "InnerException");
Assert.AreEqual(ex.Message, "The method or operation is not implemented.");
}
示例2: TestChainTo
public void TestChainTo()
{
var pipeline = SpatialImplementation.CurrentImplementation.CreateBuilder();
var pipeline2 = SpatialImplementation.CurrentImplementation.CreateBuilder();
var e = new NotImplementedException();
SpatialTestUtils.VerifyExceptionThrown<NotImplementedException>(() => pipeline.ChainTo(pipeline2), e.Message);
}
示例3: ConstructorWithMessageAndInnerExceptionWorks
public void ConstructorWithMessageAndInnerExceptionWorks() {
var inner = new Exception("a");
var ex = new NotImplementedException("The message", inner);
Assert.IsTrue((object)ex is NotImplementedException, "is NotImplementedException");
Assert.IsTrue(ReferenceEquals(ex.InnerException, inner), "InnerException");
Assert.AreEqual(ex.Message, "The message");
}
示例4: ConstructorWithMessageWorks
public void ConstructorWithMessageWorks()
{
var ex = new NotImplementedException("The message");
Assert.True((object)ex is NotImplementedException, "is NotImplementedException");
Assert.AreEqual(ex.InnerException, null, "InnerException");
Assert.AreEqual(ex.Message, "The message");
}
示例5: TypePropertiesAreCorrect
public void TypePropertiesAreCorrect()
{
Assert.AreEqual(typeof(NotImplementedException).GetClassName(), "Bridge.NotImplementedException", "Name");
object d = new NotImplementedException();
Assert.True(d is NotImplementedException, "is NotImplementedException");
Assert.True(d is Exception, "is Exception");
}
示例6: moves_to_the_error_queue_if_the_exception_matches
public void moves_to_the_error_queue_if_the_exception_matches()
{
var handler = new MoveToErrorQueueHandler<NotImplementedException>();
var ex = new NotImplementedException();
handler.DetermineContinuation(null, ex).ShouldBeOfType<MoveToErrorQueue>()
.Exception.ShouldBeTheSameAs(ex);
}
示例7: write_exception
public void write_exception()
{
var ex = new NotImplementedException();
writer.Exception(ex);
writer.FailureCount.ShouldEqual(1);
}
示例8: BuildExceptionTitleUnhandledExceptionTest
public void BuildExceptionTitleUnhandledExceptionTest()
{
var innerEx = new NotImplementedException() { Source = "fakeInnerSource" };
var ex = new System.Web.HttpUnhandledException("message", innerEx) { Source = "fakeSource" };
var expected = "System.NotImplementedException - fakeInnerSource";
Assert.AreEqual(expected, ExceptionsHelper.BuildExceptionTitle(ex));
}
示例9: ConstructingWithMessageAndInnerException
public void ConstructingWithMessageAndInnerException()
{
Exception inner = new NotImplementedException();
string message = "message";
PluginSettingException ex = new PluginSettingException(message, inner);
Assert.AreEqual(message, ex.Message);
Assert.AreSame(inner, ex.InnerException);
}
示例10: BuildExceptionTitleInnerExceptionTest
public void BuildExceptionTitleInnerExceptionTest()
{
var innerEx = new NotImplementedException();
var ex = new ArgumentNullException("message", innerEx) { Source = "fakeSource" };
var expected = "System.ArgumentNullException - fakeSource";
Assert.AreEqual(expected, ExceptionsHelper.BuildExceptionTitle(ex));
}
示例11: BuildExceptionStringInnerExceptionTest
public void BuildExceptionStringInnerExceptionTest()
{
var innerEx = new NotImplementedException("fakeInnerMessage");
var ex = new ArgumentNullException("fakeMessage", innerEx) { Source = "fakeSource" };
var expected = "<strong>fakeMessage</strong><br /><br /><br /><br /><i><u>Inner Exception:</u></i><br /><strong>fakeInnerMessage</strong><br /><br />";
Assert.AreEqual(expected, ExceptionsHelper.BuildExceptionString(ex));
}
示例12: BuildExceptionStringUnhandledExceptionTest
public void BuildExceptionStringUnhandledExceptionTest()
{
var innerEx = new NotImplementedException("fakeMessage") { Source = "fakeInnerSource" };
var ex = new System.Web.HttpUnhandledException("message", innerEx) { Source = "fakeSource" };
var expected = "<strong>fakeMessage</strong><br /><br />";
Assert.AreEqual(expected, ExceptionsHelper.BuildExceptionString(ex));
}
示例13: doesnt_Run_test_when_establish_context_fails
public void doesnt_Run_test_when_establish_context_fails()
{
var ex = new NotImplementedException();
contextMock.Setup(x => x.Before()).Throws(ex);
RunTest();
testMock.Verify(x => x.Run(TestResult), Times.Never());
}
示例14: report_AfterFailure_if_excpetion_raished_during_cleanup
public void report_AfterFailure_if_excpetion_raished_during_cleanup()
{
var ex = new NotImplementedException();
contextMock.Setup(x => x.After(TestResult)).Throws(ex);
RunTest();
testResultMock.Verify(x => x.AfterFailure(ex));
}
示例15: no_conversion_errors_but_the_action_blows_up
public void no_conversion_errors_but_the_action_blows_up()
{
var ex = new NotImplementedException();
theLineGrammar.Execute(values, context).Throws(ex);
afterExecuting();
context.AssertTheOnlyResultIs(new StepResult(values.id, ResultStatus.error){error = ex.ToString(), position = thePosition});
}