Exemple #1
0
        public async Task TestHttpPostAsync()
        {
            var model = new PayrollTypeModelView
            {
                CompanyId       = 1,
                PeriodPaymentId = 2,
                Description     = "TestCreate",
                Notes           = "empty"
            };

            var response = await http.HttpPostAsync("CreatePayrollType", model);

            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
        }
Exemple #2
0
        public async Task TestHttpPutAsync()
        {
            var model1 = new PayrollTypeModelView
            {
                CompanyId       = 1,
                PeriodPaymentId = 2,
                Description     = "TestCreate",
                Notes           = "empty"
            };

            var response1 = await http.HttpPostAsync("CreatePayrollType", model1);

            var model2 = response1.Data <PayrollTypeModelView>();

            model2.Description = "TestUpdate";
            var response2 = await http.HttpPostAsync("UpdatePayrollType", model2);

            Assert.AreEqual(HttpStatusCode.OK, response2.StatusCode);
        }