예제 #1
0
        public void Test_2_Update()
        {
            //Act
            var response = CodingImplementaion.Update() as OkNegotiatedContentResult <IEnumerable <Coding> >;

            //Assert
            Assert.IsNotNull(response);
        }
예제 #2
0
        public void Test_5_Delete()
        {
            //Act
            var deleteResult = CodingImplementaion.Delete() as OkNegotiatedContentResult <IEnumerable <Guid> >;

            //Assert
            Assert.IsNotNull(deleteResult);
        }
예제 #3
0
        public void Test_4_GetByID()
        {
            // Act
            var codingResult = CodingImplementaion.GetByID() as OkNegotiatedContentResult <Coding>;

            // Assert
            Assert.IsNotNull(codingResult);
        }
예제 #4
0
        public void Test_3_GetAll()
        {
            // Act
            var codingResult = CodingImplementaion.GetAll() as OkNegotiatedContentResult <IEnumerable <Coding> >;

            // Assert
            Assert.IsNotNull(codingResult);
        }
예제 #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);
        }
예제 #6
0
        internal static IHttpActionResult Insert()
        {
            var imageResult = ImageImplementaion.GetAll() as OkNegotiatedContentResult <IEnumerable <apiModel.Image> >;
            var imageList   = imageResult.Content.ToList();

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

            var ImageAssignments = imageList.Select(t => new ImageAssignment
            {
                ID       = Guid.NewGuid(),
                ImageID  = t.ID,
                CodingID = codingList[0].ID,
            }).ToList();

            var response = baseController.Insert(ImageAssignments);

            return(response);
        }
예제 #7
0
        internal static IHttpActionResult Insert()
        {
            var categoryResult = CategoryImplementaion.GetAll() as OkNegotiatedContentResult <IEnumerable <Category> >;
            var categorieList  = categoryResult.Content.ToList();

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

            var categoryAssignments = categorieList.Select(t => new CategoryAssignment
            {
                ID         = Guid.NewGuid(),
                CategoryID = t.ID,
                CodingID   = codingList[0].ID,
            }).ToList();

            var response = baseController.Insert(categoryAssignments);

            return(response);
        }