public async Task Post()
        {
            GarmentComodityViewModel VM = GenerateTestModel();
            var response = await this.Client.PostAsync(URI, new StringContent(JsonConvert.SerializeObject(VM).ToString(), Encoding.UTF8, "application/json"));

            Assert.Equal(HttpStatusCode.Created, response.StatusCode);
        }
        public GarmentComodityViewModel MapToViewModel(GarmentComodity model)
        {
            GarmentComodityViewModel viewModel = new GarmentComodityViewModel();

            PropertyCopier <GarmentComodity, GarmentComodityViewModel> .Copy(model, viewModel);

            return(viewModel);
        }
        public GarmentComodity MapToModel(GarmentComodityViewModel viewModel)
        {
            GarmentComodity model = new GarmentComodity();

            PropertyCopier <GarmentComodityViewModel, GarmentComodity> .Copy(viewModel, model);

            return(model);
        }
Beispiel #4
0
        public GarmentComodityViewModel GetEmptyData()
        {
            GarmentComodityViewModel viewModel = new GarmentComodityViewModel()
            {
                Code = "",
                Name = "",
            };

            return(viewModel);
        }