internal static IHttpActionResult Insert() { var userResult = UserImplementaion.GetAll() as OkNegotiatedContentResult <IEnumerable <User> >; var userList = userResult.Content.ToList(); var products = new List <Receipt>() { new Receipt() { ID = Guid.NewGuid(), Qty = 5, Price = 1000, UserID = userList[0].ID }, new Receipt() { ID = Guid.NewGuid(), Qty = 5, Price = 1000, UserID = userList[0].ID }, new Receipt() { ID = Guid.NewGuid(), Qty = 5, Price = 1000, UserID = userList[0].ID }, }; var response = baseController.Insert(products); return(response); }
public void Test_3_GetAll() { // Act var response = UserImplementaion.GetAll() as OkNegotiatedContentResult <IEnumerable <User> >; // Assert Assert.IsNotNull(response); }