-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bugfix/IJMP-1958-Remote-conflict-in-file' into 'release…
…/v2.0.2' IJMP-1958-Remote-conflict-in-file See merge request ijmp/for-mainframe!616
- Loading branch information
Showing
10 changed files
with
211 additions
and
3 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
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
53 changes: 53 additions & 0 deletions
53
...kotlin/eu/ibagroup/formainframe/dataops/content/adapters/DefaultContentAdapterTestSpec.kt
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,53 @@ | ||
/* | ||
* Copyright (c) 2024 IBA Group. | ||
* | ||
* This program and the accompanying materials are made available under the terms of the | ||
* Eclipse Public License v2.0 which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v20.html | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* IBA Group | ||
* Zowe Community | ||
*/ | ||
|
||
package eu.ibagroup.formainframe.dataops.content.adapters | ||
|
||
import eu.ibagroup.formainframe.dataops.DataOpsManager | ||
import eu.ibagroup.formainframe.testutils.WithApplicationShouldSpec | ||
import eu.ibagroup.formainframe.testutils.testServiceImpl.TestDataOpsManagerImpl | ||
import io.kotest.assertions.assertSoftly | ||
import io.kotest.matchers.shouldBe | ||
import io.mockk.clearAllMocks | ||
import io.mockk.spyk | ||
import io.mockk.unmockkAll | ||
|
||
class DefaultContentAdapterTestSpec: WithApplicationShouldSpec({ | ||
|
||
afterSpec { | ||
clearAllMocks() | ||
unmockkAll() | ||
} | ||
|
||
context("content/adapters: DefaultContentAdapter") { | ||
val dataOpsManager = DataOpsManager.getService() as TestDataOpsManagerImpl | ||
val classUnderTest = spyk(DefaultContentAdapter(dataOpsManager), "DefaultContentAdapter") | ||
|
||
should("shouldReturnAdaptedContent_whenAdaptWhitespaces_givenContentToAdapt") { | ||
val contentToAdapt = "This is a test string.\n Content should be replaced by \n" + | ||
"this content without trailing \n" + | ||
"\n" + | ||
" whitespaces..." | ||
val expected = "This is a test string.\n Content should be replaced by \n" + | ||
"this content without trailing \n" + | ||
"\n" + | ||
" whitespaces..." | ||
val adaptedContent = classUnderTest.adaptWhitespaces(contentToAdapt) | ||
|
||
assertSoftly { | ||
adaptedContent shouldBe expected | ||
} | ||
} | ||
} | ||
}) |
53 changes: 53 additions & 0 deletions
53
.../kotlin/eu/ibagroup/formainframe/dataops/content/adapters/MemberContentAdapterTestSpec.kt
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,53 @@ | ||
/* | ||
* Copyright (c) 2024 IBA Group. | ||
* | ||
* This program and the accompanying materials are made available under the terms of the | ||
* Eclipse Public License v2.0 which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v20.html | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* IBA Group | ||
* Zowe Community | ||
*/ | ||
|
||
package eu.ibagroup.formainframe.dataops.content.adapters | ||
|
||
import eu.ibagroup.formainframe.dataops.DataOpsManager | ||
import eu.ibagroup.formainframe.testutils.WithApplicationShouldSpec | ||
import eu.ibagroup.formainframe.testutils.testServiceImpl.TestDataOpsManagerImpl | ||
import io.kotest.assertions.assertSoftly | ||
import io.kotest.matchers.shouldBe | ||
import io.mockk.clearAllMocks | ||
import io.mockk.spyk | ||
import io.mockk.unmockkAll | ||
|
||
class MemberContentAdapterTestSpec: WithApplicationShouldSpec({ | ||
|
||
afterSpec { | ||
clearAllMocks() | ||
unmockkAll() | ||
} | ||
|
||
context("content/adapters: MemberContentAdapter") { | ||
val dataOpsManager = DataOpsManager.getService() as TestDataOpsManagerImpl | ||
val classUnderTest = spyk(MemberContentAdapter(dataOpsManager), "MemberContentAdapter") | ||
|
||
should("shouldReturnAdaptedContent_whenAdaptWhitespaces_givenContentToAdapt") { | ||
val contentToAdapt = "This is a test string.\n Content should be replaced by \n" + | ||
"this content without trailing \n" + | ||
"\n" + | ||
" whitespaces..." | ||
val expected = "This is a test string.\n Content should be replaced by\n" + | ||
"this content without trailing\n" + | ||
"\n" + | ||
" whitespaces..." | ||
val adaptedContent = classUnderTest.adaptWhitespaces(contentToAdapt) | ||
|
||
assertSoftly { | ||
adaptedContent shouldBe expected | ||
} | ||
} | ||
} | ||
}) |
53 changes: 53 additions & 0 deletions
53
...lin/eu/ibagroup/formainframe/dataops/content/adapters/SeqDatasetContentAdapterTestSpec.kt
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,53 @@ | ||
/* | ||
* Copyright (c) 2024 IBA Group. | ||
* | ||
* This program and the accompanying materials are made available under the terms of the | ||
* Eclipse Public License v2.0 which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v20.html | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* IBA Group | ||
* Zowe Community | ||
*/ | ||
|
||
package eu.ibagroup.formainframe.dataops.content.adapters | ||
|
||
import eu.ibagroup.formainframe.dataops.DataOpsManager | ||
import eu.ibagroup.formainframe.testutils.WithApplicationShouldSpec | ||
import eu.ibagroup.formainframe.testutils.testServiceImpl.TestDataOpsManagerImpl | ||
import io.kotest.assertions.assertSoftly | ||
import io.kotest.matchers.shouldBe | ||
import io.mockk.clearAllMocks | ||
import io.mockk.spyk | ||
import io.mockk.unmockkAll | ||
|
||
class SeqDatasetContentAdapterTestSpec: WithApplicationShouldSpec({ | ||
|
||
afterSpec { | ||
clearAllMocks() | ||
unmockkAll() | ||
} | ||
|
||
context("content/adapters: SeqDatasetContentAdapter") { | ||
val dataOpsManager = DataOpsManager.getService() as TestDataOpsManagerImpl | ||
val classUnderTest = spyk(SeqDatasetContentAdapter(dataOpsManager), "SeqDatasetContentAdapter") | ||
|
||
should("shouldReturnAdaptedContent_whenAdaptWhitespaces_givenContentToAdapt") { | ||
val contentToAdapt = "This is a test string.\n Content should be replaced by \n" + | ||
"this content without trailing \n" + | ||
"\n" + | ||
" whitespaces..." | ||
val expected = "This is a test string.\n Content should be replaced by\n" + | ||
"this content without trailing\n" + | ||
"\n" + | ||
" whitespaces..." | ||
val adaptedContent = classUnderTest.adaptWhitespaces(contentToAdapt) | ||
|
||
assertSoftly { | ||
adaptedContent shouldBe expected | ||
} | ||
} | ||
} | ||
}) |