Skip to content

Commit

Permalink
Merge pull request #1 from RM2PT/jdk8-junit4-maven-execute
Browse files Browse the repository at this point in the history
Jdk8 junit4 maven execute
  • Loading branch information
yylonly authored May 27, 2019
2 parents e0a9369 + 6c6b4b8 commit 00cfd72
Show file tree
Hide file tree
Showing 53 changed files with 6,762 additions and 14,256 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.jar
.DS_Store
**/target/
src-gen
!MainTest.java
!ThirdPartServices.java
!ThirdPartServicesImpl.java
61 changes: 27 additions & 34 deletions net.mydreamy.casestudies.atm.autogui/.classpath
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src-gen">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src-gen">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
24 changes: 24 additions & 0 deletions net.mydreamy.casestudies.atm.autogui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,30 @@
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>gui.Main</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M1</version>
<configuration>
<test>gui.MainTest</test>
</configuration>
</plugin>

</plugins>
</build>

Expand Down
1,824 changes: 919 additions & 905 deletions net.mydreamy.casestudies.atm.autogui/requirementmodel/atm.aird

Large diffs are not rendered by default.

115 changes: 62 additions & 53 deletions net.mydreamy.casestudies.atm.autogui/requirementmodel/atm.remodel
Original file line number Diff line number Diff line change
@@ -1,22 +1,78 @@
UseCaseModel AutomatedTellerMachine {

UC::withdrawCash() -> ATMSystem include cardIdentification
UC::checkBalance() -> ATMSystem include cardIdentification
UC::depositFunds() -> ATMSystem
UC::manageBankCard()
UC::manageUser()
UC::cardIdentification()

Actor Customer {

UC::withdrawCash() -> ATMSystem include cardIdentification
UC::checkBalance() -> ATMSystem include cardIdentification
UC::depositFunds() -> ATMSystem
withdrawCash
checkBalance
depositFunds

}

Actor BankClerk {

UC::manageBankCard()
UC::manageUser()
manageBankCard
manageUser

}

UC::cardIdentification()
}

DomainModel ATM {

@AutoCRUD
Entity BankCard {

CardID : Integer
CardStatus : CardStatus[NORMAL|SUSPEND|CANNEL]
Catalog : CardCatalog[CREDIT|DESPOSIT]
Password : Integer
Balance : Real

[Refer]
BelongedUser : User (Association)
Has : Transcation* (Association)

[INV]
inv UniqueCardID : BankCard.allInstance()->isUnique(b:BankCard | b.CardID)
inv BalanceGreatAndEqualZero : Balance >= 0

}

@AutoCRUD
Entity User {

UserID : Integer
Name : String
Address : String

[Refer]
OwnedCard : BankCard* ! ( Association)

[INV]
inv UniqueUserID : User.allInstance()->isUnique(u:User | u.UserID)

}

Entity Transcation {

WithdrawedNum : Integer
BalanceAfterWithdraw : Real

[Refer]
InvolvedCard : BankCard ! ( Association)

[INV]
inv WithdrawedNumGreatAndEqualZero : WithdrawedNum >= 0
inv BalanceAfterWithdrawGreatAndEqualZero : BalanceAfterWithdraw >= 0

}
}

Service ATMSystem {
Expand Down Expand Up @@ -229,53 +285,6 @@ Interaction DepositFundsInteraction {

}

@AutoCRUD
Entity BankCard {

CardID : Integer
CardStatus : CardStatus[NORMAL|SUSPEND|CANNEL]
Catalog : CardCatalog[CREDIT|DESPOSIT]
Password : Integer
Balance : Real

[Refer]
BelongedUser : User
Has : Transcation*

[INV]
inv UniqueCardID : BankCard.allInstance()->isUnique(b:BankCard | b.CardID)
inv BalanceGreatAndEqualZero : Balance >= 0

}

@AutoCRUD
Entity User {

UserID : Integer
Name : String
Address : String

[Refer]
OwnedCard : BankCard*

[INV]
inv UniqueUserID : User.allInstance()->isUnique(u:User | u.UserID)

}

Entity Transcation {

WithdrawedNum : Integer
BalanceAfterWithdraw : Real

[Refer]
InvolvedCard : BankCard

[INV]
inv WithdrawedNumGreatAndEqualZero : WithdrawedNum >= 0
inv BalanceAfterWithdrawGreatAndEqualZero : BalanceAfterWithdraw >= 0

}



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.testfx.matcher.control.TableViewMatchers;
import org.testfx.matcher.control.TextMatchers;

import gui.Main;
import javafx.scene.control.TextField;
import javafx.scene.control.TitledPane;
import javafx.scene.input.KeyCode;
Expand All @@ -42,8 +43,7 @@ public class MainTest extends ApplicationTest {
}


@Test
@Ignore

public void TestTwoTabs() {

//add delay for less power computer
Expand All @@ -53,7 +53,7 @@ public void TestTwoTabs() {

sleep(1000);

clickOn("System Status");
clickOn("System State");

sleep(1000);

Expand Down Expand Up @@ -93,7 +93,7 @@ public void a_TestPrepareData() {

sleep(1000);

clickOn("System Status");
clickOn("System State");
clickOn("User");


Expand Down Expand Up @@ -136,7 +136,7 @@ public void a_TestPrepareData() {

sleep(1000);

clickOn("System Status");
clickOn("System State");
type(KeyCode.TAB);
type(KeyCode.TAB);
type(KeyCode.UP);
Expand Down Expand Up @@ -182,8 +182,8 @@ public void b_TestWithDraw() {
FxAssert.verifyThat((TitledPane)lookup("#operation_return_pane").query(), NodeMatchers.isNotNull());
FxAssert.verifyThat(((TitledPane)lookup("#operation_return_pane").query()).getContent(), NodeMatchers.hasText("true"));

//check system status of balances
clickOn("System Status").clickOn("BankCard").sleep(1000);
//check System State of balances
clickOn("System State").clickOn("BankCard").sleep(1000);

//print recipt
clickOn("System Function").clickOn("printReceipt").clickOn("#execute").sleep(1000);
Expand Down Expand Up @@ -226,8 +226,8 @@ public void c_TestDeposit() {
FxAssert.verifyThat((TitledPane)lookup("#operation_return_pane").query(), NodeMatchers.isNotNull());
FxAssert.verifyThat(((TitledPane)lookup("#operation_return_pane").query()).getContent(), NodeMatchers.hasText("true"));

//check system status of balances
clickOn("System Status").clickOn("BankCard").sleep(1000);
//check System State of balances
clickOn("System State").clickOn("BankCard").sleep(1000);

//print recipt
clickOn("System Function").clickOn("printReceipt").clickOn("#execute").sleep(1000);
Expand Down
29 changes: 0 additions & 29 deletions net.mydreamy.casestudies.atm/.project

This file was deleted.

6 changes: 0 additions & 6 deletions net.mydreamy.casestudies.atm/META-INF/MANIFEST.MF

This file was deleted.

1 change: 0 additions & 1 deletion net.mydreamy.casestudies.atm/build.properties

This file was deleted.

Loading

0 comments on commit 00cfd72

Please sign in to comment.