当前位置: 首页>>代码示例>>C#>>正文


C# System.NotImplementedException类代码示例

本文整理汇总了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.");
 }
开发者ID:TinkerWorX,项目名称:Bridge,代码行数:7,代码来源:NotImplementedExceptionTests.cs

示例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);
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:7,代码来源:SpatialPipelineTests.cs

示例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");
		}
开发者ID:ShuntaoChen,项目名称:SaltarelleCompiler,代码行数:7,代码来源:NotImplementedExceptionTests.cs

示例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");
 }
开发者ID:TinkerWorX,项目名称:Bridge,代码行数:7,代码来源:NotImplementedExceptionTests.cs

示例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");
 }
开发者ID:TinkerWorX,项目名称:Bridge,代码行数:7,代码来源:NotImplementedExceptionTests.cs

示例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);
        }
开发者ID:RyanHauert,项目名称:FubuTransportation,代码行数:8,代码来源:MoveToErrorQueueHandlerTester.cs

示例7: write_exception

        public void write_exception()
        {
            var ex = new NotImplementedException();

            writer.Exception(ex);

            writer.FailureCount.ShouldEqual(1);
        }
开发者ID:RyanHauert,项目名称:FubuTransportation,代码行数:8,代码来源:ScenarioWriterSmokeTester.cs

示例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));
        }
开发者ID:n3wt0n,项目名称:BugGuardian,代码行数:8,代码来源:ExceptionsHelperTests.cs

示例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);
 }
开发者ID:ErikRydgren,项目名称:PluginFramework,代码行数:8,代码来源:UnitTest_PluginSettingException.cs

示例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));
 }
开发者ID:n3wt0n,项目名称:BugGuardian,代码行数:8,代码来源:ExceptionsHelperTests.cs

示例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));
        }
开发者ID:n3wt0n,项目名称:BugGuardian,代码行数:8,代码来源:ExceptionsHelperTests.cs

示例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));
        }
开发者ID:n3wt0n,项目名称:BugGuardian,代码行数:8,代码来源:ExceptionsHelperTests.cs

示例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());
        }
开发者ID:drunkcod,项目名称:Cone,代码行数:9,代码来源:TestExecutorSpec.cs

示例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));
        }
开发者ID:drunkcod,项目名称:Cone,代码行数:9,代码来源:TestExecutorSpec.cs

示例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});
        }
开发者ID:storyteller,项目名称:Storyteller,代码行数:9,代码来源:LinePlanTester.cs


注:本文中的System.NotImplementedException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。