コード例 #1
0
        public void Method_Implementation_Success()
        {
            SomeTestClass someTest = new SomeTestClass();

            someTest.Property      = 10;
            someTest.OtherProperty = 5;

            int result = someTest.DummyCalculation(someTest);

            Assert.AreEqual(400, result);
            Assert.AreEqual(20, someTest.Property);
            Assert.AreEqual(20, someTest.OtherProperty);
        }
コード例 #2
0
 public int DummyCalculation(SomeTestClass someTest)
 {
     return(someTest.Property * OtherProperty);
 }