SudokuFX
Loading...
Searching...
No Matches
Package fr.softsf.sudokufx.testing.integration.service.external

Classes

class  VersionServiceITest
 

Functions

 [instance initializer]
 
void cleanup () throws Exception
 
int compareVersions (final String version1, final String version2)
 Compares two semantic versions (major.minor.patch).
 
void eachSetup ()
 
void givenEmptyGitHubResponse_whenCheckLatestVersion_thenLatestVersionTrue () throws Exception
 
void givenInvalidGitHubVersions_whenCheckLatestVersion_thenLatestVersionTrue (String onLineVersion) throws ExecutionException, InterruptedException, IOException
 
void givenInvalidJsonResponse_whenCheckLatestVersion_thenReturnsTrueAndLogsError () throws Exception
 
void givenNon200HttpStatus_whenCheckLatestVersion_thenLatestVersionTrue (int httpStatusCode) throws IOException, InterruptedException, ExecutionException
 
void givenRealCurrentVersion_whenCheckLatestVersion_thenCompareWithNearbyVersions () throws Exception
 

Variables

AutoCloseable closeable
 
ListAppender< ILoggingEvent > logWatcher
 
HttpClient mockHttpClient
 
HttpResponse< String > mockResponse
 
MyDateTime myDateTime
 
final ObjectMapper objectMapper = new ObjectMapper()
 

Function Documentation

◆ [instance initializer]()

fr.softsf.sudokufx.testing.integration.service.external.[instance initializer]
package

◆ cleanup()

void fr.softsf.sudokufx.testing.integration.service.external.cleanup ( ) throws Exception
package

◆ compareVersions()

int fr.softsf.sudokufx.testing.integration.service.external.compareVersions ( final String version1,
final String version2 )
private

Compares two semantic versions (major.minor.patch).

Parameters
version1the first version
version2the second version
Returns
negative if version1 < version2, positive if version1 > version2, zero if equal

◆ eachSetup()

void fr.softsf.sudokufx.testing.integration.service.external.eachSetup ( )
package

◆ givenEmptyGitHubResponse_whenCheckLatestVersion_thenLatestVersionTrue()

void fr.softsf.sudokufx.testing.integration.service.external.givenEmptyGitHubResponse_whenCheckLatestVersion_thenLatestVersionTrue ( ) throws Exception
package

◆ givenInvalidGitHubVersions_whenCheckLatestVersion_thenLatestVersionTrue()

void fr.softsf.sudokufx.testing.integration.service.external.givenInvalidGitHubVersions_whenCheckLatestVersion_thenLatestVersionTrue ( String onLineVersion) throws ExecutionException, InterruptedException, IOException
package

◆ givenInvalidJsonResponse_whenCheckLatestVersion_thenReturnsTrueAndLogsError()

void fr.softsf.sudokufx.testing.integration.service.external.givenInvalidJsonResponse_whenCheckLatestVersion_thenReturnsTrueAndLogsError ( ) throws Exception
package

◆ givenNon200HttpStatus_whenCheckLatestVersion_thenLatestVersionTrue()

void fr.softsf.sudokufx.testing.integration.service.external.givenNon200HttpStatus_whenCheckLatestVersion_thenLatestVersionTrue ( int httpStatusCode) throws IOException, InterruptedException, ExecutionException
package

◆ givenRealCurrentVersion_whenCheckLatestVersion_thenCompareWithNearbyVersions()

void fr.softsf.sudokufx.testing.integration.service.external.givenRealCurrentVersion_whenCheckLatestVersion_thenCompareWithNearbyVersions ( ) throws Exception
package

Variable Documentation

◆ closeable

AutoCloseable fr.softsf.sudokufx.testing.integration.service.external.closeable
private

◆ logWatcher

ListAppender<ILoggingEvent> fr.softsf.sudokufx.testing.integration.service.external.logWatcher
private

◆ mockHttpClient

HttpClient fr.softsf.sudokufx.testing.integration.service.external.mockHttpClient
private

◆ mockResponse

HttpResponse<String> fr.softsf.sudokufx.testing.integration.service.external.mockResponse
private

◆ myDateTime

MyDateTime fr.softsf.sudokufx.testing.integration.service.external.myDateTime
private

◆ objectMapper

final ObjectMapper fr.softsf.sudokufx.testing.integration.service.external.objectMapper = new ObjectMapper()
private