public void AddMethodOK() { ClsServiceCollection AllServices = new ClsServiceCollection(); ClsService AnService = new ClsService(); int PrimaryKey = 0; AnService.ServiceName = "Vale"; AnService.ServiceDescription = "sadf"; AnService.ServicePrice = 40; AllServices.ThisService = AnService; PrimaryKey = AllServices.Add(); AnService.ServiceID = PrimaryKey; AllServices.ThisService.Find(PrimaryKey); Assert.AreEqual(AllServices.ThisService, AnService); AllServices.Delete(); }
public void DeleteMethodOK() { ClsServiceCollection AllServices = new ClsServiceCollection(); ClsService AnService = new ClsService(); int PrimaryKey = 0; AnService.ServiceName = "Vale"; AnService.ServiceDescription = "sadf"; AnService.ServicePrice = 40; AllServices.ThisService = AnService; PrimaryKey = AllServices.Add(); AnService.ServiceID = PrimaryKey; AllServices.ThisService.Find(PrimaryKey); AllServices.Delete(); bool Found = AllServices.ThisService.Find(PrimaryKey); Assert.IsFalse(Found); }