-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix - multiline strings review note.
* Fix - not used method parameters review note. * Fix - String to Enum * Fix - replace boolean return values in XYZResponseAction methods.
- Loading branch information
1 parent
6032a64
commit c203ab6
Showing
33 changed files
with
628 additions
and
564 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
testApi/src/main/scala/africa/absa/testing/scapi/model/SuiteResult.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright 2023 ABSA Group Limited | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package africa.absa.testing.scapi.model | ||
|
||
import africa.absa.testing.scapi.model.SuiteResultType.SuiteResultType | ||
|
||
import scala.util.{Failure, Try} | ||
|
||
/** | ||
* Case class representing the results of a suite test. | ||
* | ||
* @param resultType The type of the result (e.g. Before, Test, After) | ||
* @param suiteName The name of the suite | ||
* @param name The name of the test or method | ||
* @param duration The duration of the test, if applicable | ||
* @param categories The categories of the test, if any | ||
* TODO | ||
*/ | ||
case class SuiteResult(resultType: SuiteResultType, | ||
suiteName: String, | ||
name: String, | ||
result: Try[Unit], | ||
duration: Option[Long], | ||
categories: Option[String] = None) { | ||
/** | ||
* Checks if the suite result was a success. | ||
* | ||
* @return true if the suite result was a success, false otherwise | ||
*/ | ||
def isSuccess: Boolean = result.isSuccess | ||
|
||
def errorMsg: Option[String] = result match { | ||
case Failure(t) => Some(t.getMessage) | ||
case _ => None | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
testApi/src/main/scala/africa/absa/testing/scapi/model/SuiteResultType.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright 2023 ABSA Group Limited | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package africa.absa.testing.scapi.model | ||
|
||
object SuiteResultType extends Enumeration { | ||
val BEFORE_SUITE, TEST_SUITE, AFTER_SUITE = Value | ||
type SuiteResultType = Value | ||
} |
81 changes: 0 additions & 81 deletions
81
testApi/src/main/scala/africa/absa/testing/scapi/model/SuiteResults.scala
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.