Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public void Test_3_GetAll()
        {
            // Act
            var response = UserImplementaion.GetAll() as OkNegotiatedContentResult <IEnumerable <User> >;

            // Assert
            Assert.IsNotNull(response);
        }