diff --git a/.github/workflows/acceptable-licenses.txt b/.github/workflows/acceptable-licenses.txt index cf1d52cfb..4baebb5d4 100644 --- a/.github/workflows/acceptable-licenses.txt +++ b/.github/workflows/acceptable-licenses.txt @@ -50,4 +50,5 @@ W3C license jQuery license MIT -MIT-0 \ No newline at end of file +MIT-0 +Unicode-3.0 diff --git a/.github/workflows/cve-scanning.yml b/.github/workflows/cve-scanning.yml index b02854a59..41dd3e513 100644 --- a/.github/workflows/cve-scanning.yml +++ b/.github/workflows/cve-scanning.yml @@ -28,7 +28,7 @@ jobs: - name: Build with Maven run: mvn install -DskipTests - name: Depcheck - uses: dependency-check/Dependency-Check_Action@1.1.0 + uses: dependency-check/Dependency-Check_Action@main id: Depcheck env: JAVA_HOME: /opt/jdk @@ -41,8 +41,6 @@ jobs: --suppression ./.github/workflows/allow-list.xml --failOnCVSS 5 --enableRetired - --ossIndexUsername ${{ secrets.SONATYPE_INDEX_USER }} - --ossIndexPassword ${{ secrets.SONATYPE_INDEX_PASSWORD }} - name: Upload Test results if: ${{ always() }} diff --git a/README.md b/README.md index ea2da2b5a..ba6a310ba 100644 --- a/README.md +++ b/README.md @@ -1,172 +1,183 @@ -[![FINOS - Active](https://cdn.jsdelivr.net/gh/finos/contrib-toolbox@master/images/badge-active.svg)](https://community.finos.org/docs/governance/Software-Projects/stages/active) -[![codecov](https://codecov.io/gh/finos/spring-bot/branch/spring-bot-develop/graph/badge.svg?token=CSa0aaqYD0)](https://codecov.io/gh/finos/spring-bot) -![License](https://img.shields.io/github/license/finos/spring-bot) -![build](https://github.com/finos/spring-bot/actions/workflows/build.yml/badge.svg) -[![javadoc](https://javadoc.io/badge2/org.finos.springbot/chat-workflow/javadoc.svg)](https://javadoc.io/doc/org.finos.springbot/chat-workflow) -[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5948/badge)](https://bestpractices.coreinfrastructure.org/projects/5948) - -| Version | Number | Status | -| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Spring Bot (Spring Boot V3) | [![Maven Central](https://img.shields.io/maven-central/v/org.finos.springbot/spring-bot)](https://search.maven.org/search?q=org.finos.springbot) | ![build](https://github.com/finos/spring-bot/actions/workflows/build.yml/badge.svg) | -| Spring Bot (Spring Boot V2) | [![Maven Central](https://img.shields.io/maven-central/v/org.finos.springbot/spring-bot?versionPrefix=9)](https://search.maven.org/search?q=org.finos.springbot) | ![build](https://github.com/finos/spring-bot/actions/workflows/build.yml/badge.svg) | -| Symphony Java Toolkit | [![Maven Central](https://img.shields.io/maven-central/v/org.finos.symphony.toolkit/symphony-java-toolkit)](https://search.maven.org/search?q=org.finos.symphony.toolkit) | ![build](https://github.com/finos/spring-bot/actions/workflows/build.yml/badge.svg?branch=symphony-java-toolkit-master) | - -![Spring Bot Logo](logo.png) - -# Spring Bot - -Spring Bot is a set of [Spring Boot](https://spring.io/projects/spring-boot) starters designed for building chat bots in Java & Kotlin. - -## What Is It? - -- Spring Bot provides a simple annotation-based way to create chat bots. -- It currently supports Symphony and Microsoft Teams. -- It allows you to build your chatbot using annotations, binding messages to methods in a similar way to [Spring Web MVC](https://docs.spring.io/spring-framework/docs/6.0.x/reference/html/web.html#spring-web) -- [READ THE FINOS CASE STUDY HERE](https://www.finos.org/deutsche-bank-spring-bot-case-study) - -## Why Is This Important? - -πŸ§‘πŸ½β€πŸ€β€πŸ§‘πŸ½ **Multiple Platforms** - -Like it or not, most of us find ourselves working in environments with _multiple chat platforms_. As bot developers, we need to be able to reach users irrespective of which platform they are on. - -β›… **Work at a higher level** - -Developers of chat-bots are not well-supported with Open-Source tooling. Too much effort gets spent on low-level message-handling, which could easily be done by a library. - -πŸ”’ **Avoid Lock-In** - -Most bot development tools are commercial. If you build bots with them you are locked into paying license fees forever. For example, the Microsoft Bot Framework support multiple chat platforms at the expense of locking you into the Azure ecosystem. - -## How Does It Work? - -This is best described at [springbot.finos.org](https://springbot.finos.org). This takes you through the process of building several example bots from scratch. - -## What Are The Benefits? - -### βœ”οΈ Build Bots that run on multiple platforms - -> By using Spring Bot's abstractions, you can target both Symphony and Microsoft Teams. Depending on demand (or contributions) further platforms may be supported in the future. In the tutorials we show how to build a [claim processing bot](https://springbot.finos.org/getting-started.html) which runs a workflow concurrently on Teams and Symphony. - -### βœ”οΈFocus On Business Logic - -> Spring Bot handles marshalling from/to the underlying message formats on your platform. - -### βœ”οΈ Advanced Templating - -> Templates are automatically generated for any Java objects (POJOs) that you want to send to the chat platform. This allows users to read/edit objects and send them back to your bot. Additionally, templates are fully customizable on a per-platform basis, currently using Freemarker and Thymeleaf. - -### βœ”οΈAnnotations Make It Super-Easy - -> As the [tutorials](https://springbot.finos.org) show, you just drop a few annotations into your application to enable it to read and send chat messages. - -### βœ”οΈ A Mature Ecosystem - -> By building bots in a mature ecosystem like Java, you avoid all of the usual issues with no-code and low-code environments. Java is a mature language with every conceivable library, a wealth of Stack-Overflow QA's and a convincing DevOps/Deployment story (Java runs anywhere). - -### βœ”οΈ Avoid The Lock-In Trap - -> Most low-code / no-code platforms are a trap: they are looking to lock-in customers and revenue streams by persuading you to build your business with them as a dependency. Spring Bot is open-source so this is literally a non-issue. - -## Watch It In Action - -[![Short 3 minute intro](https://img.youtube.com/vi/TyaGdGmqeGo/hqdefault.jpg)](https://youtu.be/TyaGdGmqeGo) - -## Plenty Of Example Bots To Learn From - -This project contains various example bots that were (originally) written at Deutsche Bank in response to real use-cases. However, we felt they were general enough to warrant Open-Sourcing and including as code to work from. - -πŸ‘ All of these bots work on Microsoft Teams and Symphony, and are deployed into maven central as executable jars. - -### πŸ€– Poll Bot - -A bot for running polls in a Symphony/Teams chat room. πŸ‘ _Production Ready_ - -- [View the README](tools/poll-bot/README.md) - -### πŸ€– News (RSS) Bot - -A bot for feeding news into a Symphony/Teams chat room. πŸ‘ _Production Ready_ - -- [View the README](tools/rss-bot/README.md) - -### πŸ€– Reminder Bot - -Reads the contents of a room and creates reminders based on future events mentioned therein. πŸ‘ _Production Ready_ - -- [View the README](tools/reminder-bot/README.md) - -## Plenty of Tutorials / Demo Code - -Inside the `/demos` directory you can see three example bots: - -- `demo-bot` : The "Hello World" of Spring Bot -- `todo-bot` : Runs a simple todo-list inside a chat room on Teams or Symphony. -- `room-bot` : A room broadcasting bot, that shows how to use the chat dropdown, and address messages across Teams and Symphony. -- `claim-bot`: An example of an expense-claim workflow running across Teams and Symphony concurrently. -- `custom-help-bot`: Shows you how you can override built-in beans (like the `HelpController`) to change the functionality of Spring Bot. - -Tutorials for building these and the reference guide are found here: [Spring Bot](https://springbot.finos.org) - -# License - -Copyright 2022 FINOS - -Distributed under the Apache License, Version 2.0. - -SPDX-License-Identifier: Apache-2.0 - -# Vulnerabilities / Security - -Please see our [Security Policy](SECURITY.md). - -# How To Contribute - -We are always looking for helpful contributors! You can check out the [Good First Issues](https://github.com/finos/spring-bot/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) or our [Contributing Guidelines](CONTRIBUTING.md) page for more details. - -We have a [weekly Spring Bot project meeting](https://calendar.google.com/calendar/u/0/embed?src=finos.org_fac8mo1rfc6ehscg0d80fi8jig@group.calendar.google.com&ctz=America/New_York) which you can attend. Minutes are [held as issues](https://github.com/finos/spring-bot/issues). - -# Roadmap - -The spring bot roadmap is a number of tagged issues that we are working on _next_. - -You can view the roadmap issues [here](https://github.com/finos/spring-bot/issues?q=is%3Aissue+is%3Aopen+label%3Aroadmap). - -# For Maintainers - -## Branches - -There are two main branches: - -- `spring-bot-master`: new code for the multi-platform Symphony / Microsoft Teams bot builder -- `symphony-java-toolkit-master`: legacy code for when this project only supported symphony. - -## Releasing This Project - -In order to do a release: - -1. Changes.md - -- Update this file to include details of the release. - -2. On Releaser's machine: - -``` -# on spring-bot-master branch -mvn clean test -mvn versions:set -DnewVersion=.. -DartifactId=\* -DgroupId=\* -mvn -DskipTests clean test source:jar javadoc:javadoc deploy -P symphony-release -mvn versions:set -DnewVersion=..-SNAPSHOT -DartifactId=\* -DgroupId=\* -# then PR spring-bot-master branch with the new version number -``` - -3. SECURITY.md - -- Update this with new version numbers if needed. - -4. On `oss.sonatype.org` - -- Close the Staging Repository -- Release it. - -5. Perform release on github with same number +[![FINOS - Active](https://cdn.jsdelivr.net/gh/finos/contrib-toolbox@master/images/badge-active.svg)](https://community.finos.org/docs/governance/Software-Projects/stages/active) +[![codecov](https://codecov.io/gh/finos/spring-bot/branch/spring-bot-develop/graph/badge.svg?token=CSa0aaqYD0)](https://codecov.io/gh/finos/spring-bot) +![License](https://img.shields.io/github/license/finos/spring-bot) +![build](https://github.com/finos/spring-bot/actions/workflows/build.yml/badge.svg) +[![javadoc](https://javadoc.io/badge2/org.finos.springbot/chat-workflow/javadoc.svg)](https://javadoc.io/doc/org.finos.springbot/chat-workflow) +[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5948/badge)](https://bestpractices.coreinfrastructure.org/projects/5948) + +| Version | Number | Status | +| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| Spring Bot (Spring Boot V4) | [![Maven Central](https://img.shields.io/maven-central/v/org.finos.springbot/spring-bot)](https://central.sonatype.com/search?q=org.finos.springbot&smo=true) | ![build](https://github.com/finos/spring-bot/actions/workflows/build.yml/badge.svg) | +| Spring Bot (Spring Boot V3) | [![Maven Central](https://img.shields.io/maven-central/v/org.finos.springbot/spring-bot?versionPrefix=10)](https://central.sonatype.com/search?q=org.finos.springbot&smo=true) | ![build](https://github.com/finos/spring-bot/actions/workflows/build.yml/badge.svg) | +| Spring Bot (Spring Boot V2) | [![Maven Central](https://img.shields.io/maven-central/v/org.finos.springbot/spring-bot?versionPrefix=9)](https://central.sonatype.com/search?q=org.finos.springbot&smo=true) | ![build](https://github.com/finos/spring-bot/actions/workflows/build.yml/badge.svg) | +| Symphony Java Toolkit | [![Maven Central](https://img.shields.io/maven-central/v/org.finos.symphony.toolkit/symphony-java-toolkit)](https://central.sonatype.com/search?q=org.finos.symphony.toolkit&smo=true) | ![build](https://github.com/finos/spring-bot/actions/workflows/build.yml/badge.svg?branch=symphony-java-toolkit-master) | + +![Spring Bot Logo](logo.png) + +# Spring Bot + +Spring Bot is a set of [Spring Boot](https://spring.io/projects/spring-boot) starters designed for building chat bots in Java & Kotlin. + +## What Is It? + +- Spring Bot provides a simple annotation-based way to create chat bots. +- It currently supports Symphony and Microsoft Teams. +- It allows you to build your chatbot using annotations, binding messages to methods in a similar way to [Spring Web MVC](https://docs.spring.io/spring-framework/docs/6.0.x/reference/html/web.html#spring-web) +- [READ THE FINOS CASE STUDY HERE](https://www.finos.org/deutsche-bank-spring-bot-case-study) + +## Why Is This Important? + +πŸ§‘πŸ½β€πŸ€β€πŸ§‘πŸ½ **Multiple Platforms** + +Like it or not, most of us find ourselves working in environments with _multiple chat platforms_. As bot developers, we need to be able to reach users irrespective of which platform they are on. + +β›… **Work at a higher level** + +Developers of chat-bots are not well-supported with Open-Source tooling. Too much effort gets spent on low-level message-handling, which could easily be done by a library. + +πŸ”’ **Avoid Lock-In** + +Most bot development tools are commercial. If you build bots with them you are locked into paying license fees forever. For example, the Microsoft Bot Framework support multiple chat platforms at the expense of locking you into the Azure ecosystem. + +## How Does It Work? + +This is best described at [springbot.finos.org](https://springbot.finos.org). This takes you through the process of building several example bots from scratch. + +## What Are The Benefits? + +### βœ”οΈ Build Bots that run on multiple platforms + +> By using Spring Bot's abstractions, you can target both Symphony and Microsoft Teams. Depending on demand (or contributions) further platforms may be supported in the future. In the tutorials we show how to build a [claim processing bot](https://springbot.finos.org/getting-started.html) which runs a workflow concurrently on Teams and Symphony. + +### βœ”οΈFocus On Business Logic + +> Spring Bot handles marshalling from/to the underlying message formats on your platform. + +### βœ”οΈ Advanced Templating + +> Templates are automatically generated for any Java objects (POJOs) that you want to send to the chat platform. This allows users to read/edit objects and send them back to your bot. Additionally, templates are fully customizable on a per-platform basis, currently using Freemarker and Thymeleaf. + +### βœ”οΈAnnotations Make It Super-Easy + +> As the [tutorials](https://springbot.finos.org) show, you just drop a few annotations into your application to enable it to read and send chat messages. + +### βœ”οΈ A Mature Ecosystem + +> By building bots in a mature ecosystem like Java, you avoid all of the usual issues with no-code and low-code environments. Java is a mature language with every conceivable library, a wealth of Stack-Overflow QA's and a convincing DevOps/Deployment story (Java runs anywhere). + +### βœ”οΈ Avoid The Lock-In Trap + +> Most low-code / no-code platforms are a trap: they are looking to lock-in customers and revenue streams by persuading you to build your business with them as a dependency. Spring Bot is open-source so this is literally a non-issue. + +## Watch It In Action + +[![Short 3 minute intro](https://img.youtube.com/vi/TyaGdGmqeGo/hqdefault.jpg)](https://youtu.be/TyaGdGmqeGo) + +## Plenty Of Example Bots To Learn From + +This project contains various example bots that were (originally) written at Deutsche Bank in response to real use-cases. However, we felt they were general enough to warrant Open-Sourcing and including as code to work from. + +πŸ‘ All of these bots work on Microsoft Teams and Symphony, and are deployed into maven central as executable jars. + +### πŸ€– Poll Bot + +A bot for running polls in a Symphony/Teams chat room. πŸ‘ _Production Ready_ + +- [View the README](tools/poll-bot/README.md) + +### πŸ€– News (RSS) Bot + +A bot for feeding news into a Symphony/Teams chat room. πŸ‘ _Production Ready_ + +- [View the README](tools/rss-bot/README.md) + +### πŸ€– Reminder Bot + +Reads the contents of a room and creates reminders based on future events mentioned therein. πŸ‘ _Production Ready_ + +- [View the README](tools/reminder-bot/README.md) + +## Plenty of Tutorials / Demo Code + +Inside the `/demos` directory you can see three example bots: + +- `demo-bot` : The "Hello World" of Spring Bot +- `todo-bot` : Runs a simple todo-list inside a chat room on Teams or Symphony. +- `room-bot` : A room broadcasting bot, that shows how to use the chat dropdown, and address messages across Teams and Symphony. +- `claim-bot`: An example of an expense-claim workflow running across Teams and Symphony concurrently. +- `custom-help-bot`: Shows you how you can override built-in beans (like the `HelpController`) to change the functionality of Spring Bot. + +Tutorials for building these and the reference guide are found here: [Spring Bot](https://springbot.finos.org) + +# License + +Copyright 2022 FINOS + +Distributed under the Apache License, Version 2.0. + +SPDX-License-Identifier: Apache-2.0 + +# Vulnerabilities / Security + +Please see our [Security Policy](SECURITY.md). + +# How To Contribute + +We are always looking for helpful contributors! You can check out the [Good First Issues](https://github.com/finos/spring-bot/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) or our [Contributing Guidelines](CONTRIBUTING.md) page for more details. + +We have a [weekly Spring Bot project meeting](https://calendar.google.com/calendar/u/0/embed?src=finos.org_fac8mo1rfc6ehscg0d80fi8jig@group.calendar.google.com&ctz=America/New_York) which you can attend. Minutes are [held as issues](https://github.com/finos/spring-bot/issues). + +# Roadmap + +The spring bot roadmap is a number of tagged issues that we are working on _next_. + +You can view the roadmap issues [here](https://github.com/finos/spring-bot/issues?q=is%3Aissue+is%3Aopen+label%3Aroadmap). + +# For Maintainers + +## Branches + +There are two main branches: + +- `spring-bot-master`: new code for the multi-platform Symphony / Microsoft Teams bot builder +- `symphony-java-toolkit-master`: legacy code for when this project only supported symphony. + +## Releasing This Project + +In order to do a release: + +1. Changes.md + +- Update this file to include details of the release. + +2. On Releaser's machine: + +``` +# on spring-bot-master branch +mvn clean test +mvn versions:set -DnewVersion=.. -DartifactId=\* -DgroupId=\* +mvn -DskipTests clean test source:jar javadoc:javadoc deploy -P symphony-release +mvn versions:set -DnewVersion=..-SNAPSHOT -DartifactId=\* -DgroupId=\* +# then PR spring-bot-master branch with the new version number +``` +OR + +``` +#create your version tag and push that tag on spring-bot-master branch +mvn clean test +mvn versions:set -DnewVersion=.. -DartifactId=\* -DgroupId=\* +git tag .. +git push origin .. +mvn versions:set -DnewVersion=..-SNAPSHOT -DartifactId=\* -DgroupId= +``` + +3. SECURITY.md + +- Update this with new version numbers if needed. + +4. On `oss.sonatype.org` + +- Close the Staging Repository +- Release it. + +5. Perform release on github with same number diff --git a/demos/claim-bot/pom.xml b/demos/claim-bot/pom.xml index cf2e8764c..ddbf7adb8 100644 --- a/demos/claim-bot/pom.xml +++ b/demos/claim-bot/pom.xml @@ -6,7 +6,7 @@ org.finos.springbot spring-bot - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT ../.. @@ -33,12 +33,12 @@ org.finos.springbot symphony-bdk-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.finos.springbot teams-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.apache.commons diff --git a/demos/custom-help-bot/pom.xml b/demos/custom-help-bot/pom.xml index 9c000afce..d04dba4fd 100644 --- a/demos/custom-help-bot/pom.xml +++ b/demos/custom-help-bot/pom.xml @@ -7,7 +7,7 @@ org.finos.springbot spring-bot - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT ../../pom.xml @@ -29,13 +29,13 @@ org.finos.springbot symphony-bdk-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT compile org.finos.springbot teams-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT compile diff --git a/demos/demo-bot/pom.xml b/demos/demo-bot/pom.xml index 3316b1647..c61db86bf 100644 --- a/demos/demo-bot/pom.xml +++ b/demos/demo-bot/pom.xml @@ -7,7 +7,7 @@ org.finos.springbot spring-bot - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT ../../pom.xml @@ -28,13 +28,13 @@ org.finos.springbot symphony-bdk-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT compile org.finos.springbot teams-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT compile diff --git a/demos/rooms-bot/pom.xml b/demos/rooms-bot/pom.xml index 93d07af8f..8e8dd76e0 100644 --- a/demos/rooms-bot/pom.xml +++ b/demos/rooms-bot/pom.xml @@ -6,7 +6,7 @@ org.finos.springbot spring-bot - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT ../../pom.xml @@ -23,12 +23,12 @@ org.finos.springbot symphony-bdk-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.finos.springbot teams-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/demos/todo-bot/pom.xml b/demos/todo-bot/pom.xml index ec4103c52..5b8e26a44 100644 --- a/demos/todo-bot/pom.xml +++ b/demos/todo-bot/pom.xml @@ -6,7 +6,7 @@ org.finos.springbot spring-bot - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT ../.. @@ -23,12 +23,12 @@ org.finos.springbot symphony-bdk-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.finos.springbot teams-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.apache.commons diff --git a/libs/chat-workflow-coverage/pom.xml b/libs/chat-workflow-coverage/pom.xml index 3b3b31adf..ed19ff536 100644 --- a/libs/chat-workflow-coverage/pom.xml +++ b/libs/chat-workflow-coverage/pom.xml @@ -10,7 +10,7 @@ org.finos.springbot spring-bot - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT ../.. @@ -56,32 +56,32 @@ org.finos.springbot chat-workflow - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.finos.springbot chat-workflow-testing - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.finos.springbot symphony-bdk-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.finos.springbot teams-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.finos.springbot entity-json - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.finos.springbot entities - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/libs/chat-workflow-testing/pom.xml b/libs/chat-workflow-testing/pom.xml index e80a3363a..53e2df74f 100644 --- a/libs/chat-workflow-testing/pom.xml +++ b/libs/chat-workflow-testing/pom.xml @@ -9,7 +9,7 @@ org.finos.springbot spring-bot - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT ../.. @@ -22,7 +22,7 @@ org.finos.springbot chat-workflow - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/libs/chat-workflow-testing/src/test/java/org/finos/springbot/workflow/tables/TestTableEdit.java b/libs/chat-workflow-testing/src/test/java/org/finos/springbot/workflow/tables/TestTableEdit.java index b0e3ae1e6..ac5d66dac 100644 --- a/libs/chat-workflow-testing/src/test/java/org/finos/springbot/workflow/tables/TestTableEdit.java +++ b/libs/chat-workflow-testing/src/test/java/org/finos/springbot/workflow/tables/TestTableEdit.java @@ -27,8 +27,8 @@ import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.bean.override.mockito.MockitoBean; import org.springframework.validation.Validator; /** @@ -46,7 +46,7 @@ public class TestTableEdit { private TestObjects to; private EntityJson toWrapper; - @MockBean + @MockitoBean Validator v; @Autowired @@ -58,7 +58,7 @@ public class TestTableEdit { @Autowired TableAddRow addRows; - @MockBean + @MockitoBean ResponseHandlers rh; Chat room = null; diff --git a/libs/chat-workflow/pom.xml b/libs/chat-workflow/pom.xml index fae2e6449..04dae3253 100644 --- a/libs/chat-workflow/pom.xml +++ b/libs/chat-workflow/pom.xml @@ -11,7 +11,7 @@ org.finos.springbot spring-bot - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT ../.. @@ -33,7 +33,7 @@ org.finos.springbot entity-json - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.springframework.boot @@ -49,7 +49,15 @@ org.springframework.boot spring-boot-starter-test test - + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.springframework + spring-web + diff --git a/libs/entity-json/pom.xml b/libs/entity-json/pom.xml index f3d527cd5..7ebaa2aa1 100644 --- a/libs/entity-json/pom.xml +++ b/libs/entity-json/pom.xml @@ -10,7 +10,7 @@ org.finos.springbot spring-bot - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT ../.. diff --git a/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/pom.xml b/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/pom.xml index 8960ec535..445fadb39 100644 --- a/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/pom.xml +++ b/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/pom.xml @@ -9,7 +9,7 @@ org.finos.springbot spring-bot - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT ../../.. @@ -22,12 +22,12 @@ org.finos.springbot chat-workflow - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.finos.springbot entities - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.finos.symphony.bdk @@ -43,7 +43,7 @@ org.finos.springbot chat-workflow-testing - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT test diff --git a/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/symphony/SymphonyMockConfiguration.java b/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/symphony/SymphonyMockConfiguration.java index e436498ee..700e39c47 100644 --- a/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/symphony/SymphonyMockConfiguration.java +++ b/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/symphony/SymphonyMockConfiguration.java @@ -1,6 +1,9 @@ package org.finos.springbot.symphony; -import static org.mockito.Mockito.when; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.doReturn; import java.util.Arrays; import java.util.Collections; @@ -8,11 +11,9 @@ import org.finos.springbot.tests.controller.AbstractHandlerMappingTest; import org.finos.springbot.tests.controller.OurController; import org.mockito.Mockito; -import org.springframework.beans.factory.InitializingBean; import org.springframework.boot.test.context.TestConfiguration; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.boot.test.mock.mockito.MockReset; import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Primary; import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; import com.symphony.bdk.core.auth.AuthSession; @@ -31,98 +32,86 @@ @TestConfiguration -public class SymphonyMockConfiguration implements InitializingBean { +public class SymphonyMockConfiguration { - @MockBean(reset = MockReset.NONE) - StreamService streamsApi; - - @MockBean(reset = MockReset.NONE) - UserService usersApi; - - @MockBean(reset = MockReset.NONE) - AuthSession authSession; - - @MockBean - DatafeedLoop datafeedLoop; - - @MockBean - SessionService sessionApi; - - @Bean - public LocalValidatorFactoryBean localValidatorFactoryBean() { - return new LocalValidatorFactoryBean(); - } - - - - @Bean - public OurController ourController() { - return new OurController(); - } - - public void mockSessionApi() { - Mockito.when(sessionApi.getSession()).thenReturn( - new UserV2() - .emailAddress(AbstractHandlerMappingTest.BOT_EMAIL) - .id(AbstractHandlerMappingTest.BOT_ID)); - } - - public void mockStreamsApi() { - Mockito.when(streamsApi.create(Mockito.anyList())) - .thenReturn(new Stream().id(AbstractHandlerMappingTest.CHAT_ID)); - - Mockito.when(streamsApi.getRoomInfo(Mockito.eq(AbstractHandlerMappingTest.CHAT_ID))) - .thenReturn(new V3RoomDetail() - .roomAttributes(new V3RoomAttributes().name(OurController.SOME_ROOM))); - - Mockito.when(streamsApi.listRoomMembers(Mockito.anyString())) - .thenReturn(Arrays.asList( - new MemberInfo().id(AbstractHandlerMappingTest.BOT_ID).owner(false), - new MemberInfo().id(AbstractHandlerMappingTest.ROB_EXAMPLE_ID).owner(true))); - - } - - public void mockUsersApi() { - UserV2 botUser = new UserV2() - .username(AbstractHandlerMappingTest.BOT_NAME) - .displayName(AbstractHandlerMappingTest.BOT_NAME) - .emailAddress(AbstractHandlerMappingTest.BOT_EMAIL) - .id(AbstractHandlerMappingTest.BOT_ID); + // Provide explicit lenient Mockito mocks with unique names and pre-stubbed behavior + @Bean(name = "mockStreamService") + @Primary + public StreamService streamsApi() { + StreamService mock = Mockito.mock(StreamService.class, Mockito.withSettings().lenient()); + // Adjust to if your BDK uses List + doReturn(new Stream().id(AbstractHandlerMappingTest.CHAT_ID)) + .when(mock).create(org.mockito.ArgumentMatchers.anyList()); + doReturn(new V3RoomDetail().roomAttributes(new V3RoomAttributes().name(OurController.SOME_ROOM))) + .when(mock).getRoomInfo(anyString()); + doReturn(Arrays.asList( + new MemberInfo().id(AbstractHandlerMappingTest.BOT_ID).owner(false), + new MemberInfo().id(AbstractHandlerMappingTest.ROB_EXAMPLE_ID).owner(true))) + .when(mock).listRoomMembers(anyString()); + return mock; + } - UserV2 robUser = new UserV2() - .username(AbstractHandlerMappingTest.ROB_NAME) - .displayName(AbstractHandlerMappingTest.ROB_NAME) - .emailAddress(AbstractHandlerMappingTest.ROB_EXAMPLE_EMAIL) - .id(AbstractHandlerMappingTest.ROB_EXAMPLE_ID); - - when(usersApi.listUsersByEmails(Mockito.eq(Collections.singletonList(AbstractHandlerMappingTest.BOT_EMAIL)), Mockito.anyBoolean(), Mockito.anyBoolean())) - .thenReturn(Collections.singletonList(botUser)); - - when(usersApi.listUsersByEmails(Mockito.eq(Collections.singletonList(AbstractHandlerMappingTest.ROB_EXAMPLE_EMAIL)), Mockito.anyBoolean(), Mockito.anyBoolean())) - .thenReturn(Collections.singletonList(robUser)); - - when(usersApi.listUsersByIds(Mockito.eq(Collections.singletonList(AbstractHandlerMappingTest.BOT_ID)), Mockito.anyBoolean(), Mockito.anyBoolean())) - .thenReturn(Collections.singletonList(botUser)); - - when(usersApi.listUsersByIds(Mockito.eq(Collections.singletonList(AbstractHandlerMappingTest.ROB_EXAMPLE_ID)), Mockito.anyBoolean(), Mockito.anyBoolean())) - .thenReturn(Collections.singletonList(robUser)); - - when(usersApi.getUserDetail(Mockito.anyLong())) - .thenReturn(new V2UserDetail() - .userSystemInfo(new UserSystemInfo().id(AbstractHandlerMappingTest.ROB_EXAMPLE_ID)) - .userAttributes(new V2UserAttributes() - .displayName(AbstractHandlerMappingTest.ROB_NAME) - .emailAddress(AbstractHandlerMappingTest.ROB_EXAMPLE_EMAIL))); - - - } + @Bean(name = "mockUserService") + @Primary + public UserService usersApi() { + UserService mock = Mockito.mock(UserService.class, Mockito.withSettings().lenient()); + UserV2 botUser = new UserV2() + .username(AbstractHandlerMappingTest.BOT_NAME) + .displayName(AbstractHandlerMappingTest.BOT_NAME) + .emailAddress(AbstractHandlerMappingTest.BOT_EMAIL) + .id(AbstractHandlerMappingTest.BOT_ID); + UserV2 robUser = new UserV2() + .username(AbstractHandlerMappingTest.ROB_NAME) + .displayName(AbstractHandlerMappingTest.ROB_NAME) + .emailAddress(AbstractHandlerMappingTest.ROB_EXAMPLE_EMAIL) + .id(AbstractHandlerMappingTest.ROB_EXAMPLE_ID); + doReturn(Collections.singletonList(botUser)) + .when(mock).listUsersByEmails(eq(Collections.singletonList(AbstractHandlerMappingTest.BOT_EMAIL)), Mockito.anyBoolean(), Mockito.anyBoolean()); + doReturn(Collections.singletonList(robUser)) + .when(mock).listUsersByEmails(eq(Collections.singletonList(AbstractHandlerMappingTest.ROB_EXAMPLE_EMAIL)), Mockito.anyBoolean(), Mockito.anyBoolean()); + doReturn(Collections.singletonList(botUser)) + .when(mock).listUsersByIds(eq(Collections.singletonList(AbstractHandlerMappingTest.BOT_ID)), Mockito.anyBoolean(), Mockito.anyBoolean()); + doReturn(Collections.singletonList(robUser)) + .when(mock).listUsersByIds(eq(Collections.singletonList(AbstractHandlerMappingTest.ROB_EXAMPLE_ID)), Mockito.anyBoolean(), Mockito.anyBoolean()); + doReturn(new V2UserDetail() + .userSystemInfo(new UserSystemInfo().id(AbstractHandlerMappingTest.ROB_EXAMPLE_ID)) + .userAttributes(new V2UserAttributes() + .displayName(AbstractHandlerMappingTest.ROB_NAME) + .emailAddress(AbstractHandlerMappingTest.ROB_EXAMPLE_EMAIL))) + .when(mock).getUserDetail(anyLong()); + return mock; + } + @Bean(name = "mockSessionService") + @Primary + public SessionService sessionApi() { + SessionService mock = Mockito.mock(SessionService.class, Mockito.withSettings().lenient()); + doReturn(new UserV2() + .emailAddress(AbstractHandlerMappingTest.BOT_EMAIL) + .id(AbstractHandlerMappingTest.BOT_ID)) + .when(mock).getSession(); + return mock; + } - @Override - public void afterPropertiesSet() throws Exception { - mockStreamsApi(); - mockUsersApi(); - mockSessionApi(); - } + @Bean(name = "mockAuthSession") + @Primary + public AuthSession authSession() { + return Mockito.mock(AuthSession.class, Mockito.withSettings().lenient()); + } + @Bean(name = "mockDatafeedLoop") + @Primary + public DatafeedLoop datafeedLoop() { + return Mockito.mock(DatafeedLoop.class, Mockito.withSettings().lenient()); + } + + @Bean + public LocalValidatorFactoryBean localValidatorFactoryBean() { + return new LocalValidatorFactoryBean(); + } + + @Bean + public OurController ourController() { + return new OurController(); + } } \ No newline at end of file diff --git a/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/symphony/controller/SymphonyHandlerMappingTest.java b/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/symphony/controller/SymphonyHandlerMappingTest.java index 901708800..b1e8383e2 100644 --- a/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/symphony/controller/SymphonyHandlerMappingTest.java +++ b/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/symphony/controller/SymphonyHandlerMappingTest.java @@ -31,8 +31,8 @@ import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.bean.override.mockito.MockitoBean; import org.springframework.util.StreamUtils; import com.fasterxml.jackson.core.JsonProcessingException; @@ -70,7 +70,7 @@ public class SymphonyHandlerMappingTest extends AbstractHandlerMappingTest { @Autowired EntityJsonConverter ejc; - @MockBean + @MockitoBean MessageService messagesApi; @Autowired diff --git a/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/symphony/conversations/SymphonyConversationsTest.java b/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/symphony/conversations/SymphonyConversationsTest.java index 4da818fb6..2a8e9c1c2 100644 --- a/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/symphony/conversations/SymphonyConversationsTest.java +++ b/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/symphony/conversations/SymphonyConversationsTest.java @@ -19,7 +19,6 @@ import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.ActiveProfiles; import com.symphony.bdk.core.service.message.MessageService; @@ -35,6 +34,7 @@ import com.symphony.bdk.gen.api.model.V3RoomAttributes; import com.symphony.bdk.gen.api.model.V3RoomDetail; import com.symphony.bdk.gen.api.model.V3RoomSearchResults; +import org.springframework.test.context.bean.override.mockito.MockitoBean; @SpringBootTest(classes = { SymphonyMockConfiguration.class, @@ -46,10 +46,10 @@ public class SymphonyConversationsTest { @Autowired SymphonyConversationsImpl ruBuilder; - @MockBean + @MockitoBean StreamService streamsApi; - @MockBean + @MockitoBean MessageService messagesApi; @Test diff --git a/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/symphony/history/HistoryTest.java b/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/symphony/history/HistoryTest.java index 416408b57..551f3a528 100644 --- a/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/symphony/history/HistoryTest.java +++ b/libs/symphony-bdk/symphony-bdk-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/symphony/history/HistoryTest.java @@ -15,13 +15,13 @@ import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.ActiveProfiles; import com.symphony.bdk.core.service.message.MessageService; import com.symphony.bdk.core.service.pagination.model.PaginationAttribute; import com.symphony.bdk.gen.api.model.MessageSearchQuery; import com.symphony.bdk.gen.api.model.V4Message; +import org.springframework.test.context.bean.override.mockito.MockitoBean; @SpringBootTest(classes = { SymphonyMockConfiguration.class, @@ -36,7 +36,7 @@ public class HistoryTest { @Autowired EntityJsonConverter ejc; - @MockBean + @MockitoBean MessageService messagesApi; @Test diff --git a/libs/symphony/entities/pom.xml b/libs/symphony/entities/pom.xml index 8612a8f5e..1e9ec8927 100644 --- a/libs/symphony/entities/pom.xml +++ b/libs/symphony/entities/pom.xml @@ -10,7 +10,7 @@ org.finos.springbot spring-bot - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT ../../.. @@ -23,7 +23,7 @@ org.finos.springbot entity-json - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/libs/teams/teams-chat-workflow-spring-boot-starter/pom.xml b/libs/teams/teams-chat-workflow-spring-boot-starter/pom.xml index a50bd5198..b6bc812e6 100644 --- a/libs/teams/teams-chat-workflow-spring-boot-starter/pom.xml +++ b/libs/teams/teams-chat-workflow-spring-boot-starter/pom.xml @@ -9,7 +9,7 @@ org.finos.springbot spring-bot - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT ../../.. @@ -20,35 +20,35 @@ - + io.netty - netty-codec - ${netty-codec.version} + netty-codec-http + ${netty.version} io.netty - netty-codec-http - ${netty-codec-http.version} + netty-codec-compression + ${netty.version} - org.apache.commons - commons-lang3 - ${commons-lang3.version} + io.netty + netty-transport-native-epoll + ${netty.version} - + - org.finos.springbot - chat-workflow - 10.0.4-SNAPSHOT + io.netty + netty-transport-native-unix-common + ${netty.version} - + - com.microsoft.azure - msal4j - ${azure-msal4j.version} + org.finos.springbot + chat-workflow + 11.0.0-SNAPSHOT @@ -135,7 +135,7 @@ org.finos.springbot chat-workflow-testing - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT test diff --git a/libs/teams/teams-chat-workflow-spring-boot-starter/src/main/java/org/finos/springbot/teams/templating/thymeleaf/ThymeleafEngineConfig.java b/libs/teams/teams-chat-workflow-spring-boot-starter/src/main/java/org/finos/springbot/teams/templating/thymeleaf/ThymeleafEngineConfig.java index 80fb2e171..15213c236 100644 --- a/libs/teams/teams-chat-workflow-spring-boot-starter/src/main/java/org/finos/springbot/teams/templating/thymeleaf/ThymeleafEngineConfig.java +++ b/libs/teams/teams-chat-workflow-spring-boot-starter/src/main/java/org/finos/springbot/teams/templating/thymeleaf/ThymeleafEngineConfig.java @@ -2,9 +2,8 @@ import org.springframework.beans.factory.ObjectProvider; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration; -import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.boot.thymeleaf.autoconfigure.ThymeleafProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; diff --git a/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/content/TeamsHTMLParserTest.java b/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/content/TeamsHTMLParserTest.java index 927fa4299..a36142461 100644 --- a/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/content/TeamsHTMLParserTest.java +++ b/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/content/TeamsHTMLParserTest.java @@ -19,10 +19,10 @@ import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; import com.fasterxml.jackson.databind.ObjectMapper; import com.microsoft.bot.schema.Entity; +import org.springframework.test.context.bean.override.mockito.MockitoBean; @SpringBootTest(classes = { TeamsContentConfig.class, @@ -32,7 +32,7 @@ public class TeamsHTMLParserTest { @Autowired TeamsHTMLParser parser; - @MockBean + @MockitoBean TeamsConversations tc; @Test diff --git a/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/controller/BotControllerTest.java b/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/controller/BotControllerTest.java index 5d12388c1..7b211fbf1 100644 --- a/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/controller/BotControllerTest.java +++ b/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/controller/BotControllerTest.java @@ -13,6 +13,7 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.Spy; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -26,19 +27,19 @@ @SpringBootTest(classes = { MockTeamsConfiguration.class}) @ActiveProfiles("teams") -@ExtendWith(SpringExtension.class) +@ExtendWith(MockitoExtension.class) public class BotControllerTest { @Mock BotFrameworkHttpAdapter adapter; - + @Spy Bot bot; - + @InjectMocks BotController controller; - - + + @SuppressWarnings({ "deprecation" }) @Test public void testIncoming() throws InterruptedException, ExecutionException { @@ -46,12 +47,12 @@ public void testIncoming() throws InterruptedException, ExecutionException { InvokeResponse ir = new InvokeResponse(HttpStatus.OK.value(), "Success"); Mockito.when(adapter.processIncomingActivity("any text", a, bot)).thenReturn(CompletableFuture.completedFuture(ir)); CompletableFuture> future = controller.incoming(a, "any text"); - + ResponseEntity entity = future.get(); - - Assertions.assertEquals(200, entity.getStatusCodeValue()); + + Assertions.assertEquals(200, entity.getStatusCode().value()); Assertions.assertEquals("Success", entity.getBody()); - + } - -} + +} \ No newline at end of file diff --git a/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/controller/ChannelServiceControllerTest.java b/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/controller/ChannelServiceControllerTest.java index 1b443bcf7..cea7558a8 100644 --- a/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/controller/ChannelServiceControllerTest.java +++ b/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/controller/ChannelServiceControllerTest.java @@ -19,6 +19,7 @@ import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.ResponseEntity; import org.springframework.test.context.ActiveProfiles; @@ -37,191 +38,179 @@ @SpringBootTest(classes = { MockTeamsConfiguration.class, TeamsWorkflowConfig.class, DataHandlerConfig.class }) @ActiveProfiles("teams") -@ExtendWith(SpringExtension.class) +@ExtendWith(MockitoExtension.class) public class ChannelServiceControllerTest { - @Mock - ChannelServiceHandler handler; - - @InjectMocks - ChannelServiceController controller = new ChannelServiceController(handler) {};; - - @Mock - TeamsResponseHandler teamsResponseHandler; - - ResourceResponse rr; - - Activity a; - - @BeforeEach - public void setup() { - controller = new ChannelServiceController(handler) {}; - a = Mockito.mock(Activity.class); - TeamsUser tu = new TeamsUser("made", "up", "thing"); - MessageResponse r = new MessageResponse(tu, "Some object"); - rr = Mockito.mock(ResourceResponse.class); - - Mockito.when(teamsResponseHandler.apply(r)).thenReturn(rr); - } - - @SuppressWarnings({ "deprecation" }) - @Test - public void testSendToConversation() throws InterruptedException, ExecutionException { - - Mockito.when(handler.handleSendToConversation("any text","conversation Id", a)).thenReturn(CompletableFuture.completedFuture(rr)); - CompletableFuture> future = controller.sendToConversation("conversation Id", a, "any text"); - ResponseEntity entity = future.get(); - - Assertions.assertEquals(200, entity.getStatusCodeValue()); - } - - @SuppressWarnings({ "deprecation" }) - @Test - public void testReplyToActivity() throws InterruptedException, ExecutionException { - Mockito.when(handler.handleReplyToActivity("any text","conversation Id", "activityId", a)).thenReturn(CompletableFuture.completedFuture(rr)); - CompletableFuture> future = controller.replyToActivity("conversation Id", "activityId", a, "any text"); - ResponseEntity entity = future.get(); - - Assertions.assertEquals(200, entity.getStatusCodeValue()); - } - - @SuppressWarnings({ "deprecation" }) - @Test - public void testUpdateActivity() throws InterruptedException, ExecutionException { - Mockito.when(handler.handleUpdateActivity("any text","conversation Id", "activityId", a)).thenReturn(CompletableFuture.completedFuture(rr)); - CompletableFuture> future = controller.updateActivity("conversation Id", "activityId", a, "any text"); - ResponseEntity entity = future.get(); - - Assertions.assertEquals(200, entity.getStatusCodeValue()); - } - - @SuppressWarnings({ "deprecation" }) - @Test - public void testDeleteActivity() throws InterruptedException, ExecutionException { - - Void vo = Mockito.mock(Void.class); - - Mockito.when(handler.handleDeleteActivity("any text","conversation Id", "activityId")).thenReturn(CompletableFuture.completedFuture(vo)); - CompletableFuture> future = controller.deleteActivity("conversation Id", "activityId", "any text"); - ResponseEntity entity = future.get(); - - Assertions.assertEquals(202, entity.getStatusCodeValue()); - } - - @SuppressWarnings({ "deprecation" }) - @Test - public void testGetActivityMembers() throws InterruptedException, ExecutionException { - - List accounts = Mockito.mock(List.class); - - Mockito.when(handler.handleGetActivityMembers("any text","conversation Id", "activityId")).thenReturn(CompletableFuture.completedFuture(accounts)); - CompletableFuture>> future = controller.getActivityMembers("conversation Id", "activityId", "any text"); - ResponseEntity> entity = future.get(); - - Assertions.assertEquals(200, entity.getStatusCodeValue()); - } - - @SuppressWarnings({ "deprecation" }) - @Test - public void testCreateConversation() throws InterruptedException, ExecutionException { - - ConversationResourceResponse r = Mockito.mock(ConversationResourceResponse.class); - - ConversationParameters parameters = new ConversationParameters(); - - Mockito.when(handler.handleCreateConversation("any text", parameters)).thenReturn(CompletableFuture.completedFuture(r)); - - CompletableFuture> future = controller.createConversation(parameters, "any text"); - ResponseEntity entity = future.get(); - - Assertions.assertEquals(200, entity.getStatusCodeValue()); - } - - @SuppressWarnings({ "deprecation" }) - @Test - public void testGetConversations() throws InterruptedException, ExecutionException { - - ConversationsResult r = Mockito.mock(ConversationsResult.class); - - Mockito.when(handler.handleGetConversations("any text", "conversation Id", "activityId")).thenReturn(CompletableFuture.completedFuture(r)); - - CompletableFuture> future = controller.getConversations("conversation Id", "activityId", "any text"); - ResponseEntity entity = future.get(); - - Assertions.assertEquals(200, entity.getStatusCodeValue()); - } - - @SuppressWarnings({ "deprecation" }) - @Test - public void testGetConversationMembers() throws InterruptedException, ExecutionException { - - List r = Mockito.mock(List.class); - - Mockito.when(handler.handleGetConversationMembers("any text", "conversation Id")).thenReturn(CompletableFuture.completedFuture(r)); - - CompletableFuture>> future = controller.getConversationMembers("conversation Id", "any text"); - ResponseEntity> entity = future.get(); - - Assertions.assertEquals(200, entity.getStatusCodeValue()); - } - - @SuppressWarnings({ "deprecation" }) - @Test - public void testGetConversationPagedMembers() throws InterruptedException, ExecutionException { - - PagedMembersResult r = Mockito.mock(PagedMembersResult.class); - - Mockito.when(handler.handleGetConversationPagedMembers("any text", "conversation Id", 1, "activityId")).thenReturn(CompletableFuture.completedFuture(r)); - - CompletableFuture> future = controller.getConversationPagedMembers("conversation Id", 1, "activityId", "any text"); - ResponseEntity entity = future.get(); - - Assertions.assertEquals(200, entity.getStatusCodeValue()); - } - - @SuppressWarnings({ "deprecation" }) - @Test - public void testDeleteConversationMember() throws InterruptedException, ExecutionException { - - Void r = Mockito.mock(Void.class); - - Mockito.when(handler.handleDeleteConversationMember("any text", "conversation Id", "Member Id")).thenReturn(CompletableFuture.completedFuture(r)); - - CompletableFuture> future = controller.deleteConversationMember("conversation Id", "Member Id", "any text"); - ResponseEntity entity = future.get(); - - Assertions.assertEquals(202, entity.getStatusCodeValue()); - } - - @SuppressWarnings({ "deprecation" }) - @Test - public void testSendConversationHistory() throws InterruptedException, ExecutionException { - - ResourceResponse r = Mockito.mock(ResourceResponse.class); - - Transcript history = new Transcript(); - - Mockito.when(handler.handleSendConversationHistory("any text", "conversation Id", history)).thenReturn(CompletableFuture.completedFuture(r)); - - CompletableFuture> future = controller.sendConversationHistory("conversation Id",history, "any text"); - ResponseEntity entity = future.get(); - - Assertions.assertEquals(200, entity.getStatusCodeValue()); - } - - @SuppressWarnings({ "deprecation" }) - @Test - public void testUploadAttachment() throws InterruptedException, ExecutionException { - - ResourceResponse r = Mockito.mock(ResourceResponse.class); - - AttachmentData attachmentUpload = new AttachmentData(); - - Mockito.when(handler.handleUploadAttachment("any text", "conversation Id", attachmentUpload)).thenReturn(CompletableFuture.completedFuture(r)); - - CompletableFuture> future = controller.uploadAttachment("conversation Id",attachmentUpload, "any text"); - ResponseEntity entity = future.get(); - - Assertions.assertEquals(200, entity.getStatusCodeValue()); - } -} + @Mock + ChannelServiceHandler handler; + + @InjectMocks + ChannelServiceController controller = new ChannelServiceController(handler) {};; + + @Mock + TeamsResponseHandler teamsResponseHandler; + + ResourceResponse rr; + + Activity a; + + @BeforeEach + public void setup() { + controller = new ChannelServiceController(handler) {}; + a = Mockito.mock(Activity.class); + TeamsUser tu = new TeamsUser("made", "up", "thing"); + MessageResponse r = new MessageResponse(tu, "Some object"); + rr = Mockito.mock(ResourceResponse.class); + + //Mockito.when(teamsResponseHandler.apply(r)).thenReturn(rr); + } + + @SuppressWarnings({ "deprecation" }) + @Test + public void testSendToConversation() throws InterruptedException, ExecutionException { + + Mockito.when(handler.handleSendToConversation("any text","conversation Id", a)).thenReturn(CompletableFuture.completedFuture(rr)); + CompletableFuture> future = controller.sendToConversation("conversation Id", a, "any text"); + ResponseEntity entity = future.get(); + + Assertions.assertEquals(200, entity.getStatusCode().value()); } + + @SuppressWarnings({ "deprecation" }) + @Test + public void testReplyToActivity() throws InterruptedException, ExecutionException { + Mockito.when(handler.handleReplyToActivity("any text","conversation Id", "activityId", a)).thenReturn(CompletableFuture.completedFuture(rr)); + CompletableFuture> future = controller.replyToActivity("conversation Id", "activityId", a, "any text"); + ResponseEntity entity = future.get(); + + Assertions.assertEquals(200, entity.getStatusCode().value()); } + + @SuppressWarnings({ "deprecation" }) + @Test + public void testUpdateActivity() throws InterruptedException, ExecutionException { + Mockito.when(handler.handleUpdateActivity("any text","conversation Id", "activityId", a)).thenReturn(CompletableFuture.completedFuture(rr)); + CompletableFuture> future = controller.updateActivity("conversation Id", "activityId", a, "any text"); + ResponseEntity entity = future.get(); + + Assertions.assertEquals(200, entity.getStatusCode().value()); } + + @SuppressWarnings({ "deprecation" }) + @Test + public void testDeleteActivity() throws InterruptedException, ExecutionException { + + Void vo = Mockito.mock(Void.class); + + Mockito.when(handler.handleDeleteActivity("any text","conversation Id", "activityId")).thenReturn(CompletableFuture.completedFuture(vo)); + CompletableFuture> future = controller.deleteActivity("conversation Id", "activityId", "any text"); + ResponseEntity entity = future.get(); + + Assertions.assertEquals(202, entity.getStatusCode().value()); } + + @SuppressWarnings({ "deprecation" }) + @Test + public void testGetActivityMembers() throws InterruptedException, ExecutionException { + + List accounts = Mockito.mock(List.class); + + Mockito.when(handler.handleGetActivityMembers("any text","conversation Id", "activityId")).thenReturn(CompletableFuture.completedFuture(accounts)); + CompletableFuture>> future = controller.getActivityMembers("conversation Id", "activityId", "any text"); + ResponseEntity> entity = future.get(); + + Assertions.assertEquals(200, entity.getStatusCode().value()); } + + @SuppressWarnings({ "deprecation" }) + @Test + public void testCreateConversation() throws InterruptedException, ExecutionException { + + ConversationResourceResponse r = Mockito.mock(ConversationResourceResponse.class); + + ConversationParameters parameters = new ConversationParameters(); + + Mockito.when(handler.handleCreateConversation("any text", parameters)).thenReturn(CompletableFuture.completedFuture(r)); + + CompletableFuture> future = controller.createConversation(parameters, "any text"); + ResponseEntity entity = future.get(); + + Assertions.assertEquals(200, entity.getStatusCode().value()); } + + @SuppressWarnings({ "deprecation" }) + @Test + public void testGetConversations() throws InterruptedException, ExecutionException { + + ConversationsResult r = Mockito.mock(ConversationsResult.class); + + Mockito.when(handler.handleGetConversations("any text", "conversation Id", "activityId")).thenReturn(CompletableFuture.completedFuture(r)); + + CompletableFuture> future = controller.getConversations("conversation Id", "activityId", "any text"); + ResponseEntity entity = future.get(); + + Assertions.assertEquals(200, entity.getStatusCode().value()); } + + @SuppressWarnings({ "deprecation" }) + @Test + public void testGetConversationMembers() throws InterruptedException, ExecutionException { + + List r = Mockito.mock(List.class); + + Mockito.when(handler.handleGetConversationMembers("any text", "conversation Id")).thenReturn(CompletableFuture.completedFuture(r)); + + CompletableFuture>> future = controller.getConversationMembers("conversation Id", "any text"); + ResponseEntity> entity = future.get(); + + Assertions.assertEquals(200, entity.getStatusCode().value()); } + + @SuppressWarnings({ "deprecation" }) + @Test + public void testGetConversationPagedMembers() throws InterruptedException, ExecutionException { + + PagedMembersResult r = Mockito.mock(PagedMembersResult.class); + + Mockito.when(handler.handleGetConversationPagedMembers("any text", "conversation Id", 1, "activityId")).thenReturn(CompletableFuture.completedFuture(r)); + + CompletableFuture> future = controller.getConversationPagedMembers("conversation Id", 1, "activityId", "any text"); + ResponseEntity entity = future.get(); + + Assertions.assertEquals(200, entity.getStatusCode().value()); } + + @SuppressWarnings({ "deprecation" }) + @Test + public void testDeleteConversationMember() throws InterruptedException, ExecutionException { + + Void r = Mockito.mock(Void.class); + + Mockito.when(handler.handleDeleteConversationMember("any text", "conversation Id", "Member Id")).thenReturn(CompletableFuture.completedFuture(r)); + + CompletableFuture> future = controller.deleteConversationMember("conversation Id", "Member Id", "any text"); + ResponseEntity entity = future.get(); + + Assertions.assertEquals(202, entity.getStatusCode().value()); } + + @SuppressWarnings({ "deprecation" }) + @Test + public void testSendConversationHistory() throws InterruptedException, ExecutionException { + + ResourceResponse r = Mockito.mock(ResourceResponse.class); + + Transcript history = new Transcript(); + + Mockito.when(handler.handleSendConversationHistory("any text", "conversation Id", history)).thenReturn(CompletableFuture.completedFuture(r)); + + CompletableFuture> future = controller.sendConversationHistory("conversation Id",history, "any text"); + ResponseEntity entity = future.get(); + + Assertions.assertEquals(200, entity.getStatusCode().value()); } + + @SuppressWarnings({ "deprecation" }) + @Test + public void testUploadAttachment() throws InterruptedException, ExecutionException { + + ResourceResponse r = Mockito.mock(ResourceResponse.class); + + AttachmentData attachmentUpload = new AttachmentData(); + + Mockito.when(handler.handleUploadAttachment("any text", "conversation Id", attachmentUpload)).thenReturn(CompletableFuture.completedFuture(r)); + + CompletableFuture> future = controller.uploadAttachment("conversation Id",attachmentUpload, "any text"); + ResponseEntity entity = future.get(); + + Assertions.assertEquals(200, entity.getStatusCode().value()); } +} \ No newline at end of file diff --git a/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/controller/TeamsHandlerMappingTest.java b/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/controller/TeamsHandlerMappingTest.java index 45336cf21..fd5e2f040 100644 --- a/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/controller/TeamsHandlerMappingTest.java +++ b/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/controller/TeamsHandlerMappingTest.java @@ -34,10 +34,10 @@ import org.finos.springbot.workflow.response.WorkResponse; import org.junit.jupiter.api.Assertions; import org.mockito.ArgumentCaptor; +import org.mockito.Mock; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.MediaType; import org.springframework.test.context.ActiveProfiles; @@ -58,6 +58,7 @@ import com.microsoft.bot.schema.teams.ChannelInfo; import com.microsoft.bot.schema.teams.FileConsentCard; import com.microsoft.bot.schema.teams.TeamsChannelData; +import org.springframework.test.context.bean.override.mockito.MockitoBean; @SpringBootTest(classes = { @@ -79,10 +80,10 @@ public class TeamsHandlerMappingTest extends AbstractHandlerMappingTest { @Autowired ChatRequestChatHandlerMapping hm; - @MockBean + @MockitoBean TeamsStateStorage th; - - @MockBean + + @MockitoBean TeamsConversations conv; @Autowired diff --git a/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/handlers/TeamsResponseHandlerTest.java b/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/handlers/TeamsResponseHandlerTest.java index bc9c78090..c641a8519 100644 --- a/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/handlers/TeamsResponseHandlerTest.java +++ b/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/handlers/TeamsResponseHandlerTest.java @@ -17,9 +17,9 @@ import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.HttpStatus; import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.bean.override.mockito.MockitoBean; import org.springframework.test.context.junit.jupiter.SpringExtension; import com.microsoft.bot.connector.rest.ErrorResponseException; @@ -38,10 +38,10 @@ @ExtendWith(SpringExtension.class) public class TeamsResponseHandlerTest { - @MockBean + @MockitoBean ActivityHandler ah; - @MockBean + @MockitoBean ResponseHandlers eh; @Autowired diff --git a/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/handlers/retry/InMemoryRetryingActivityHandlerTest.java b/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/handlers/retry/InMemoryRetryingActivityHandlerTest.java index 16a750dd0..ef6211fe3 100644 --- a/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/handlers/retry/InMemoryRetryingActivityHandlerTest.java +++ b/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/handlers/retry/InMemoryRetryingActivityHandlerTest.java @@ -13,9 +13,9 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.ArgumentCaptor; import org.mockito.Mockito; -import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.HttpStatus; import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.bean.override.mockito.MockitoBean; import org.springframework.test.context.junit.jupiter.SpringExtension; import com.microsoft.bot.connector.rest.ErrorResponseException; @@ -32,7 +32,7 @@ @ExtendWith(SpringExtension.class) public class InMemoryRetryingActivityHandlerTest { - @MockBean + @MockitoBean TeamsConversations conv; int go = 0; diff --git a/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/handlers/retry/SimpleActivityHandlerTest.java b/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/handlers/retry/SimpleActivityHandlerTest.java index e56f26b4c..a5df0a1f8 100644 --- a/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/handlers/retry/SimpleActivityHandlerTest.java +++ b/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/handlers/retry/SimpleActivityHandlerTest.java @@ -5,27 +5,32 @@ import org.finos.springbot.teams.handlers.SimpleActivityHandler; import org.finos.springbot.workflow.data.DataHandlerConfig; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.boot.test.context.SpringBootTest; import com.microsoft.bot.schema.Activity; -@SpringBootTest(classes = { - DataHandlerConfig.class, - }) +import static org.mockito.Mockito.mock; + +@SpringBootTest(classes = { + DataHandlerConfig.class, +}) +@ExtendWith(MockitoExtension.class) public class SimpleActivityHandlerTest { - + @Mock TeamsConversations tc; - + @InjectMocks private SimpleActivityHandler handler = new SimpleActivityHandler(tc); - + @Test public void testHandleActivity() { - Activity activity = Mockito.mock(Activity.class); + Activity activity = mock(Activity.class); handler.handleActivity(activity , new TeamsChannel()); } -} +} \ No newline at end of file diff --git a/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/messages/FileActivityHandlerTest.java b/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/messages/FileActivityHandlerTest.java index 62fe48c8e..d24b11480 100644 --- a/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/messages/FileActivityHandlerTest.java +++ b/libs/teams/teams-chat-workflow-spring-boot-starter/src/test/java/org/finos/springbot/teams/messages/FileActivityHandlerTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mockito; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -24,27 +25,27 @@ @SpringBootTest(classes = { MockTeamsConfiguration.class, TeamsWorkflowConfig.class, DataHandlerConfig.class }) @ActiveProfiles("teams") -@ExtendWith(SpringExtension.class) +@ExtendWith(MockitoExtension.class) public class FileActivityHandlerTest { - + @InjectMocks FileActivityHandler handler; - + TurnContext tc; - + @Test public void testOnTeamsFileConsentAccept() throws IOException, InterruptedException, ExecutionException { tc = Mockito.mock(TurnContext.class); - + FileConsentCardResponse f = getFileConsent(); handler.onTeamsFileConsentAccept(tc, f); } - + @Test public void testOnTeamsFileConsentDecline() throws IOException, InterruptedException, ExecutionException { tc = Mockito.mock(TurnContext.class); - + FileConsentCardResponse f = getFileConsent(); handler.onTeamsFileConsentDecline(tc, f); } @@ -52,18 +53,18 @@ public void testOnTeamsFileConsentDecline() throws IOException, InterruptedExcep private FileConsentCardResponse getFileConsent() throws IOException { FileConsentCardResponse fileConsentCardResponse = new FileConsentCardResponse(); Path file = Files.createTempFile("temp-", "sample.json"); - + Map map = new HashMap<>(); String filePath = "file://"+ file.toAbsolutePath().toString(); map.put("filepath", filePath); map.put("filename", "sample.json"); - + fileConsentCardResponse.setContext(map); FileUploadInfo uploadInfo = new FileUploadInfo(); - + uploadInfo.setUploadUrl(filePath); fileConsentCardResponse.setUploadInfo(uploadInfo); return fileConsentCardResponse; } - -} + +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 3580da4b8..b9dc6cb6b 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.finos.springbot spring-bot - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT pom Spring Bot @@ -50,7 +50,7 @@ UTF-8 - 3.5.5 + 4.0.6 17 17 17 @@ -62,18 +62,14 @@ 1.17.2 23.0.3 3.0.0 - 1.16.1 + 1.16.4 1.18.0 4.5.7 - 1.21.0 1.16 4.5.13 77.1 - 1.81 - 3.18.0 - 4.1.126.Final - 4.1.126.Final - + 1.84 + 4.2.13.Final diff --git a/tools/poll-bot/pom.xml b/tools/poll-bot/pom.xml index d4b2210f7..d389f7966 100644 --- a/tools/poll-bot/pom.xml +++ b/tools/poll-bot/pom.xml @@ -6,7 +6,7 @@ org.finos.springbot spring-bot - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT ../.. @@ -23,12 +23,12 @@ org.finos.springbot symphony-bdk-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.finos.springbot teams-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/tools/reminder-bot/pom.xml b/tools/reminder-bot/pom.xml index 14d988a0a..616f535f8 100644 --- a/tools/reminder-bot/pom.xml +++ b/tools/reminder-bot/pom.xml @@ -6,7 +6,7 @@ org.finos.springbot spring-bot - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT ../../pom.xml @@ -26,12 +26,12 @@ org.finos.springbot symphony-bdk-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.finos.springbot teams-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.apache.commons @@ -80,7 +80,7 @@ org.finos.springbot chat-workflow-testing - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT test diff --git a/tools/rss-bot/pom.xml b/tools/rss-bot/pom.xml index 32c5d621c..abda8c1e5 100644 --- a/tools/rss-bot/pom.xml +++ b/tools/rss-bot/pom.xml @@ -6,7 +6,7 @@ org.finos.springbot spring-bot - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT ../.. @@ -23,7 +23,7 @@ org.finos.springbot symphony-bdk-chat-workflow-spring-boot-starter - 10.0.4-SNAPSHOT + 11.0.0-SNAPSHOT org.apache.commons