コード例 #1
0
        public void OutString()
        {
            string s = "";

            target.OutStr(out s);
            LastCall.Do(new OutStrDel(OutSayHello));
            mocks.ReplayAll();
            target.OutStr(out s);
            Assert.Equal("Hello", s);
        }
コード例 #2
0
        public void OutString()
        {
            string s = "";

            target.Expect(x => x.OutStr(out s))
            .DoInstead(new OutStrDel(OutSayHello));

            target.OutStr(out s);

            Assert.Equal("Hello", s);
        }