public void ShouldNot_PutVenue_IdMismatch() { Venue testVenue = new Venue { Id = 1, Address1 = "Addr1", Address2 = "Addr2", Address3 = "Addr3", Address4 = "Addr4", Address5 = "Addr5", Description = "Test", ContactPhone = "01234567898", Image = "", LatLong = "0,0", Name = "Test", Instagram = "inst", Facebook = "fb", Twitter = "tw" }; Mock <IUnitOfWork> mock = new Mock <IUnitOfWork>(); mock.Setup(f => f.Venues.Update(testVenue)).Returns(true); VenuesController controller = new VenuesController(mock.Object); var venues = controller.PutVenue(2, testVenue); Assert.IsType <BadRequestResult>(venues); }