tests.cs

来自「.NET 2.0模式开发实战源代码,使用C#说明」· CS 代码 · 共 29 行

CS
29
字号
using System;using NUnit.Framework;using Chap03;// mono ../../apps/nunit-2.2.0/bin/nunit-console.exe chap03.exe[TestFixture]public class IntroTests {    private string _strHelloAnybodyThere =  "hello anybody there";    [Test]public void SimpleBridge() {        Intention obj = Factory.Instantiate();        Chap03MockObjects.Callback.CBFeedbackString =             new Chap03MockObjects.FeedbackString( this.CallbackSimpleBridge);        obj.Echo( _strHelloAnybodyThere);    }    void CallbackSimpleBridge( string message) {        string test = "From the console " + _strHelloAnybodyThere;        if( message != test) {            throw new Exception();        }    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?