InterclypseInc / fullstack-starter

Interclypse fullstack starter project
2 stars 41 forks source link

Koby - Task #1 Implement the ‘Create’ Data Access Object (DAO) method for Inventory objects with unit testing #4

Open damon-melville opened 2 years ago

damon-melville commented 2 years ago

We need to be able to manage the Inventory objects in a database. We use MongoDB ( docs.mongodb.com/manual/reference ) in order to accomplish this using the Spring Framework's Data Driver for MongoDB ( https://docs.spring.io/spring-data/mongodb/docs/current/reference/html/#reference ). Please review this documentation before starting this ticket!

In addition, optionally review the MongoTemplate documentation here: ( docs.spring.io/spring-data/mongodb/docs/2.1.8.RELEASE/api/org/springframework/data/mongodb/core/MongoTemplate.html )


Your task will be to implement the ‘Create’ DAO method within the InventoryDAO.java file as well as unit test your new method. This method should insert a new Inventory object into the Mongo Collection and set the Mongo ID to null. Please refer to the above MongoTemplate documentation for more information on what to call there.

In order to unit test, you will be using J-Unit. In the src/test/java/… package structure of the same submodule, please create your J-Unit tests for the new method within the InventoryDAOTest.java.

KRB065 commented 2 years ago

Pull request for my branch: https://github.com/KRB065/fullstack-starter/pull/1

KRB065 commented 2 years ago

updated my test to add an assert statement KRB065#2