Skip to content

Commit

Permalink
♻️ refactor: upgrade dependencies #4
Browse files Browse the repository at this point in the history
  • Loading branch information
pnguyen215 committed Aug 17, 2024
1 parent 4f3d219 commit ef02526
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 23 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web
// The "spring-boot-configuration-processor" library, version 2.7.18,
// is a Spring Boot module that processes configuration metadata annotations to generate metadata files and aid in auto-configuration of Spring applications.
implementation group: 'org.springframework.boot', name: 'spring-boot-configuration-processor', version: '2.7.18'
// The "spring-boot-starter-test" module version 2.7.18 provides a comprehensive test framework for Spring Boot applications.
// It includes JUnit, Mockito, Spring TestContext Framework, and other useful tools for testing Spring applications.
// The starter integrates these components seamlessly, making it easier to write and execute tests in a Spring Boot environment.
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '2.7.18'
// Mockito JUnit Jupiter version 3.12.4: This library integrates Mockito with JUnit 5,
// enabling developers to write unit tests using Mockito's powerful mocking features.
// It's designed to work specifically with the JUnit 5 platform, allowing for advanced testing capabilities.
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.12.4'
// The "spring-boot-starter-amqp" library, version 2.7.18, is a Spring Boot starter module that simplifies the integration of AMQP (Advanced Message Queuing Protocol) messaging with Spring applications.
// It provides essential dependencies and configurations for working with messaging systems like RabbitMQ, enabling developers to build robust and scalable message-driven applications with minimal setup.
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-amqp', version: '2.7.18'
Expand Down
12 changes: 12 additions & 0 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,19 @@ dependencies {
// The "spring-boot-configuration-processor" library, version 2.7.18,
// is a Spring Boot module that processes configuration metadata annotations to generate metadata files and aid in auto-configuration of Spring applications.
implementation group: 'org.springframework.boot', name: 'spring-boot-configuration-processor', version: '2.7.18'
// The "spring-boot-starter-test" module version 2.7.18 provides a comprehensive test framework for Spring Boot applications.
// It includes JUnit, Mockito, Spring TestContext Framework, and other useful tools for testing Spring applications.
// The starter integrates these components seamlessly, making it easier to write and execute tests in a Spring Boot environment.
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '2.7.18'
// Mockito JUnit Jupiter version 3.12.4: This library integrates Mockito with JUnit 5,
// enabling developers to write unit tests using Mockito's powerful mocking features.
// It's designed to work specifically with the JUnit 5 platform, allowing for advanced testing capabilities.
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.12.4'
// The "spring-boot-starter-amqp" library, version 2.7.18, is a Spring Boot starter module that simplifies the integration of AMQP (Advanced Message Queuing Protocol) messaging with Spring applications.
// It provides essential dependencies and configurations for working with messaging systems like RabbitMQ, enabling developers to build robust and scalable message-driven applications with minimal setup.
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-amqp', version: '2.7.18'
}

test {
useJUnitPlatform() // Ensure the JUnit 5 platform is used
}
42 changes: 42 additions & 0 deletions plugin/src/test/groovy/org/rmq4j/Rmq4jConfigTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package org.rmq4j;

import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import org.rmq4j.config.Rmq4jConfig;
import org.rmq4j.service.Rmq4jInsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

@SpringBootTest
public class Rmq4jConfigTest {

@Autowired
private Rmq4jConfig rmq4jConfig;

@Autowired
private Rmq4jInsService rmq4jInsService;

@Test
void testSnapIns() {
rmq4jConfig.snapIns();
verify(rmq4jInsService, times(1)).snapIns();
}

@Configuration
static class TestConfig {
@Bean
public Rmq4jInsService rmq4jInsService() {
return Mockito.mock(Rmq4jInsService.class);
}

@Bean
public Rmq4jConfig rmq4jConfig(Rmq4jInsService rmq4jInsService) {
return new Rmq4jConfig(rmq4jInsService);
}
}
}
23 changes: 0 additions & 23 deletions plugin/src/test/groovy/org/rmq4j/Wizard4jPluginTest.groovy

This file was deleted.

0 comments on commit ef02526

Please sign in to comment.