Reading-notes

2.2. The Repositories :

2.3.

after that u are :

Creating the Resources :

by adding alibrary instance to work , The API returns the JSON object . double-qoute character inside the string represent JSON body at windows . after that the resbonse will received with association resourse has been expoed at liprary endpoint .

so before we creating the association we will send GET request to the endpoit that will return empty object . Now the result of the POST request is a JSON object .

Now ..

Creating the Associations :

After persisting both instances, we can establish the relationship by using one of the association resources. …To remove the Associations , we can call the endpoint with DELETE method, making sure to use the association resource of the owner of the relationship.

what

One-to-Many Relationship analysis !!

In systems analysis, a one-to-many relationship is a type of cardinality that refers to the relationship between two entities A and B in which an element of A may be linked to many elements of B, but a member of B is linked to only one element of A. For instance, think of A as books, and B as pages.

and there is

The Data Model..

To exemplify a one-to-many relationship.

also

we need creat Repository ..

and after that dealing with this data , how ever there is alot thing to do also , like Testing the One-to-One Relationship , Testing the One-to-Many Relationship , and thats it :)

Spring MVC Test Configuration

Enable Spring in Tests with JUnit 5

by adding the @ExtendWith annotation to our test classes and specifying the extension class to load.

The WebApplicationContext Object

WebApplicationContext provides a web application configuration. It loads all the application beans and controllers into the context.

Verify Test Configuration.after all .