internal static IHttpActionResult Insert() { var receiptResult = ReceiptImplementaion.GetAll() as OkNegotiatedContentResult <IEnumerable <Receipt> >; var receiptList = receiptResult.Content.ToList(); var productResult = ProductImplementaion.GetAll() as OkNegotiatedContentResult <IEnumerable <Product> >; var productList = productResult.Content.ToList(); var receipts = productList.Select(t => new ReceiptItem() { ID = Guid.NewGuid(), ReceiptID = receiptList[0].ID, ProductID = t.ID, Qty = 10, Price = 1000, Description = "Description", Accepted = true, Considerations = "Considerations", WarehouseReceipNo = 123 }).ToList(); var response = baseController.Insert(receipts); return(response); }
public void Test_5_Delete() { //Act var deleteResult = ReceiptImplementaion.Delete() as OkNegotiatedContentResult <IEnumerable <Guid> >; //Assert Assert.IsNotNull(deleteResult); }
public void Test_4_GetByID() { // Act var productResult = ReceiptImplementaion.GetByID() as OkNegotiatedContentResult <Receipt>; // Assert Assert.IsNotNull(productResult); }
public void Test_3_GetAll() { // Act var productResult = ReceiptImplementaion.GetAll() as OkNegotiatedContentResult <IEnumerable <Receipt> >; // Assert Assert.IsNotNull(productResult); }
public void Test_2_Update() { //Act var response = ReceiptImplementaion.Update() as OkNegotiatedContentResult <IEnumerable <Receipt> >; //Assert Assert.IsNotNull(response); }
internal static IHttpActionResult Delete() { ReceiptImplementaion.Delete(); var _users = GetAll() as OkNegotiatedContentResult <IEnumerable <User> >; var userIDs = _users.Content.Select(t => t.ID).ToList(); var response = baseController.Delete(userIDs); return(response); }
internal static IHttpActionResult Delete() { CartItemImplementaion.Delete(); ReceiptImplementaion.Delete(); var _products = GetAll() as OkNegotiatedContentResult <IEnumerable <Product> >; var productIDs = _products.Content.Select(t => t.ID).ToList(); var response = baseController.Delete(productIDs); return(response); }