Пример #1
0
        public void Test_1_Insert()
        {
            //Act
            var response = DetailImplementaion.Insert() as OkNegotiatedContentResult <IEnumerable <apiModel.Detail> >;

            //Assert
            Assert.IsNotNull(response);
        }
Пример #2
0
        public void Test_4_GetByID()
        {
            // Act
            var detailResult = DetailImplementaion.GetByID() as OkNegotiatedContentResult <apiModel.Detail>;

            // Assert
            Assert.IsNotNull(detailResult);
        }
Пример #3
0
        public void Test_5_Delete()
        {
            //Act
            var deleteResult = DetailImplementaion.Delete() as OkNegotiatedContentResult <IEnumerable <Guid> >;

            //Assert
            Assert.IsNotNull(deleteResult);
        }
Пример #4
0
        public void Test_3_GetAll()
        {
            // Act
            var detailResult = DetailImplementaion.GetAll() as OkNegotiatedContentResult <IEnumerable <apiModel.Detail> >;

            // Assert
            Assert.IsNotNull(detailResult);
        }
Пример #5
0
        internal static IHttpActionResult Insert()
        {
            var detailResult = DetailImplementaion.GetAll() as OkNegotiatedContentResult <IEnumerable <Detail> >;
            var detailList   = detailResult.Content.ToList();

            var codingResult = CodingImplementaion.GetAll() as OkNegotiatedContentResult <IEnumerable <Coding> >;
            var codingList   = codingResult.Content.ToList();

            var DetailAssignments = detailList.Select(t => new DetailAssignment
            {
                ID       = Guid.NewGuid(),
                DetailID = t.ID,
                CodingID = codingList[0].ID,
            }).ToList();

            var response = baseController.Insert(DetailAssignments);

            return(response);
        }