|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/quarkus-rest-api-and-unit-tests/
课程评论:没有评论
**课程总结:Quarkus - 简单的 REST API 和 JUnit 5 单元测试** 本课程旨在帮助您快速、客观地掌握 Java 生态系统中的 Quarkus 框架。您将学习如何使用 Quarkus 创建一个包含 GET 和 POST 方法的简单 RESTful API,并为 Controller 和 Service 层编写单元测试。 **核心内容:** * **REST API 开发:** * 演示了如何使用 Quarkus 框架创建简单的 REST API。 * 内容涵盖了创建 Company Entity,并利用 JPA/Hibernate 注解来处理数据。 * 遵循 MVC(Model View Controller)设计模式,将 REST API 分离为 Controller 和 Service 层。 * 使用 Postman 对创建的 REST API 进行请求测试。 * **单元测试:** * 深入理解单元测试的重要性。 * 使用 JUnit 5(Java 最常用的测试框架)为 REST API 的 Controller 和 Service 层编写单元测试。 * 测试内容包括验证 API Endpoints 的路径和接收到的响应。 * 为 Service 类编写单元测试,以验证数据处理、业务逻辑以及模拟数据库数据持久化的测试。 **通过本课程,您将能够:** * 熟练运用 Quarkus 框架开发 RESTful API。 * 掌握为 Java 应用编写有效的单元测试的技巧。 * 理解并实践 MVC 架构模式。 * 提升您的 Java 开发技能,并了解 Quarkus 框架的强大之处。
Enhance your knowledge of the Java Ecosystem - Discover the Quarku Framework FeaturesA quick and objective course, straight to the point!In this course you will learn in an objective and practical way how to create a simple REST API that uses GET and POST methods and you will also learn how to create Unit Tests for your Controller and Service layer classes.Let's use as an example the creation of a Company Entity with some sample data, for this we will make use of JPA/Hibernate annotations that are inserted in the context of the Quarkus Framework.In the following steps, we will separate the REST API into controller and service layers, respecting the MVC model (Model View Controller) and finally, we will use Postman to make requests to this REST API.Then, we move on to the unit testing phase using the updated version of JUnit, the most widely used Testing Framework in the Java world.In this phase we will create unit tests that validate the paths of our endpoints and the responses received.Finally, let's create unit tests for our Service layer. Here we test data processing and business rules and also create a test that simulates data persistence in the database.Topics:Understanding the importance of Unit Testing;Creating a simple REST API with Java + Quarkus Framework;Testing the API with Postman;Creating unit tests for REST API endpoints;Creating unit tests for Service classes;Creating tests that validate data in the database.