Fixed exception checking for case insensitivity

master
Robinson 2023-06-07 23:50:45 +02:00
parent 89cb7e2e0d
commit 92e311a63a
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
1 changed files with 5 additions and 8 deletions

View File

@ -1,8 +1,5 @@
/*
* Copyright 2020 dorkbox, llc
* Copyright (C) 2014 ZeroTurnaround <support@zeroturnaround.com>
* Contains fragments of code from Apache Commons Exec, rights owned
* by Apache Software Foundation (ASF).
* Copyright 2023 dorkbox, llc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -47,7 +44,7 @@ class TimeoutTest {
} catch (e: TimeoutException) {
val message = e.message
Assertions.assertTrue(message?.contains("1 SECOND") == true)
Assertions.assertTrue(message?.lowercase()?.contains("1 second") == true)
Assertions.assertTrue(message?.contains(TestSetup.getFile(Loop::class.java)) == true)
}
}
@ -68,7 +65,7 @@ class TimeoutTest {
Assertions.fail<Void>("TimeoutException expected.")
} catch (e: TimeoutException) {
Assertions.assertTrue(e.message?.contains("1 SECOND") == true)
Assertions.assertTrue(e.message?.lowercase()?.contains("1 second") == true)
}
}
@ -99,7 +96,7 @@ class TimeoutTest {
Assertions.fail<Void>("TimeoutException expected.")
} catch (e: TimeoutException) {
Assertions.assertTrue(e.message?.contains("1 SECOND") == true)
Assertions.assertTrue(e.message?.lowercase()?.contains("1 second") == true)
}
}
@ -134,7 +131,7 @@ class TimeoutTest {
Assertions.fail<Void>("TimeoutException expected.")
} catch (e: TimeoutException) {
Assertions.assertTrue(e.message?.contains("1 SECOND") == true)
Assertions.assertTrue(e.message?.lowercase()?.contains("1 second") == true)
}
}
}