-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
1,038 additions
and
30 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
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
...per/dsl/ide/tests/commands/refactoring/CreateStakeholderForUserStoryRoleCommandTest.xtend
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 2024 The Context Mapper Project Team | ||
* | ||
* 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 org.contextmapper.dsl.ide.tests.commands.refactoring | ||
|
||
import com.google.gson.JsonArray | ||
import com.google.gson.JsonPrimitive | ||
import org.contextmapper.dsl.ide.commands.CMLCommandService | ||
import org.contextmapper.dsl.ide.tests.commands.AbstractCMLCommandTest | ||
import org.eclipse.lsp4j.ExecuteCommandParams | ||
import org.junit.jupiter.api.Test | ||
|
||
class CreateStakeholderForUserStoryRoleCommandTest extends AbstractCMLCommandTest { | ||
|
||
@Test | ||
def void testARCommandExecution() { | ||
// given | ||
initializeCommandsDynamically() | ||
val model = ''' | ||
UserStory TestStory { | ||
As a "Tester" I want to "create" an "Test" so that "" | ||
} | ||
''' | ||
val fileURI = 'test.cml'.writeFile(model) | ||
|
||
// when | ||
val refactoringParams = new JsonArray | ||
refactoringParams.add("TestStory") | ||
val result = languageServer.executeCommand( | ||
new ExecuteCommandParams("cml.ar.createStakeholderForUserStoryRole", | ||
#[new JsonPrimitive(fileURI), refactoringParams])) | ||
val resultVal = result.get as String | ||
|
||
// then | ||
CMLCommandService.COMMAND_EXECUTED_RETURN_VALUE.assertEquals(resultVal) | ||
} | ||
|
||
} |
48 changes: 48 additions & 0 deletions
48
.../dsl/ide/tests/commands/refactoring/CreateValueRegisterForBoundedContextCommandTest.xtend
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,48 @@ | ||
/* | ||
* Copyright 2024 The Context Mapper Project Team | ||
* | ||
* 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 org.contextmapper.dsl.ide.tests.commands.refactoring | ||
|
||
import com.google.gson.JsonArray | ||
import com.google.gson.JsonPrimitive | ||
import org.contextmapper.dsl.ide.commands.CMLCommandService | ||
import org.contextmapper.dsl.ide.tests.commands.AbstractCMLCommandTest | ||
import org.eclipse.lsp4j.ExecuteCommandParams | ||
import org.junit.jupiter.api.Test | ||
|
||
class CreateValueRegisterForBoundedContextCommandTest extends AbstractCMLCommandTest { | ||
|
||
@Test | ||
def void testARCommandExecution() { | ||
// given | ||
initializeCommandsDynamically() | ||
val model = ''' | ||
BoundedContext TestContext | ||
''' | ||
val fileURI = 'test.cml'.writeFile(model) | ||
|
||
// when | ||
val refactoringParams = new JsonArray | ||
refactoringParams.add("TestContext") | ||
val result = languageServer.executeCommand( | ||
new ExecuteCommandParams("cml.ar.createValueRegisterForBoundedContext", | ||
#[new JsonPrimitive(fileURI), refactoringParams])) | ||
val resultVal = result.get as String | ||
|
||
// then | ||
CMLCommandService.COMMAND_EXECUTED_RETURN_VALUE.assertEquals(resultVal) | ||
} | ||
|
||
} |
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
Oops, something went wrong.