public void ValidTask_ShouldPass() { Initialize(); try { _context.TaskList.Add(taskList); _context.EFValidation(); } catch (Exception e) { recordAccepted = false; validationResults = e.GetBaseException().Message; } finally { Cleanup(); } Assert.True(recordAccepted, validationResults); }
public void Project_ValidProject_ShouldPass() { Initialise(); try { _context.Project.Add(project); _context.EFValidation(); } catch (Exception e) { recordAccepted = false; validationResults = e.GetBaseException().Message; } finally { Cleanup(); } Assert.True(recordAccepted, validationResults); }
public void FirstNameValidations_ShouldNotPass(string value) { Initialize(); person.FirstName = value; try { _context.Person.Add(person); _context.EFValidation(); } catch (Exception e) { recordAccepted = false; validationResults = e.GetBaseException().Message; } finally { Cleanup(); } Assert.False(recordAccepted, validationResults); }