unit testing is performed by which of the following layers.
a) Data layers
b) Business layer
Answers
Answer:
Unit testing the DAL is worth it as mentioned if there is logic in there, for example if using the same StoredProc for insert & update its worth knowing that an insert works, a subsequent call updates the previous and a select returns it and not a list.
Answer:
The answer to the given question is:
a) Data Layers
Explanation:
Unit tests are run in fake or simulated situations and in total isolation. As a result, our Backend API is unknown to the React unit tests, and vice versa. Each application's internal components are being tested to ensure that each component performs as expected. Testing a single React component is an illustration of this; in our example, we'll use a straightforward button.
How can data in the access layer be tested?
You will require a more complicated structure to test the DataAccess Layer. Repository objects will be referenced via the DataAccess Layer. By using the UnitOfWork design pattern, the Repo object will call references from Entity Framework DbSets. You will mimic repository classes when you have established the structure.
#SPJ2