K
K
kzoper2020-04-19 15:38:27
Software testing
kzoper, 2020-04-19 15:38:27

How to prepare data for testing?

There is a Moq library .
To run tests without using a database, you need to prepare test data.

var card = new Card("owner", "number", "CVV number");
paymentServiceMock.Setup(p => p.Charge(114,card)).Returns(true)

I have found several libraries that can generate test data, such as AutoFixture .
But is there really no way to automatically take the data from the database and use it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question