Still some confused on how exactly things works. let be describe.
Basically im owrikng on a project that is heavilly depended on XPO(DevExpress)
The code above was some like this
public class MainClass:XPBaseObject
{
[Key(true)]
public int I
{
get { return i; }
set { i = value; }
}
private int i = 0;
}
[TestFixture]
public class ClassFixture
{
private Mock stoiheioMock;
[Test]
public void MethodName()
{
MockManager.Init(true);
Mock mock = MockManager.Mock(typeof(MainClass),false);
MainClass mainClass=new MainClass();
mainClass.Save();
mainClass.Save();
Assert.AreEqual(2, mock.GetCallCount("Save"));
that passes ok
but when u replace the XPBaseObject with another abstract class that inherits XPbaseObject then u should do
Assert.AreEqual(2, mock.GetCallCount("Save"));
in order not to fail
Also i have some more questions
1)Does the Mock.GetCallCount method works for properties also? It will be most usefull if it was
2)How to now to which value a property is set