Exemple #1
0
        public async Task EntryTest()
        {
            var entry = new EntryViewModel()
            {
                DestinyAccountNumber = "00000-2",
                OriginAccountNumber  = "00000-1",
                Value = 450
            };
            var payload  = System.Text.Json.JsonSerializer.Serialize(entry);
            var client   = new TestClientProvider()._client;
            var response = await client.PostAsync("/api/v1/accountingentry/create", new StringContent(payload, Encoding.UTF8, "application/json"));

            response.EnsureSuccessStatusCode();
            Assert.Equal(HttpStatusCode.OK, response.StatusCode);
        }
Exemple #2
0
        public async Task CreateAccountTest()
        {
            var account = new AccountViewModel()
            {
                AccountId  = Guid.NewGuid(),
                Number     = "00000-1",
                DateCreate = DateTime.Now,
                Operation  = Domain.Types.OperationType.Insert
            };
            var payload  = System.Text.Json.JsonSerializer.Serialize(account);
            var client   = new TestClientProvider()._client;
            var response = await client.PostAsync("/api/v1/account/create", new StringContent(payload, Encoding.UTF8, "application/json"));

            response.EnsureSuccessStatusCode();
            Assert.Equal(HttpStatusCode.OK, response.StatusCode);
        }