public void ShouldBeSetAsInactiveWhenEvaluatedAsInefficient() { Nonconformity nonconformity = new Nonconformity("Controlled materials stored without proper indication."); nonconformity.setAsInefficient(); Assert.Equal(StatusEnum.Inactive, nonconformity.Status); }
public void UpdateAsInefficient(int id) { Nonconformity nonconformity = _context.Nonconformities.FirstOrDefault(p => p.Id == id); nonconformity.setAsInefficient(); _context.Nonconformities.Update(nonconformity); _context.SaveChanges(); }