Hi All,
I hope you can help me with this. I am using a full version of JustMock and am attempting to mock a large class with multiple dependencies. Automocking seemed to be the way to go for this (unit) test. So I referenced the Telerik.JustMock.Container dll in my project, added the proper using statement and wrote the following simple test:
public void TestAutoMock()
{
// Arrange
var autoMockMFContainer = new MockingContainer<MyCustomClass>();
autoMockMFContainer.Instance.EstablishMyEmployee(10000, 2, 100007, 2, true, false);
}
This seems simple enough but it fails with a NullReferenceException. "Instance" is null. I am new to JustMock so I suspect the problem may lie with the project references or some configuration item but I don't know what it is.
Can anyone offer any suggestions as to how I might get the Instance to not be null?
Thanks
MM
I hope you can help me with this. I am using a full version of JustMock and am attempting to mock a large class with multiple dependencies. Automocking seemed to be the way to go for this (unit) test. So I referenced the Telerik.JustMock.Container dll in my project, added the proper using statement and wrote the following simple test:
public void TestAutoMock()
{
// Arrange
var autoMockMFContainer = new MockingContainer<MyCustomClass>();
autoMockMFContainer.Instance.EstablishMyEmployee(10000, 2, 100007, 2, true, false);
}
This seems simple enough but it fails with a NullReferenceException. "Instance" is null. I am new to JustMock so I suspect the problem may lie with the project references or some configuration item but I don't know what it is.
Can anyone offer any suggestions as to how I might get the Instance to not be null?
Thanks
MM