diff --git a/src/test/java/io/github/sashirestela/cleverclient/http/ITest.java b/src/test/java/io/github/sashirestela/cleverclient/http/ITest.java index 003c0d5..e37c591 100644 --- a/src/test/java/io/github/sashirestela/cleverclient/http/ITest.java +++ b/src/test/java/io/github/sashirestela/cleverclient/http/ITest.java @@ -114,6 +114,13 @@ interface SyncService { Stream getDemoStream(@Body RequestDemo request); } + interface NotSavedService { + + @GET("/demos") + CompletableFuture> goodMethod(); + + } + @NoArgsConstructor @AllArgsConstructor @Getter diff --git a/src/test/java/io/github/sashirestela/cleverclient/metadata/InterfaceMetadataStoreTest.java b/src/test/java/io/github/sashirestela/cleverclient/metadata/InterfaceMetadataStoreTest.java index 8403ce6..c836339 100644 --- a/src/test/java/io/github/sashirestela/cleverclient/metadata/InterfaceMetadataStoreTest.java +++ b/src/test/java/io/github/sashirestela/cleverclient/metadata/InterfaceMetadataStoreTest.java @@ -134,8 +134,8 @@ void shouldSaveInterfaceMetadataWhenAccomplishValidtion() { @Test void shouldThrownExceptionWhenTryingToGetNotPreviouslySavedInterface() { Exception exception = assertThrows(CleverClientException.class, - () -> store.get(ITest.SyncService.class)); - assertEquals("The interface SyncService has not been saved yet.", exception.getMessage()); + () -> store.get(ITest.NotSavedService.class)); + assertEquals("The interface NotSavedService has not been saved yet.", exception.getMessage()); } @Test @@ -149,8 +149,8 @@ void shouldThrownExceptionWhenMethodHasNotHttpAnnotation() { @Test void shouldThrownExceptionWhenUrlPathParamAtMethodUnmatchesAnnotatedArguments() { Exception exception = assertThrows(CleverClientException.class, - () -> store.save(ITest.BadPathParamService.class)); - assertEquals(exception.getMessage(), - "Path param demoId in the url cannot find an annotated argument in the method unmatchedPathParamMethod."); + () -> store.save(ITest.BadPathParamService.class)); + assertEquals("Path param demoId in the url cannot find an annotated argument in the method unmatchedPathParamMethod.", + exception.getMessage()); } -} \ No newline at end of file +}