[Test]
public void TestUserProfileInsert()
{
using (new TestBindingsWrapper("TestBindings", "", new TestModule()))
{
// Setup the mock the dataprovider
MyMocks.MockDataProvider.Setup(x => x.InsertUserProfile(It.IsAny<IUserProfile>())).Returns(1);
IUserProfile up = new UserProfile();
IUserProfileManager manager = new UserProfileManager();
int result = manager.Insert(up);
Assert.AreEqual(1, result);
MyMocks.MockDataProvider.Verify(x => x.InsertUserProfile(up), Times.Once());
}
}
I am using ninject also. It seems since I am setting the return value, what really is being tested, is this a joke or I am missing something?