File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
src/test/java/com/github/stickerifier/stickerify Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 11package com .github .stickerifier .stickerify ;
22
3- import static org .junit .jupiter .api .Assumptions . assumeTrue ;
3+ import static org .junit .jupiter .api .Assertions . assertNotNull ;
44
55import java .io .File ;
66
77public final class ResourceHelper {
88
99 public static File loadResource (String filename ) {
1010 var resource = ResourceHelper .class .getClassLoader ().getResource (filename );
11- assumeTrue (resource != null , "Test resource [%s] not found." .formatted (filename ));
11+ assertNotNull (resource , "Test resource [%s] not found." .formatted (filename ));
1212
1313 return new File (resource .getFile ());
1414 }
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ public final class MockResponses {
184184 },
185185 photo: [
186186 {
187- file_id: "valid .webp",
187+ file_id: "static .webp",
188188 file_size: 200000
189189 }
190190 ]
Original file line number Diff line number Diff line change @@ -163,8 +163,8 @@ void convertedPng() throws Exception {
163163 @ Test
164164 void convertedWebp () throws Exception {
165165 server .enqueue (MockResponses .WEBP_FILE );
166- server .enqueue (MockResponses .fileInfo ("valid .webp" ));
167- server .enqueue (MockResponses .fileDownload (loadResource ("valid .webp" )));
166+ server .enqueue (MockResponses .fileInfo ("static .webp" ));
167+ server .enqueue (MockResponses .fileDownload (loadResource ("static .webp" )));
168168
169169 startBot ();
170170
@@ -173,10 +173,10 @@ void convertedWebp() throws Exception {
173173
174174 var getFile = server .takeRequest ();
175175 assertEquals ("/api/token/getFile" , getFile .getPath ());
176- assertEquals ("file_id=valid .webp" , getFile .getBody ().readUtf8 ());
176+ assertEquals ("file_id=static .webp" , getFile .getBody ().readUtf8 ());
177177
178178 var download = server .takeRequest ();
179- assertEquals ("/files/token/valid .webp" , download .getPath ());
179+ assertEquals ("/files/token/static .webp" , download .getPath ());
180180
181181 var sendDocument = server .takeRequest ();
182182 assertEquals ("/api/token/sendDocument" , sendDocument .getPath ());
You can’t perform that action at this time.
0 commit comments