Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

The old way:

Code Block
java
java
[Test]
public void MyOldTest() 
{ 
// Record your expectations here 
Expect.Call(myObject.MyProperty).Return(1);

mocks.ReplayAll();

// do your work here 
int i = myObject.MyProperty;

// check you values

mocks.VerifyAll();

Assert.AreEqual(1, i);

}

The new way:

Code Block
[Test]
public void MyNewTest() 
{ 
// Record your expectations here 
using ( mocks.Record() ) 
{ 
Expect.Call(myObject.MyProperty).Return(1); 
}

// do your work here 
int i; 
using ( mocks.Playback() ) 
{ 
i = myObject.MyProperty; 
}

// check you values 
Assert.AreEqual(1, i); 
}