public void ValidFarm_ShouldPassValidation() { // Arrange Initialise(); // this creates an Farm object with all valid properties //Act try { _context.Farm.Add(farm); _context.EFValidation(); // EF runs all validations except [Remote] } catch (Exception ex) // a valid Farm object should not go here { recordAccepted = false; validationResults = ex.GetBaseException().Message; } finally { Cleanup(); // this removes the Farm object from the EF queue } Assert.True(recordAccepted, validationResults); }