Skip to content

Commit

Permalink
Final JEDi adjustments (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-ka authored Aug 22, 2024
1 parent 98a3a62 commit 45b32c3
Show file tree
Hide file tree
Showing 11 changed files with 220 additions and 104 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,34 @@ public void canCreateStakeholderDiagramWithContext() throws IOException {
// then
assertEquals("@startmindmap" + System.lineSeparator()
+ System.lineSeparator()
+ "<style>" + System.lineSeparator()
+ "node {" + System.lineSeparator()
+ " MaximumWidth 300" + System.lineSeparator()
+ "}" + System.lineSeparator()
+ "</style>" + System.lineSeparator()
+ "" + System.lineSeparator()
+ "* SameDayDelivery" + System.lineSeparator()
+ "** Product_Suppliers" + System.lineSeparator()
+ "*** Managers" + System.lineSeparator()
+ "*** Logistics_Warehouse_Staff_of_Suppliers" + System.lineSeparator()
+ "*** Delivery_Staff_of_Suppliers" + System.lineSeparator()
+ "** Competing_Companies" + System.lineSeparator()
+ "** Government" + System.lineSeparator()
+ "** <b>Product_Suppliers</b>" + System.lineSeparator()
+ "*** <b>Managers</b>" + System.lineSeparator()
+ "*** <b>Logistics_Warehouse_Staff_of_Suppliers</b>" + System.lineSeparator()
+ "*** <b>Delivery_Staff_of_Suppliers</b>" + System.lineSeparator()
+ "** <b>Competing_Companies</b>" + System.lineSeparator()
+ "** <b>Government</b>" + System.lineSeparator()
+ System.lineSeparator()
+ "left side" + System.lineSeparator()
+ "** Online_Shopping_Company" + System.lineSeparator()
+ "*** Development_Team" + System.lineSeparator()
+ "*** Product_Management" + System.lineSeparator()
+ "*** Customer_Relationship_Manager" + System.lineSeparator()
+ "** Delivery_Partners" + System.lineSeparator()
+ "*** Route_Planners" + System.lineSeparator()
+ "*** Drivers" + System.lineSeparator()
+ "** Logistics_Team" + System.lineSeparator()
+ "*** Logistics_Manager" + System.lineSeparator()
+ "*** Warehouse_Staff" + System.lineSeparator()
+ "** Customers_and_Shoppers" + System.lineSeparator()
+ "*** Shoppers_in_Emergency_Situations" + System.lineSeparator()
+ "*** Others" + System.lineSeparator()
+ "left side" + System.lineSeparator()
+ "** <b>Online_Shopping_Company</b>" + System.lineSeparator()
+ "*** <b>Development_Team</b>" + System.lineSeparator()
+ "*** <b>Product_Management</b>" + System.lineSeparator()
+ "*** <b>Customer_Relationship_Manager</b>" + System.lineSeparator()
+ "** <b>Delivery_Partners</b>" + System.lineSeparator()
+ "*** <b>Route_Planners</b>" + System.lineSeparator()
+ "*** <b>Drivers</b>" + System.lineSeparator()
+ "** <b>Logistics_Team</b>" + System.lineSeparator()
+ "*** <b>Logistics_Manager</b>" + System.lineSeparator()
+ "*** <b>Warehouse_Staff</b>" + System.lineSeparator()
+ "** <b>Customers_and_Shoppers</b>" + System.lineSeparator()
+ "*** <b>Shoppers_in_Emergency_Situations</b>" + System.lineSeparator()
+ "*** <b>Others</b>" + System.lineSeparator()
+ System.lineSeparator()
+ System.lineSeparator()
+ "@endmindmap" + System.lineSeparator(), stakeholderDiagram);
Expand All @@ -81,28 +87,34 @@ public void canCreateStakeholderDiagramWithMultipleContext() throws IOException
// then
assertEquals("@startmindmap" + System.lineSeparator()
+ System.lineSeparator()
+ "* SameDayDelivery, Context2" + System.lineSeparator()
+ "** Product_Suppliers" + System.lineSeparator()
+ "*** Managers" + System.lineSeparator()
+ "*** Logistics_Warehouse_Staff_of_Suppliers" + System.lineSeparator()
+ "*** Delivery_Staff_of_Suppliers" + System.lineSeparator()
+ "** Competing_Companies" + System.lineSeparator()
+ "** Government" + System.lineSeparator()
+ "<style>" + System.lineSeparator()
+ "node {" + System.lineSeparator()
+ " MaximumWidth 300" + System.lineSeparator()
+ "}" + System.lineSeparator()
+ "</style>" + System.lineSeparator()
+ System.lineSeparator()
+ "left side" + System.lineSeparator()
+ "** Online_Shopping_Company" + System.lineSeparator()
+ "*** Development_Team" + System.lineSeparator()
+ "*** Product_Management" + System.lineSeparator()
+ "*** Customer_Relationship_Manager" + System.lineSeparator()
+ "** Delivery_Partners" + System.lineSeparator()
+ "*** Route_Planners" + System.lineSeparator()
+ "*** Drivers" + System.lineSeparator()
+ "** Logistics_Team" + System.lineSeparator()
+ "*** Logistics_Manager" + System.lineSeparator()
+ "*** Warehouse_Staff" + System.lineSeparator()
+ "** Customers_and_Shoppers" + System.lineSeparator()
+ "*** Shoppers_in_Emergency_Situations" + System.lineSeparator()
+ "*** Others" + System.lineSeparator()
+ "* SameDayDelivery, Context2" + System.lineSeparator()
+ "** <b>Product_Suppliers</b>" + System.lineSeparator()
+ "*** <b>Managers</b>" + System.lineSeparator()
+ "*** <b>Logistics_Warehouse_Staff_of_Suppliers</b>" + System.lineSeparator()
+ "*** <b>Delivery_Staff_of_Suppliers</b>" + System.lineSeparator()
+ "** <b>Competing_Companies</b>" + System.lineSeparator()
+ "** <b>Government</b>" + System.lineSeparator()
+ "" + System.lineSeparator()
+ "left side" + System.lineSeparator()
+ "** <b>Online_Shopping_Company</b>" + System.lineSeparator()
+ "*** <b>Development_Team</b>" + System.lineSeparator()
+ "*** <b>Product_Management</b>" + System.lineSeparator()
+ "*** <b>Customer_Relationship_Manager</b>" + System.lineSeparator()
+ "** <b>Delivery_Partners</b>" + System.lineSeparator()
+ "*** <b>Route_Planners</b>" + System.lineSeparator()
+ "*** <b>Drivers</b>" + System.lineSeparator()
+ "** <b>Logistics_Team</b>" + System.lineSeparator()
+ "*** <b>Logistics_Manager</b>" + System.lineSeparator()
+ "*** <b>Warehouse_Staff</b>" + System.lineSeparator()
+ "** <b>Customers_and_Shoppers</b>" + System.lineSeparator()
+ "*** <b>Shoppers_in_Emergency_Situations</b>" + System.lineSeparator()
+ "*** <b>Others</b>" + System.lineSeparator()
+ System.lineSeparator()
+ System.lineSeparator()
+ "@endmindmap" + System.lineSeparator(), stakeholderDiagram);
Expand All @@ -118,29 +130,35 @@ public void canCreateStakeholderDiagramWithDefaultContext() throws IOException {

// then
assertEquals("@startmindmap" + System.lineSeparator()
+ System.lineSeparator()
+ "<style>" + System.lineSeparator()
+ "node {" + System.lineSeparator()
+ " MaximumWidth 300" + System.lineSeparator()
+ "}" + System.lineSeparator()
+ "</style>" + System.lineSeparator()
+ System.lineSeparator()
+ "* System of Interest" + System.lineSeparator()
+ "** Product_Suppliers" + System.lineSeparator()
+ "*** Managers" + System.lineSeparator()
+ "*** Logistics_Warehouse_Staff_of_Suppliers" + System.lineSeparator()
+ "*** Delivery_Staff_of_Suppliers" + System.lineSeparator()
+ "** Competing_Companies" + System.lineSeparator()
+ "** Government" + System.lineSeparator()
+ "** <b>Product_Suppliers</b>" + System.lineSeparator()
+ "*** <b>Managers</b>" + System.lineSeparator()
+ "*** <b>Logistics_Warehouse_Staff_of_Suppliers</b>" + System.lineSeparator()
+ "*** <b>Delivery_Staff_of_Suppliers</b>" + System.lineSeparator()
+ "** <b>Competing_Companies</b>" + System.lineSeparator()
+ "** <b>Government</b>" + System.lineSeparator()
+ System.lineSeparator()
+ "left side" + System.lineSeparator()
+ "** Online_Shopping_Company" + System.lineSeparator()
+ "*** Development_Team" + System.lineSeparator()
+ "*** Product_Management" + System.lineSeparator()
+ "*** Customer_Relationship_Manager" + System.lineSeparator()
+ "** Delivery_Partners" + System.lineSeparator()
+ "*** Route_Planners" + System.lineSeparator()
+ "*** Drivers" + System.lineSeparator()
+ "** Logistics_Team" + System.lineSeparator()
+ "*** Logistics_Manager" + System.lineSeparator()
+ "*** Warehouse_Staff" + System.lineSeparator()
+ "** Customers_and_Shoppers" + System.lineSeparator()
+ "*** Shoppers_in_Emergency_Situations" + System.lineSeparator()
+ "*** Others" + System.lineSeparator()
+ "left side" + System.lineSeparator()
+ "** <b>Online_Shopping_Company</b>" + System.lineSeparator()
+ "*** <b>Development_Team</b>" + System.lineSeparator()
+ "*** <b>Product_Management</b>" + System.lineSeparator()
+ "*** <b>Customer_Relationship_Manager</b>" + System.lineSeparator()
+ "** <b>Delivery_Partners</b>" + System.lineSeparator()
+ "*** <b>Route_Planners</b>" + System.lineSeparator()
+ "*** <b>Drivers</b>" + System.lineSeparator()
+ "** <b>Logistics_Team</b>" + System.lineSeparator()
+ "*** <b>Logistics_Manager</b>" + System.lineSeparator()
+ "*** <b>Warehouse_Staff</b>" + System.lineSeparator()
+ "** <b>Customers_and_Shoppers</b>" + System.lineSeparator()
+ "*** <b>Shoppers_in_Emergency_Situations</b>" + System.lineSeparator()
+ "*** <b>Others</b>" + System.lineSeparator()
+ System.lineSeparator()
+ System.lineSeparator()
+ "@endmindmap" + System.lineSeparator(), stakeholderDiagram);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 The Context Mapper Project Team
* Copyright 2023-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.
Expand Down Expand Up @@ -58,9 +58,15 @@ public void canCreateUseCaseDiagram() throws IOException {
+ "Actor_1 -- Just_do_something" + System.lineSeparator()
+ System.lineSeparator()
+ "note bottom of (Get_paid_for_car_accident)" + System.lineSeparator()
+ " //Benefit:// A claimant submits a claim and and gets paid from the insurance company." + System.lineSeparator()
+ " //Level:// Summary" + System.lineSeparator()
+ " //Scope:// Insurance company" + System.lineSeparator()
+ " //Level:// Summary" + System.lineSeparator()
+ " //Feature:// submit a Claim" + System.lineSeparator()
+ " //Feature:// verifyExistanceOf Policy" + System.lineSeparator()
+ " //Feature:// assign an Agent for a Claim" + System.lineSeparator()
+ " //Feature:// verify Policy" + System.lineSeparator()
+ " //Feature:// pay Claimant" + System.lineSeparator()
+ " //Feature:// close Claim" + System.lineSeparator()
+ " //Benefit:// A claimant submits a claim and and gets paid from the insurance company." + System.lineSeparator()
+ "end note"
+ System.lineSeparator()
+ System.lineSeparator()
Expand Down Expand Up @@ -98,9 +104,15 @@ public void canCreateUseCaseDiagramWithSecondaryActors() throws IOException {
+ "Get_paid_for_car_accident -- Actor_2" + System.lineSeparator()
+ System.lineSeparator()
+ "note bottom of (Get_paid_for_car_accident)" + System.lineSeparator()
+ " //Benefit:// A claimant submits a claim and and gets paid from the insurance company." + System.lineSeparator()
+ " //Level:// Summary" + System.lineSeparator()
+ " //Scope:// Insurance company" + System.lineSeparator()
+ " //Level:// Summary" + System.lineSeparator()
+ " //Feature:// submit a Claim" + System.lineSeparator()
+ " //Feature:// verifyExistanceOf Policy" + System.lineSeparator()
+ " //Feature:// assign an Agent for a Claim" + System.lineSeparator()
+ " //Feature:// verify Policy" + System.lineSeparator()
+ " //Feature:// pay Claimant" + System.lineSeparator()
+ " //Feature:// close Claim" + System.lineSeparator()
+ " //Benefit:// A claimant submits a claim and and gets paid from the insurance company." + System.lineSeparator()
+ "end note"
+ System.lineSeparator()
+ System.lineSeparator()
Expand Down Expand Up @@ -134,11 +146,18 @@ public void canCreateUseCaseDiagramForMixedUseCasesAndUserStories() throws IOExc
+ "Actor_1 -- Just_do_something" + System.lineSeparator()
+ System.lineSeparator()
+ "note bottom of (Get_paid_for_car_accident)" + System.lineSeparator()
+ " //Benefit:// A claimant submits a claim and and gets paid from the insurance company." + System.lineSeparator()
+ " //Level:// Summary" + System.lineSeparator()
+ " //Scope:// Insurance company" + System.lineSeparator()
+ " //Level:// Summary" + System.lineSeparator()
+ " //Feature:// submit a Claim" + System.lineSeparator()
+ " //Feature:// verifyExistanceOf Policy" + System.lineSeparator()
+ " //Feature:// assign an Agent for a Claim" + System.lineSeparator()
+ " //Feature:// verify Policy" + System.lineSeparator()
+ " //Feature:// pay Claimant" + System.lineSeparator()
+ " //Feature:// close Claim" + System.lineSeparator()
+ " //Benefit:// A claimant submits a claim and and gets paid from the insurance company." + System.lineSeparator()
+ "end note" + System.lineSeparator()
+ "note bottom of (Just_do_something)" + System.lineSeparator()
+ " //Feature:// do Nothing" + System.lineSeparator()
+ " //Benefit:// I earn my name" + System.lineSeparator()
+ "end note"
+ System.lineSeparator()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ public void canCreateValueImpactMapDiagramDiagramWithoutBoundedContext() throws
+ " .green {" + System.lineSeparator()
+ " BackgroundColor lightgreen" + System.lineSeparator()
+ " }" + System.lineSeparator()
+ " .yellow {" + System.lineSeparator()
+ " BackgroundColor gold" + System.lineSeparator()
+ " }" + System.lineSeparator()
+ " .red {" + System.lineSeparator()
+ " BackgroundColor tomato" + System.lineSeparator()
+ " }" + System.lineSeparator()
Expand All @@ -63,10 +66,7 @@ public void canCreateValueImpactMapDiagramDiagramWithoutBoundedContext() throws
+ "<b>System of Interest (SOI)</b>;" + System.lineSeparator()
+ "** <b>Drivers</b>" + System.lineSeparator()
+ "***:<b>WorkLifeBalance</b>" + System.lineSeparator()
+ "----" + System.lineSeparator()
+ "Priority HIGH" + System.lineSeparator()
+ "Impact HIGH" + System.lineSeparator()
+ ";" + System.lineSeparator()
+ "; <<yellow>>" + System.lineSeparator()
+ "@endmindmap" + System.lineSeparator(), valueImpactMapDiagram);
}

Expand All @@ -90,6 +90,9 @@ public void canCreateSimpleValueImpactMapDiagram() throws IOException {
+ " .green {" + System.lineSeparator()
+ " BackgroundColor lightgreen" + System.lineSeparator()
+ " }" + System.lineSeparator()
+ " .yellow {" + System.lineSeparator()
+ " BackgroundColor gold" + System.lineSeparator()
+ " }" + System.lineSeparator()
+ " .red {" + System.lineSeparator()
+ " BackgroundColor tomato" + System.lineSeparator()
+ " }" + System.lineSeparator()
Expand Down Expand Up @@ -133,6 +136,9 @@ public void canCreateSimpleValueImpactMapDiagram4ValueCluster() throws IOExcepti
+ " .green {" + System.lineSeparator()
+ " BackgroundColor lightgreen" + System.lineSeparator()
+ " }" + System.lineSeparator()
+ " .yellow {" + System.lineSeparator()
+ " BackgroundColor gold" + System.lineSeparator()
+ " }" + System.lineSeparator()
+ " .red {" + System.lineSeparator()
+ " BackgroundColor tomato" + System.lineSeparator()
+ " }" + System.lineSeparator()
Expand Down Expand Up @@ -176,6 +182,9 @@ public void canRespectValuesInValueClusters() throws IOException {
+ " .green {" + System.lineSeparator()
+ " BackgroundColor lightgreen" + System.lineSeparator()
+ " }" + System.lineSeparator()
+ " .yellow {" + System.lineSeparator()
+ " BackgroundColor gold" + System.lineSeparator()
+ " }" + System.lineSeparator()
+ " .red {" + System.lineSeparator()
+ " BackgroundColor tomato" + System.lineSeparator()
+ " }" + System.lineSeparator()
Expand Down Expand Up @@ -231,6 +240,9 @@ public void canHandleRecurringStakeholders() throws IOException {
+ " .green {" + System.lineSeparator()
+ " BackgroundColor lightgreen" + System.lineSeparator()
+ " }" + System.lineSeparator()
+ " .yellow {" + System.lineSeparator()
+ " BackgroundColor gold" + System.lineSeparator()
+ " }" + System.lineSeparator()
+ " .red {" + System.lineSeparator()
+ " BackgroundColor tomato" + System.lineSeparator()
+ " }" + System.lineSeparator()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ Context,Stakeholder Group,Stakeholder,description,influence,interest
<#list stakeholders as stakeholderContainer>
<#assign stakeholderGroups = stakeholderContainer.stakeholders?filter(s -> instanceOf(s, StakeholderGroup))>
<#assign singleStakeholders = stakeholderContainer.stakeholders?filter(s -> instanceOf(s, Stakeholder))>
<#if stakeholderContainer.contexts?has_content><#assign contextDescription = stakeholderContainer.contexts?map(c -> c.name)?join("; ")><#else><#assign contextDescription = ""></#if>
<#if stakeholderContainer.contexts?has_content><#assign contextDescription = stakeholderContainer.contexts?map(c -> c.name)?join("; ")><#else><#assign contextDescription = "none"></#if>
<#list stakeholderGroups as sg>
<#list sg.stakeholders as stakeholder>
${contextDescription},${sg.name},${stakeholder.name},${stakeholder.description!""},${stakeholder.influence!""},${stakeholder.interest!""}
</#list>
</#list>
<#list singleStakeholders as stakeholder>
${contextDescription},,${stakeholder.name},${stakeholder.description!""},${stakeholder.influence!""},${stakeholder.interest!""}
${contextDescription},none,${stakeholder.name},${stakeholder.description!""},${stakeholder.influence!""},${stakeholder.interest!""}
</#list>
</#list>
Loading

0 comments on commit 45b32c3

Please sign in to comment.