當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。