public void GetById(string name) { VisitType visitType = new VisitType(); visitType.Name = name; visitType.Add(); Assert.That(visitType.Id, Is.Not.EqualTo(Guid.Empty)); VisitType readVisitType = VisitType.GetById(visitType.Id); Compare(visitType, readVisitType); visitType.Delete(); }
public void Create(string name) { int count = VisitType.GetAll().Count; VisitType visitType = new VisitType(); visitType.Name = name; visitType.Add(); Assert.That(visitType.Id, Is.Not.EqualTo(Guid.Empty)); VisitType readVisitType = VisitType.GetById(visitType.Id); Compare(visitType, readVisitType); int count2 = VisitType.GetAll().Count; Assert.That(count, Is.EqualTo(count2 - 1)); visitType.Delete(); }