public void ReturnProductWhenValidParameterIsPassed() { //arrange var database = new Models.Database(); var productMock = new Mock <IProduct>(); int id = 0; productMock.SetupGet(x => x.ID).Returns(id); database.AddProduct(productMock.Object); //act var result = database.GetProduct(id); //assert Assert.AreEqual(id, result.ID); }