Skip to content

Commit

Permalink
IDE-89 Resolve conflicts and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ma-zea committed May 2, 2023
1 parent aaaac18 commit 5775642
Show file tree
Hide file tree
Showing 95 changed files with 49 additions and 1,249 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Catroid: An on-device visual programming system for Android devices
* Copyright (C) 2010-2022 The Catrobat Team
* Copyright (C) 2010-2023 The Catrobat Team
* (<http://developer.catrobat.org/credits>)
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -162,7 +162,7 @@ class CatroidWebServerAuthenticationTest : KoinTest {
@Test
fun testRegistrationOk() {
val token = sharedPreferences.getString(Constants.TOKEN, Constants.NO_TOKEN)
val response = webServer.register("Bearer $token", RegisterUser(true, newEmail, newUserName, password)).execute()
val response = webServer.register(RegisterUser(true, newEmail, newUserName, password)).execute()

val responseBody = response.body()
assertNotNull(responseBody)
Expand All @@ -176,7 +176,7 @@ class CatroidWebServerAuthenticationTest : KoinTest {
@Test
fun testRegisterWithNewUserButExistingEmail() {
val token = sharedPreferences.getString(Constants.TOKEN, Constants.NO_TOKEN)
val response = webServer.register("Bearer $token", RegisterUser(true, email, newUserName, password)).execute()
val response = webServer.register(RegisterUser(true, email, newUserName, password)).execute()

assertEquals(response.code(), SERVER_RESPONSE_REGISTER_UNPROCESSABLE_ENTITY)

Expand All @@ -188,7 +188,7 @@ class CatroidWebServerAuthenticationTest : KoinTest {
@Test
fun testRegisterWithExistingUserButNewEmail() {
val token = sharedPreferences.getString(Constants.TOKEN, Constants.NO_TOKEN)
val response = webServer.register("Bearer $token", RegisterUser(true, newEmail, username, password)).execute()
val response = webServer.register(RegisterUser(true, newEmail, username, password)).execute()

assertEquals(response.code(), SERVER_RESPONSE_REGISTER_UNPROCESSABLE_ENTITY)

Expand All @@ -200,7 +200,7 @@ class CatroidWebServerAuthenticationTest : KoinTest {
@Test
fun testRegisterAndLogin() {
val token = sharedPreferences.getString(Constants.TOKEN, Constants.NO_TOKEN)
val registrationResponse = webServer.register("Bearer $token", RegisterUser(true, newEmail, newUserName, password)).execute()
val registrationResponse = webServer.register(RegisterUser(true, newEmail, newUserName, password)).execute()

val loginResponse = webServer.login("Bearer $token", LoginUser(newUserName, password)).execute()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class CatroidWebServerProjectUploadTest : KoinTest {
newEmail = "$newUserName@api.at"

val response =
webServer.register("", RegisterUser(true, newEmail, newUserName, PASSWORD)).execute()
webServer.register(RegisterUser(true, newEmail, newUserName, PASSWORD)).execute()
val responseBody = response.body()
assertNotNull(responseBody)
assertNotNull(responseBody!!.token)
Expand All @@ -123,7 +123,7 @@ class CatroidWebServerProjectUploadTest : KoinTest {

val projectZip = ProjectZipper.zipProjectToArchive(
File(project?.directory!!.absolutePath),
File(Constants.CACHE_DIR, "upload${Constants.CATROBAT_EXTENSION}")
File(Constants.CACHE_DIRECTORY, "upload${Constants.CATROBAT_EXTENSION}")
)

assertNotNull(projectZip!!)
Expand Down Expand Up @@ -155,7 +155,7 @@ class CatroidWebServerProjectUploadTest : KoinTest {

val projectZip = ProjectZipper.zipProjectToArchive(
File(project?.directory!!.absolutePath),
File(Constants.CACHE_DIR, "upload${Constants.CATROBAT_EXTENSION}")
File(Constants.CACHE_DIRECTORY, "upload${Constants.CATROBAT_EXTENSION}")
)

assertNotNull(projectZip!!)
Expand Down

This file was deleted.

Loading

0 comments on commit 5775642

Please sign in to comment.