-
Notifications
You must be signed in to change notification settings - Fork 3
created sumties TRUE and FALSE #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ca7179b
created sumties TRUE and FALSE
magwas 0f6a2a9
Update inez.model/src/main/java/io/github/magwas/inez/element/GetBrid…
magwas 0a49913
Update inez.model/src/main/java/io/github/magwas/inez/element/GetBrid…
magwas 81424b5
Update inez.model/src/main/java/io/github/magwas/inez/element/GetBrid…
magwas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
129 changes: 129 additions & 0 deletions
129
.../main/java/io/github/magwas/inez/element/BridiElementSystemInitializationServiceTest.java
This file contains hidden or 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,129 @@ | ||
| package io.github.magwas.inez.element; | ||
|
|
||
| import static org.mockito.Mockito.verify; | ||
|
|
||
| import java.io.IOException; | ||
|
|
||
| import org.junit.jupiter.api.BeforeEach; | ||
| import org.junit.jupiter.api.DisplayName; | ||
| import org.junit.jupiter.api.Test; | ||
| import org.mockito.InjectMocks; | ||
|
|
||
| import io.github.magwas.testing.TestBase; | ||
|
|
||
| public class BridiElementSystemInitializationServiceTest extends TestBase | ||
| implements ElementConstants { | ||
|
|
||
| @InjectMocks | ||
| public BridiElementSystemInitializationService bridiElementSystemInitialization; | ||
|
|
||
| @BeforeEach | ||
| public void setUp() throws Throwable { | ||
| super.setUp(); | ||
| bridiElementSystemInitialization.apply(); | ||
| } | ||
|
|
||
| @Test | ||
| @DisplayName("creates sumti IS_A") | ||
| void test() throws IOException { | ||
| verify(bridiElementSystemInitialization.inez).createSumti(IS_A_ID, | ||
| IS_A_REPR); | ||
| } | ||
|
|
||
| @Test | ||
| @DisplayName("creates sumti CONTAINS") | ||
| void test1() throws IOException { | ||
| verify(bridiElementSystemInitialization.inez).createSumti(CONTAINS_ID, | ||
| CONTAINS_REPR); | ||
| } | ||
|
|
||
| @Test | ||
| @DisplayName("creates sumti ROOT") | ||
| void test2() throws IOException { | ||
| verify(bridiElementSystemInitialization.inez).createSumti(ROOT_ID, ROOT_ID); | ||
| } | ||
|
|
||
| @Test | ||
| @DisplayName("creates sumti THING") | ||
| void test3() throws IOException { | ||
| verify(bridiElementSystemInitialization.inez).createSumti(THING_ID, | ||
| THING_ID); | ||
| } | ||
|
|
||
| @Test | ||
| @DisplayName("creates sumti CONTAINER") | ||
| void test4() throws IOException { | ||
| verify(bridiElementSystemInitialization.inez).createSumti(CONTAINER_ID, | ||
| CONTAINER_ID); | ||
| } | ||
|
|
||
| @Test | ||
| @DisplayName("creates sumti UNPLACED") | ||
| void test5() throws IOException { | ||
| verify(bridiElementSystemInitialization.inez).createSumti(UNPLACED_ID, | ||
| UNPLACED_ID); | ||
| } | ||
|
|
||
| @Test | ||
| @DisplayName("creates sumti TRUE") | ||
| void test6() throws IOException { | ||
| verify(bridiElementSystemInitialization.inez).createSumti(TRUE_ID, TRUE_ID); | ||
| } | ||
|
|
||
| @Test | ||
| @DisplayName("creates sumti FALSE") | ||
| void test7() throws IOException { | ||
| verify(bridiElementSystemInitialization.inez).createSumti(FALSE_ID, | ||
| FALSE_ID); | ||
| } | ||
|
|
||
| @Test | ||
| @DisplayName("creates sumti IS_FUNCTION_FOR") | ||
| void test8() throws IOException { | ||
| verify(bridiElementSystemInitialization.inez) | ||
| .createSumti(IS_FUNCTION_FOR_ID, IS_FUNCTION_FOR_REPR); | ||
| } | ||
|
|
||
| @Test | ||
| @DisplayName("creates sumti SAVE_FUNCTION_REF") | ||
| void test9() throws IOException { | ||
| verify(bridiElementSystemInitialization.inez) | ||
| .createSumti(SAVE_FUNCTION_REF_ID, SAVE_FUNCTION_REF_ID); | ||
| } | ||
|
|
||
| @Test | ||
| @DisplayName("creates sumti DOSAVE") | ||
| void test10() throws IOException { | ||
| verify(bridiElementSystemInitialization.inez).createSumti(DOSAVE_ID, | ||
| DOSAVE_REPR); | ||
| } | ||
|
|
||
| @Test | ||
| @DisplayName("creates sumti DIAGRAM") | ||
| void test11() throws IOException { | ||
| verify(bridiElementSystemInitialization.inez).createSumti(DIAGRAM_ID, | ||
| DIAGRAM_ID); | ||
| } | ||
|
|
||
| @Test | ||
| @DisplayName("creates sumti DIAGRAM_ELEMENT") | ||
| void test12() throws IOException { | ||
| verify(bridiElementSystemInitialization.inez) | ||
| .createSumti(DIAGRAM_ELEMENT_ID, DIAGRAM_ELEMENT_REPR); | ||
| } | ||
|
|
||
| @Test | ||
| @DisplayName("creates bridis from the definition file") | ||
| void test13() throws IOException { | ||
| verify(bridiElementSystemInitialization.inez) | ||
| .createFromdefinitions(ELEMENT_DEFINITIONS_RESOURCE); | ||
| } | ||
|
|
||
| @Test | ||
| @DisplayName("logs success") | ||
| void test14() throws IOException { | ||
| verify(bridiElementSystemInitialization.logger) | ||
| .info("BridiElement system initialized"); | ||
| } | ||
|
|
||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,16 +1,36 @@ | ||
| <element id='id:my model' type='id:folder' name='my model'> | ||
| <references> | ||
| </references> | ||
| <element id='IS_A' type='THING' name='{0} is a {1}'> | ||
| <element id='id:alice' type='id:human' name='alice'> | ||
| </element> | ||
| <element id='id:dog' type='id:animal' name='dog'> | ||
| </element> | ||
| <element id='id:human' type='id:animal' name='human'> | ||
| </element> | ||
| <element id='id:{alice} is a {human}' type='THING' name='{alice} is a {human}'> | ||
| <references> | ||
| <reference>IS_A</reference> | ||
| <reference>id:alice</reference> | ||
| <reference>id:human</reference> | ||
| </references> | ||
| </element> | ||
| <element id='id:alice' type='id:human' name='alice'> | ||
| <element id='id:{dog} is a {animal}' type='THING' name='{dog} is a {animal}'> | ||
| <references> | ||
| <reference>IS_A</reference> | ||
| <reference>id:dog</reference> | ||
| <reference>id:animal</reference> | ||
| </references> | ||
| </element> | ||
| <element id='id:human' type='id:animal' name='human'> | ||
| <element id='id:{human} is a {animal}' type='THING' name='{human} is a {animal}'> | ||
| <references> | ||
| <reference>IS_A</reference> | ||
| <reference>id:human</reference> | ||
| <reference>id:animal</reference> | ||
| </references> | ||
| </element> | ||
| <element id='id:{my model} is a {folder}' type='THING' name='{my model} is a {folder}'> | ||
| <references> | ||
| <reference>IS_A</reference> | ||
| <reference>id:my model</reference> | ||
| <reference>id:folder</reference> | ||
| </references> | ||
| </element> | ||
| </element> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.