コード例 #1
0
 public void ReadAndWriteSpecialProperty()
 {
     mock.Expect("set_SpecialProperty", "hello", 1);
     mock.Expect("set_SpecialProperty", "world", 2);
     mock.ExpectAndReturn("get_SpecialProperty", "good", 3);
     mock.ExpectAndReturn("get_SpecialProperty", "bye", 4);
     thingy.set_SpecialProperty("hello", 1);
     thingy.set_SpecialProperty("world", 2);
     Assertion.AssertEquals("good", thingy.get_SpecialProperty(3));
     Assertion.AssertEquals("bye", thingy.get_SpecialProperty(4));
     mock.Verify();
 }