This document discusses testing the integration between services. It covers unit testing, integration testing, and end-to-end testing. It also discusses architectures like hexagonal and build pipelines. Key aspects covered include testing synchronous and asynchronous interactions over HTTP, REST, and Kafka. Schemas and data representations for payments are defined.
15. Testes de integração
(fact "a new account is created on April”
(as-of (time/date-time 2020 4 2 13 37 42)
(next-state) => :account-created))
(fact "a purchase is made some days later”
(as-of (time/date-time 2020 4 4 13 37 0)
(next-state) => :with-txs))
(fact "as well as a payment”
(as-of (time/date-time 2020 4 6 13 37 0)
(next-state) => :paid-some-money))
(fact "they are all there”
(as-of (time/date-time 2020 4 9 13 37 0)
(next-state) => :with-stuff-appearing-on-the-bill))
(fact "we close the bill”
(as-of (time/date-time 2020 4 5 13 37 0)
(next-state) => :bill-closed))
(fact "two bills we now have”
(as-of (time/date-time 2020 6 8 13 37 0)
(next-state) => :bill-containing-new-charge))
16. Testes ponta a ponta
MasterCard-client
MasterCard-mock
Aquisição
Contas
Notificações
17. Testes ponta a ponta
describe "until account creation" do
it "adds a prospect to the waiting list" do...end
it "initiates an account request on behalf of a prospect" do...end
it "gets all account requests associated with the prospect" do...end
it "the new account request has a waiting status" do...end
it "sends an email invitation, including an invite code" do...end
it "fails to start the acquisition process with the wrong invite-code" do...end
it "engages, using the invite-code from the email" do...end
#...
end