From 59785a4028963e0d2b8236080ddc9c9a0df26218 Mon Sep 17 00:00:00 2001 From: Nils Olsson Date: Sat, 15 Oct 2011 21:16:47 +0200 Subject: [PATCH 001/371] Changed project structure --- graphwalker-core/pom.xml | 81 ++++++ .../src}/main/java/org/graphwalker/CLI.java | 25 ++ .../java/org/graphwalker/ClassPathHack.java | 57 ++++ .../org/graphwalker/EventDrivenModels.java | 25 ++ .../main/java/org/graphwalker/GUI/App.java | 25 ++ .../main/java/org/graphwalker/GUI/Status.java | 25 ++ .../java/org/graphwalker/GUI/StatusBar.java | 25 ++ .../graphwalker/GUI/resources/icons/back.png | Bin .../graphwalker/GUI/resources/icons/exit.png | Bin .../graphwalker/GUI/resources/icons/first.png | Bin .../graphwalker/GUI/resources/icons/new.png | Bin .../graphwalker/GUI/resources/icons/next.png | Bin .../graphwalker/GUI/resources/icons/open.png | Bin .../graphwalker/GUI/resources/icons/pause.png | Bin .../GUI/resources/icons/reload.png | Bin .../graphwalker/GUI/resources/icons/run.png | Bin .../graphwalker/GUI/resources/icons/save.png | Bin .../main/java/org/graphwalker/Keywords.java | 25 ++ .../src}/main/java/org/graphwalker/Model.java | 25 ++ .../org/graphwalker/ModelBasedTesting.java | 25 ++ .../java/org/graphwalker/MultipleModels.java | 25 ++ .../java/org/graphwalker/SoapServices.java | 25 ++ .../org/graphwalker/StatisticsManager.java | 25 ++ .../src}/main/java/org/graphwalker/Util.java | 25 ++ .../conditions/AlternativeCondition.java | 25 ++ .../conditions/CombinationalCondition.java | 25 ++ .../graphwalker/conditions/EdgeCoverage.java | 25 ++ .../conditions/NeverCondition.java | 25 ++ .../graphwalker/conditions/ReachedEdge.java | 25 ++ .../conditions/ReachedRequirement.java | 25 ++ .../graphwalker/conditions/ReachedVertex.java | 25 ++ .../conditions/RequirementCoverage.java | 25 ++ .../graphwalker/conditions/StopCondition.java | 25 ++ .../conditions/TestCaseLength.java | 25 ++ .../graphwalker/conditions/TimeDuration.java | 25 ++ .../conditions/VertexCoverage.java | 25 ++ .../java/org/graphwalker/events/AppEvent.java | 25 ++ .../java/org/graphwalker/events/MbtEvent.java | 25 ++ .../exceptions/FoundNoEdgeException.java | 25 ++ .../exceptions/GeneratorException.java | 25 ++ .../exceptions/GuiStoppedExecution.java | 25 ++ .../exceptions/InvalidDataException.java | 25 ++ .../exceptions/StopConditionException.java | 25 ++ .../filters/AccessableEdgeFilter.java | 25 ++ .../generators/A_StarPathGenerator.java | 25 ++ .../AllPathPermutationsGenerator.java | 25 ++ .../graphwalker/generators/CodeGenerator.java | 25 ++ .../generators/CombinedPathGenerator.java | 25 ++ .../graphwalker/generators/ListGenerator.java | 25 ++ .../generators/NonOptimizedShortestPath.java | 25 ++ .../graphwalker/generators/PathGenerator.java | 25 ++ .../generators/RandomPathGenerator.java | 25 ++ .../generators/RequirementsGenerator.java | 25 ++ .../graphwalker/graph/AbstractElement.java | 25 ++ .../main/java/org/graphwalker/graph/Edge.java | 25 ++ .../java/org/graphwalker/graph/Graph.java | 25 ++ .../java/org/graphwalker/graph/Vertex.java | 25 ++ .../graphwalker/io/AbstractModelHandler.java | 25 ++ .../main/java/org/graphwalker/io/GraphML.java | 25 ++ .../java/org/graphwalker/io/ParseLog.java | 25 ++ .../graphwalker/io/PrintHTMLTestSequence.java | 25 ++ .../machines/ExtendedFiniteStateMachine.java | 25 ++ .../machines/FiniteStateMachine.java | 25 ++ .../graphwalker/multipleModels/ModelAPI.java | 52 ++++ .../multipleModels/ModelHandler.java | 25 ++ .../statistics/EdgeCoverageStatistics.java | 25 ++ .../EdgeSequenceCoverageStatistics.java | 25 ++ .../RequirementCoverageStatistics.java | 25 ++ .../graphwalker/statistics/Statistics.java | 25 ++ .../statistics/VertexCoverageStatistics.java | 25 ++ .../graphwalker/GUI/resources/icons/back.png | Bin .../graphwalker/GUI/resources/icons/exit.png | Bin .../graphwalker/GUI/resources/icons/first.png | Bin .../graphwalker/GUI/resources/icons/new.png | Bin .../graphwalker/GUI/resources/icons/next.png | Bin .../graphwalker/GUI/resources/icons/open.png | Bin .../graphwalker/GUI/resources/icons/pause.png | Bin .../GUI/resources/icons/reload.png | Bin .../graphwalker/GUI/resources/icons/run.png | Bin .../graphwalker/GUI/resources/icons/save.png | Bin .../resources/graphwalker.properties | 52 ++++ .../graphwalker/resources/version.properties | 29 ++ .../test/java/org/graphwalker/CLITest.java | 25 ++ .../ExtendedFiniteStateMachineTest.java | 25 ++ .../java/org/graphwalker/ExtendedMain.java | 25 ++ .../graphwalker/FiniteStateMachineTest.java | 25 ++ .../java/org/graphwalker/KeywordsTest.java | 25 ++ .../graphwalker/ModelBasedTestingTest.java | 25 ++ .../org/graphwalker/MultipleModelsTest.java | 25 ++ .../graphwalker/RequirementVariableTest.java | 25 ++ .../java/org/graphwalker/SoapServiceTest.java | 38 +++ .../graphwalker/StatisticsManagerTest.java | 25 ++ .../test/java/org/graphwalker/UtilTest.java | 25 ++ .../java/org/graphwalker/bugs/Issue_10.java | 25 ++ .../java/org/graphwalker/bugs/Issue_9.java | 25 ++ .../conditions/AlternativeConditionTest.java | 25 ++ .../CombinationalConditionTest.java | 25 ++ .../conditions/EdgeCoverageTest.java | 25 ++ .../conditions/ReachedEdgeTest.java | 25 ++ .../conditions/ReachedRequirementTest.java | 25 ++ .../conditions/ReachedStateTest.java | 25 ++ .../conditions/RequirementCoverageTest.java | 25 ++ .../conditions/StateCoverageTest.java | 25 ++ .../conditions/TestCaseLengthTest.java | 25 ++ .../conditions/TimeDurationTest.java | 25 ++ .../filters/AccessableEdgeFilterTest.java | 25 ++ .../A_StarPathGeneratorEFSMBeanShellTest.java | 25 ++ ...A_StarPathGeneratorEFSMJavaScriptTest.java | 25 ++ .../A_StarPathGeneratorFSMTest.java | 25 ++ .../AllPathPermutationsGeneratorTest.java | 25 ++ .../generators/CodeGeneratorTest.java | 25 ++ .../generators/CombinedPathGeneratorTest.java | 25 ++ .../generators/ListGeneratorTest.java | 25 ++ .../generators/RandomPathGeneratorTest.java | 25 ++ .../java/org/graphwalker/io/GraphMLTest.java | 25 ++ .../test/java/org/graphwalker/mbt_init.xml | 34 +++ .../multiple/ModelHandlerTest.java | 25 ++ .../graphwalker/multiple/Model_A1_API.java | 58 ++++ .../org/graphwalker/multiple/Model_A_API.java | 70 +++++ .../graphwalker/multiple/Model_B1_API.java | 61 +++++ .../org/graphwalker/multiple/Model_B_API.java | 55 ++++ .../org/graphwalker/multiple/Model_C_API.java | 55 ++++ .../src}/test/resources/bsh/reqtags/graph.bsh | 0 .../resources/bsh/reqtags/mbt_startup.bsh | 0 ...ModelBasedTestingTest.testNewState.graphml | 0 .../src}/test/resources/graphml/UC01.graphml | 0 .../resources/graphml/bugs/Issue_10.graphml | 0 .../resources/graphml/bugs/Issue_9.graphml | 0 .../efsm_lables/testMergeEFSM_Lables.graphml | 0 .../graphml/mergeSubgraphs_01/a.graphml | 0 .../graphml/mergeSubgraphs_01/b.graphml | 0 .../graphml/mergeSubgraphs_02/a.graphml | 0 .../graphml/mergeSubgraphs_02/b.graphml | 0 .../resources/graphml/merging/Filter.graphml | 0 .../graphml/merging/Filterval5CD.graphml | 0 .../graphml/merging/Filterval7CD.graphml | 0 .../graphml/merging/FiltervalOH.graphml | 0 .../graphml/merging/FiltervalTH.graphml | 0 .../graphml/methods/ExtendedMain.graphml | 0 .../resources/graphml/methods/Main.graphml | 0 .../graphml/misc/missing_inedges.graphml | 0 .../graphml/misc/no_missing_inedges.graphml | 0 .../resources/graphml/modelWithDescr.graphml | 0 .../test/resources/graphml/multiple/A.graphml | 0 .../test/resources/graphml/multiple/B.graphml | 0 .../graphml/multiple/switch/A.graphml | 0 .../graphml/multiple/switch/A1.graphml | 0 .../graphml/multiple/switch/B.graphml | 0 .../graphml/multiple/switch/B1.graphml | 0 .../graphml/multiple/switch/C.graphml | 0 ...ker.EventDrivenModels.eventModel.a.graphml | 0 ...er.EventDrivenModels.load2Models.1.graphml | 0 .../a.graphml | 0 .../b.graphml | 0 ...r.EventDrivenModels.switchModels.A.graphml | 0 ...r.EventDrivenModels.switchModels.B.graphml | 0 ...r.EventDrivenModels.switchModels.C.graphml | 0 .../graphml/permutations/simple.graphml | 0 .../graphml/reqtags/ExtendedMain.graphml | 0 .../graphml/reqtags/execAction.graphml | 0 .../resources/graphml/test01/graph1.graphml | 0 .../resources/graphml/test01/graph2.graphml | 0 .../resources/graphml/test02/graph1.graphml | 0 .../resources/graphml/test02/graph2.graphml | 0 .../resources/graphml/test03/Graph001.graphml | 0 .../resources/graphml/test03/Graph002.graphml | 0 .../resources/graphml/test03/Graph003.graphml | 0 .../resources/graphml/test03/Graph004.graphml | 0 .../resources/graphml/test03/Graph005.graphml | 0 .../resources/graphml/test03/Graph006.graphml | 0 .../resources/graphml/test03/Graph007.graphml | 0 .../resources/graphml/test03/Graph008.graphml | 0 .../resources/graphml/test03/Graph009.graphml | 0 .../resources/graphml/test03/Graph010.graphml | 0 .../resources/graphml/test03/Graph011.graphml | 0 .../resources/graphml/test03/Graph012.graphml | 0 .../resources/graphml/test03/Graph013.graphml | 0 .../resources/graphml/test03/Graph014.graphml | 0 .../resources/graphml/test03/Graph015.graphml | 0 .../resources/graphml/test03/Graph016.graphml | 0 .../resources/graphml/test03/Graph017.graphml | 0 .../resources/graphml/test03/Graph018.graphml | 0 .../resources/graphml/test03/Graph019.graphml | 0 .../resources/graphml/test03/Graph020.graphml | 0 .../resources/graphml/test03/Graph021.graphml | 0 .../resources/graphml/test03/Graph022.graphml | 0 .../resources/graphml/test03/Graph023.graphml | 0 .../resources/graphml/test03/Graph024.graphml | 0 .../resources/graphml/test03/Graph025.graphml | 0 .../resources/graphml/test03/Graph026.graphml | 0 .../resources/graphml/test03/Graph027.graphml | 0 .../resources/graphml/test03/Graph028.graphml | 0 .../resources/graphml/test03/Graph029.graphml | 0 .../resources/graphml/test03/Graph030.graphml | 0 .../resources/graphml/test03/Graph031.graphml | 0 .../resources/graphml/test03/Graph032.graphml | 0 .../resources/graphml/test03/Graph033.graphml | 0 .../resources/graphml/test03/Graph034.graphml | 0 .../resources/graphml/test03/Graph035.graphml | 0 .../resources/graphml/test03/Graph036.graphml | 0 .../resources/graphml/test03/Graph037.graphml | 0 .../resources/graphml/test03/Graph038.graphml | 0 .../resources/graphml/test03/Graph039.graphml | 0 .../resources/graphml/test03/Graph040.graphml | 0 .../resources/graphml/test03/Graph041.graphml | 0 .../resources/graphml/test03/Graph042.graphml | 0 .../resources/graphml/test03/Graph043.graphml | 0 .../resources/graphml/test03/Graph044.graphml | 0 .../resources/graphml/test03/Graph045.graphml | 0 .../resources/graphml/test03/Graph046.graphml | 0 .../resources/graphml/test03/Graph047.graphml | 0 .../resources/graphml/test03/Graph050.graphml | 0 .../resources/graphml/test03/Graph051.graphml | 0 .../resources/graphml/test03/Graph052.graphml | 0 .../resources/graphml/test03/Graph053.graphml | 0 .../resources/graphml/test03/Graph054.graphml | 0 .../resources/graphml/test03/Graph055.graphml | 0 .../resources/graphml/test03/Graph070.graphml | 0 .../resources/graphml/test03/Graph071.graphml | 0 .../resources/graphml/test03/Graph072.graphml | 0 .../resources/graphml/test03/Graph073.graphml | 0 .../resources/graphml/test03/Graph074.graphml | 0 .../resources/graphml/test03/Graph075.graphml | 0 .../resources/graphml/test03/Graph076.graphml | 0 .../resources/graphml/test03/Graph077.graphml | 0 .../resources/graphml/test03/Graph078.graphml | 0 .../resources/graphml/test03/Graph079.graphml | 0 .../resources/graphml/test03/Graph080.graphml | 0 .../resources/graphml/test03/Graph081.graphml | 0 .../resources/graphml/test03/Graph082.graphml | 0 .../resources/graphml/test03/Graph083.graphml | 0 .../resources/graphml/test03/Graph084.graphml | 0 .../resources/graphml/test03/Graph085.graphml | 0 .../resources/graphml/test03/Graph086.graphml | 0 .../resources/graphml/test03/Graph087.graphml | 0 .../resources/graphml/test03/Graph088.graphml | 0 .../resources/graphml/test03/Graph089.graphml | 0 .../resources/graphml/test03/Graph092.graphml | 0 .../resources/graphml/test03/Graph093.graphml | 0 .../resources/graphml/test03/Graph094.graphml | 0 .../resources/graphml/test03/Graph095.graphml | 0 .../resources/graphml/test03/Graph096.graphml | 0 .../resources/graphml/test03/Graph097.graphml | 0 .../resources/graphml/test03/Graph098.graphml | 0 .../resources/graphml/test03/Graph099.graphml | 0 .../resources/graphml/test03/Graph100.graphml | 0 .../resources/graphml/test03/Graph101.graphml | 0 .../resources/graphml/test03/Graph102.graphml | 0 .../resources/graphml/test03/Graph103.graphml | 0 .../resources/graphml/test03/Graph104.graphml | 0 .../resources/graphml/test03/Graph105.graphml | 0 .../resources/graphml/test03/Graph106.graphml | 0 .../resources/graphml/test03/Graph107.graphml | 0 .../resources/graphml/test03/Graph108.graphml | 0 .../resources/graphml/test03/Graph109.graphml | 0 .../resources/graphml/test03/Graph110.graphml | 0 .../resources/graphml/test03/Graph111.graphml | 0 .../resources/graphml/test03/Graph112.graphml | 0 .../resources/graphml/test03/Graph113.graphml | 0 .../resources/graphml/test03/Graph114.graphml | 0 .../resources/graphml/test03/Graph115.graphml | 0 .../resources/graphml/test03/Graph116.graphml | 0 .../resources/graphml/test03/Graph117.graphml | 0 .../resources/graphml/test03/Graph118.graphml | 0 .../resources/graphml/test03/Graph119.graphml | 0 .../resources/graphml/test03/Graph120.graphml | 0 .../resources/graphml/test03/Graph121.graphml | 0 .../resources/graphml/test03/Graph122.graphml | 0 .../resources/graphml/test03/Graph123.graphml | 0 .../resources/graphml/test03/Graph124.graphml | 0 .../resources/graphml/test03/Graph125.graphml | 0 .../resources/graphml/test03/Graph126.graphml | 0 .../resources/graphml/test03/Graph127.graphml | 0 .../resources/graphml/test03/Graph128.graphml | 0 .../resources/graphml/test03/Graph129.graphml | 0 .../resources/graphml/test03/Graph130.graphml | 0 .../resources/graphml/test03/Graph131.graphml | 0 .../resources/graphml/test03/Graph132.graphml | 0 .../resources/graphml/test03/Graph133.graphml | 0 .../resources/graphml/test03/Graph134.graphml | 0 .../resources/graphml/test03/Graph135.graphml | 0 .../resources/graphml/test03/Graph136.graphml | 0 .../resources/graphml/test03/Graph137.graphml | 0 .../resources/graphml/test03/Graph138.graphml | 0 .../resources/graphml/test03/Graph139.graphml | 0 .../resources/graphml/test03/Graph140.graphml | 0 .../resources/graphml/test03/Graph141.graphml | 0 .../resources/graphml/test03/Graph142.graphml | 0 .../resources/graphml/test03/Graph143.graphml | 0 .../resources/graphml/test03/Graph144.graphml | 0 .../resources/graphml/test03/Graph145.graphml | 0 .../resources/graphml/test03/Graph146.graphml | 0 .../resources/graphml/test03/Graph147.graphml | 0 .../resources/graphml/test03/Graph148.graphml | 0 .../resources/graphml/test03/Graph149.graphml | 0 .../resources/graphml/test03/Graph150.graphml | 0 .../resources/graphml/test03/Graph151.graphml | 0 .../resources/graphml/test03/Graph152.graphml | 0 .../resources/graphml/test03/Graph153.graphml | 0 .../resources/graphml/test03/Graph154.graphml | 0 .../resources/graphml/test03/Graph155.graphml | 0 .../resources/graphml/test03/Graph156.graphml | 0 .../resources/graphml/test03/Graph157.graphml | 0 .../resources/graphml/test03/Graph158.graphml | 0 .../resources/graphml/test03/Graph159.graphml | 0 .../resources/graphml/test03/Graph160.graphml | 0 .../resources/graphml/test03/Graph161.graphml | 0 .../resources/graphml/test03/Graph162.graphml | 0 .../resources/graphml/test03/Graph163.graphml | 0 .../resources/graphml/test03/Graph164.graphml | 0 .../resources/graphml/test03/Graph165.graphml | 0 .../resources/graphml/test03/Graph166.graphml | 0 .../resources/graphml/test03/Graph167.graphml | 0 .../resources/graphml/test03/Graph168.graphml | 0 .../resources/graphml/test03/Graph169.graphml | 0 .../resources/graphml/test03/Graph170.graphml | 0 .../resources/graphml/test03/Graph171.graphml | 0 .../resources/graphml/test03/Graph172.graphml | 0 .../resources/graphml/test03/Graph173.graphml | 0 .../resources/graphml/test03/Graph174.graphml | 0 .../resources/graphml/test03/Graph175.graphml | 0 .../resources/graphml/test03/Graph176.graphml | 0 .../resources/graphml/test03/Graph177.graphml | 0 .../resources/graphml/test03/Graph178.graphml | 0 .../resources/graphml/test03/Graph179.graphml | 0 .../resources/graphml/test03/Start.graphml | 0 .../test/resources/graphml/test09/B.graphml | 0 .../test/resources/graphml/test09/C.graphml | 0 .../resources/graphml/test09/Start.graphml | 0 .../test/resources/graphml/test10/B.graphml | 0 .../test/resources/graphml/test10/C.graphml | 0 .../resources/graphml/test10/Start.graphml | 0 .../test/resources/graphml/test11/B.graphml | 0 .../test/resources/graphml/test11/C.graphml | 0 .../resources/graphml/test11/Start.graphml | 0 .../test/resources/graphml/test13/B.graphml | 0 .../test/resources/graphml/test13/C.graphml | 0 .../resources/graphml/test13/Start.graphml | 0 .../test/resources/graphml/test14/B.graphml | 0 .../test/resources/graphml/test14/C.graphml | 0 .../resources/graphml/test14/Start.graphml | 0 .../resources/graphml/test15/test15.graphml | 0 .../resources/graphml/test17/test17.graphml | 0 .../resources/graphml/test18/test18.graphml | 0 .../resources/graphml/test19/test19.graphml | 0 .../resources/graphml/test20/test20.graphml | 0 .../test/resources/graphml/test22/1.graphml | 0 .../test/resources/graphml/test22/2.graphml | 0 .../resources/graphml/test22/main.graphml | 0 .../graphml/test23/AddressBook.graphml | 0 .../test23/ContactTapToSelectNumber.graphml | 0 .../resources/graphml/test23/Contacts.graphml | 0 .../resources/graphml/test23/Main.graphml | 0 .../graphml/test23/SendVCard.graphml | 0 .../graphml/test24/AddressBook.graphml | 0 .../graphml/test24/AddressBookContact.graphml | 0 .../test24/AddressBookReadOnly.graphml | 0 .../resources/graphml/test24/Alarm.graphml | 0 .../graphml/test24/AlarmEdit.graphml | 0 .../resources/graphml/test24/Audio.graphml | 0 .../graphml/test24/Calculator.graphml | 0 .../resources/graphml/test24/Calendar.graphml | 0 .../test24/CalendarAppointment.graphml | 0 .../graphml/test24/Calendar_ToolsMenu.graphml | 0 .../graphml/test24/CallHistory.graphml | 0 .../resources/graphml/test24/Camera.graphml | 0 .../graphml/test24/ContactFavorites.graphml | 0 .../test24/ContactFavoritesReadOnly.graphml | 0 .../test24/ContactTapToSelectNumber.graphml | 0 .../resources/graphml/test24/Contacts.graphml | 0 .../graphml/test24/ContactsReadOnly.graphml | 0 .../resources/graphml/test24/Date.graphml | 0 .../graphml/test24/DefaultValues.graphml | 0 .../graphml/test24/DeleteItems.graphml | 0 .../graphml/test24/GlobalSettings.graphml | 0 .../graphml/test24/ImageViewer.graphml | 0 .../graphml/test24/KeyboardNumeric.graphml | 0 .../graphml/test24/KeyboardText.graphml | 0 .../graphml/test24/KeyboardToolsMenu.graphml | 0 .../resources/graphml/test24/Main.graphml | 0 .../resources/graphml/test24/MakeCall.graphml | 0 .../graphml/test24/MediaPlayer.graphml | 0 .../graphml/test24/MessagingCompose.graphml | 0 .../graphml/test24/MessagingDrafts.graphml | 0 .../graphml/test24/MessagingInbox.graphml | 0 .../graphml/test24/MessagingSent.graphml | 0 .../graphml/test24/NeoBrowser.graphml | 0 .../resources/graphml/test24/Notes.graphml | 0 .../graphml/test24/NumberToDial.graphml | 0 .../test24/RunningApplications.graphml | 0 .../graphml/test24/SendMessage.graphml | 0 .../graphml/test24/SendPictureAsMMS.graphml | 0 .../graphml/test24/SendVCard.graphml | 0 .../resources/graphml/test24/SysFiles.graphml | 0 .../resources/graphml/test24/Tetris.graphml | 0 .../resources/graphml/test24/Time.graphml | 0 .../test/resources/graphml/weight/FSM.graphml | 0 .../src}/test/resources/lib/small_jar.jar | Bin .../test/resources/templates/junit.template | 0 .../test/resources/templates/perl.template | 0 .../test/resources/templates/short.report | 0 .../src/test/resources/xml/ReachedVertex.xml | 34 +++ .../src/test/resources/xml/bugs/Issue_10.xml | 34 +++ .../src/test/resources/xml/bugs/Issue_9.xml | 34 +++ .../src/test/resources/xml/javaExecutor.xml | 34 +++ .../src/test/resources/xml/mbt_setup.dtd | 51 ++++ .../src/test/resources/xml/multipleA.xml | 34 +++ .../src/test/resources/xml/multipleB.xml | 34 +++ ...aphwalker.EventDrivenModels.eventModel.xml | 34 +++ ...walker.EventDrivenModels.load2Models.1.xml | 34 +++ ...walker.EventDrivenModels.load2Models.2.xml | 34 +++ ...alker.EventDrivenModels.switchModels.A.xml | 34 +++ ...alker.EventDrivenModels.switchModels.B.xml | 34 +++ ...alker.EventDrivenModels.switchModels.C.xml | 34 +++ .../src/test/resources/xml/reqCoverage.xml | 35 +++ .../test/resources/xml/reqtags/mbt_init.xml | 34 +++ .../test/resources/xml/reqtags/mbt_init10.xml | 37 +++ .../test/resources/xml/reqtags/mbt_init11.xml | 34 +++ .../test/resources/xml/reqtags/mbt_init2.xml | 40 +++ .../test/resources/xml/reqtags/mbt_init3.xml | 46 ++++ .../test/resources/xml/reqtags/mbt_init4.xml | 57 ++++ .../test/resources/xml/reqtags/mbt_init5.xml | 34 +++ .../test/resources/xml/reqtags/mbt_init6.xml | 32 +++ .../test/resources/xml/reqtags/mbt_init7.xml | 32 +++ .../test/resources/xml/reqtags/mbt_init8.xml | 41 +++ .../test/resources/xml/reqtags/mbt_init9.xml | 41 +++ .../src/test/resources/xml/switch/A.xml | 34 +++ .../src/test/resources/xml/switch/B.xml | 34 +++ .../src/test/resources/xml/switch/C.xml | 34 +++ graphwalker-parent/pom.xml | 255 ++++++++++++++++++ graphwalker-standalone/pom.xml | 52 ++++ .../src/assemble/standalone.xml | 59 ++++ pom.xml | 173 ------------ src/assemble/standalone.xml | 36 --- .../java/org/graphwalker/ClassPathHack.java | 32 --- .../graphwalker/multipleModels/ModelAPI.java | 27 -- src/main/resources/META-INF/MANIFEST.MF | 1 - .../resources/graphwalker.properties | 27 -- .../graphwalker/resources/version.properties | 4 - .../java/org/graphwalker/SoapServiceTest.java | 13 - src/test/java/org/graphwalker/mbt_init.xml | 8 - .../graphwalker/multiple/Model_A1_API.java | 33 --- .../org/graphwalker/multiple/Model_A_API.java | 45 ---- .../graphwalker/multiple/Model_B1_API.java | 36 --- .../org/graphwalker/multiple/Model_B_API.java | 30 --- .../org/graphwalker/multiple/Model_C_API.java | 30 --- src/test/resources/xml/ReachedVertex.xml | 8 - src/test/resources/xml/bugs/Issue_10.xml | 8 - src/test/resources/xml/bugs/Issue_9.xml | 8 - src/test/resources/xml/javaExecutor.xml | 8 - src/test/resources/xml/mbt_setup.dtd | 26 -- src/test/resources/xml/multipleA.xml | 8 - src/test/resources/xml/multipleB.xml | 8 - ...aphwalker.EventDrivenModels.eventModel.xml | 8 - ...walker.EventDrivenModels.load2Models.1.xml | 8 - ...walker.EventDrivenModels.load2Models.2.xml | 8 - ...alker.EventDrivenModels.switchModels.A.xml | 8 - ...alker.EventDrivenModels.switchModels.B.xml | 8 - ...alker.EventDrivenModels.switchModels.C.xml | 8 - src/test/resources/xml/reqCoverage.xml | 9 - src/test/resources/xml/reqtags/mbt_init.xml | 8 - src/test/resources/xml/reqtags/mbt_init10.xml | 11 - src/test/resources/xml/reqtags/mbt_init11.xml | 8 - src/test/resources/xml/reqtags/mbt_init2.xml | 14 - src/test/resources/xml/reqtags/mbt_init3.xml | 20 -- src/test/resources/xml/reqtags/mbt_init4.xml | 31 --- src/test/resources/xml/reqtags/mbt_init5.xml | 8 - src/test/resources/xml/reqtags/mbt_init6.xml | 6 - src/test/resources/xml/reqtags/mbt_init7.xml | 6 - src/test/resources/xml/reqtags/mbt_init8.xml | 15 -- src/test/resources/xml/reqtags/mbt_init9.xml | 15 -- src/test/resources/xml/switch/A.xml | 8 - src/test/resources/xml/switch/B.xml | 8 - src/test/resources/xml/switch/C.xml | 8 - 474 files changed, 4282 insertions(+), 792 deletions(-) create mode 100644 graphwalker-core/pom.xml rename {src => graphwalker-core/src}/main/java/org/graphwalker/CLI.java (97%) create mode 100644 graphwalker-core/src/main/java/org/graphwalker/ClassPathHack.java rename {src => graphwalker-core/src}/main/java/org/graphwalker/EventDrivenModels.java (79%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/GUI/App.java (96%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/GUI/Status.java (78%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/GUI/StatusBar.java (57%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/GUI/resources/icons/back.png (100%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/GUI/resources/icons/exit.png (100%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/GUI/resources/icons/first.png (100%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/GUI/resources/icons/new.png (100%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/GUI/resources/icons/next.png (100%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/GUI/resources/icons/open.png (100%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/GUI/resources/icons/pause.png (100%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/GUI/resources/icons/reload.png (100%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/GUI/resources/icons/run.png (100%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/GUI/resources/icons/save.png (100%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/Keywords.java (93%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/Model.java (57%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/ModelBasedTesting.java (97%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/MultipleModels.java (84%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/SoapServices.java (84%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/StatisticsManager.java (79%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/Util.java (96%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/conditions/AlternativeCondition.java (67%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/conditions/CombinationalCondition.java (66%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/conditions/EdgeCoverage.java (65%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/conditions/NeverCondition.java (55%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/conditions/ReachedEdge.java (73%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/conditions/ReachedRequirement.java (63%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/conditions/ReachedVertex.java (77%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/conditions/RequirementCoverage.java (62%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/conditions/StopCondition.java (58%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/conditions/TestCaseLength.java (58%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/conditions/TimeDuration.java (61%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/conditions/VertexCoverage.java (63%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/events/AppEvent.java (52%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/events/MbtEvent.java (52%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/exceptions/FoundNoEdgeException.java (57%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/exceptions/GeneratorException.java (54%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/exceptions/GuiStoppedExecution.java (55%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/exceptions/InvalidDataException.java (58%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/exceptions/StopConditionException.java (58%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/filters/AccessableEdgeFilter.java (67%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/generators/A_StarPathGenerator.java (83%) mode change 100755 => 100644 rename {src => graphwalker-core/src}/main/java/org/graphwalker/generators/AllPathPermutationsGenerator.java (82%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/generators/CodeGenerator.java (70%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/generators/CombinedPathGenerator.java (73%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/generators/ListGenerator.java (68%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/generators/NonOptimizedShortestPath.java (80%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/generators/PathGenerator.java (69%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/generators/RandomPathGenerator.java (75%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/generators/RequirementsGenerator.java (70%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/graph/AbstractElement.java (89%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/graph/Edge.java (82%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/graph/Graph.java (72%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/graph/Vertex.java (80%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/io/AbstractModelHandler.java (56%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/io/GraphML.java (97%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/io/ParseLog.java (67%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/io/PrintHTMLTestSequence.java (75%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/machines/ExtendedFiniteStateMachine.java (88%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/machines/FiniteStateMachine.java (91%) create mode 100644 graphwalker-core/src/main/java/org/graphwalker/multipleModels/ModelAPI.java rename {src => graphwalker-core/src}/main/java/org/graphwalker/multipleModels/ModelHandler.java (91%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/statistics/EdgeCoverageStatistics.java (64%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/statistics/EdgeSequenceCoverageStatistics.java (76%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/statistics/RequirementCoverageStatistics.java (69%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/statistics/Statistics.java (54%) rename {src => graphwalker-core/src}/main/java/org/graphwalker/statistics/VertexCoverageStatistics.java (64%) rename {src => graphwalker-core/src}/main/resources/org/graphwalker/GUI/resources/icons/back.png (100%) rename {src => graphwalker-core/src}/main/resources/org/graphwalker/GUI/resources/icons/exit.png (100%) rename {src => graphwalker-core/src}/main/resources/org/graphwalker/GUI/resources/icons/first.png (100%) rename {src => graphwalker-core/src}/main/resources/org/graphwalker/GUI/resources/icons/new.png (100%) rename {src => graphwalker-core/src}/main/resources/org/graphwalker/GUI/resources/icons/next.png (100%) rename {src => graphwalker-core/src}/main/resources/org/graphwalker/GUI/resources/icons/open.png (100%) rename {src => graphwalker-core/src}/main/resources/org/graphwalker/GUI/resources/icons/pause.png (100%) rename {src => graphwalker-core/src}/main/resources/org/graphwalker/GUI/resources/icons/reload.png (100%) rename {src => graphwalker-core/src}/main/resources/org/graphwalker/GUI/resources/icons/run.png (100%) rename {src => graphwalker-core/src}/main/resources/org/graphwalker/GUI/resources/icons/save.png (100%) create mode 100644 graphwalker-core/src/main/resources/org/graphwalker/resources/graphwalker.properties create mode 100644 graphwalker-core/src/main/resources/org/graphwalker/resources/version.properties rename {src => graphwalker-core/src}/test/java/org/graphwalker/CLITest.java (93%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/ExtendedFiniteStateMachineTest.java (72%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/ExtendedMain.java (74%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/FiniteStateMachineTest.java (71%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/KeywordsTest.java (76%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/ModelBasedTestingTest.java (89%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/MultipleModelsTest.java (88%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/RequirementVariableTest.java (85%) create mode 100644 graphwalker-core/src/test/java/org/graphwalker/SoapServiceTest.java rename {src => graphwalker-core/src}/test/java/org/graphwalker/StatisticsManagerTest.java (90%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/UtilTest.java (69%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/bugs/Issue_10.java (72%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/bugs/Issue_9.java (73%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/conditions/AlternativeConditionTest.java (64%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/conditions/CombinationalConditionTest.java (62%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/conditions/EdgeCoverageTest.java (73%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/conditions/ReachedEdgeTest.java (73%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/conditions/ReachedRequirementTest.java (74%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/conditions/ReachedStateTest.java (73%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/conditions/RequirementCoverageTest.java (74%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/conditions/StateCoverageTest.java (74%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/conditions/TestCaseLengthTest.java (73%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/conditions/TimeDurationTest.java (76%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/filters/AccessableEdgeFilterTest.java (76%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMBeanShellTest.java (78%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMJavaScriptTest.java (78%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/generators/A_StarPathGeneratorFSMTest.java (74%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/generators/AllPathPermutationsGeneratorTest.java (68%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/generators/CodeGeneratorTest.java (72%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/generators/CombinedPathGeneratorTest.java (70%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/generators/ListGeneratorTest.java (66%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/generators/RandomPathGeneratorTest.java (73%) rename {src => graphwalker-core/src}/test/java/org/graphwalker/io/GraphMLTest.java (92%) create mode 100644 graphwalker-core/src/test/java/org/graphwalker/mbt_init.xml rename {src => graphwalker-core/src}/test/java/org/graphwalker/multiple/ModelHandlerTest.java (84%) create mode 100644 graphwalker-core/src/test/java/org/graphwalker/multiple/Model_A1_API.java create mode 100644 graphwalker-core/src/test/java/org/graphwalker/multiple/Model_A_API.java create mode 100644 graphwalker-core/src/test/java/org/graphwalker/multiple/Model_B1_API.java create mode 100644 graphwalker-core/src/test/java/org/graphwalker/multiple/Model_B_API.java create mode 100644 graphwalker-core/src/test/java/org/graphwalker/multiple/Model_C_API.java rename {src => graphwalker-core/src}/test/resources/bsh/reqtags/graph.bsh (100%) rename {src => graphwalker-core/src}/test/resources/bsh/reqtags/mbt_startup.bsh (100%) rename {src => graphwalker-core/src}/test/resources/graphml/ModelBasedTestingTest.testNewState.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/UC01.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/bugs/Issue_10.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/bugs/Issue_9.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/efsm_lables/testMergeEFSM_Lables.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/mergeSubgraphs_01/a.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/mergeSubgraphs_01/b.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/mergeSubgraphs_02/a.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/mergeSubgraphs_02/b.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/merging/Filter.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/merging/Filterval5CD.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/merging/Filterval7CD.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/merging/FiltervalOH.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/merging/FiltervalTH.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/methods/ExtendedMain.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/methods/Main.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/misc/missing_inedges.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/misc/no_missing_inedges.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/modelWithDescr.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/multiple/A.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/multiple/B.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/multiple/switch/A.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/multiple/switch/A1.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/multiple/switch/B.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/multiple/switch/B1.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/multiple/switch/C.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/org.graphwalker.EventDrivenModels.eventModel.a.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.1.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.2/a.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.2/b.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.A.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.B.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.C.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/permutations/simple.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/reqtags/ExtendedMain.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/reqtags/execAction.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test01/graph1.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test01/graph2.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test02/graph1.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test02/graph2.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph001.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph002.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph003.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph004.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph005.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph006.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph007.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph008.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph009.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph010.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph011.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph012.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph013.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph014.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph015.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph016.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph017.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph018.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph019.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph020.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph021.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph022.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph023.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph024.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph025.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph026.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph027.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph028.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph029.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph030.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph031.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph032.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph033.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph034.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph035.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph036.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph037.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph038.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph039.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph040.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph041.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph042.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph043.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph044.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph045.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph046.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph047.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph050.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph051.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph052.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph053.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph054.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph055.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph070.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph071.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph072.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph073.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph074.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph075.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph076.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph077.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph078.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph079.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph080.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph081.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph082.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph083.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph084.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph085.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph086.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph087.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph088.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph089.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph092.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph093.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph094.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph095.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph096.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph097.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph098.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph099.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph100.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph101.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph102.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph103.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph104.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph105.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph106.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph107.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph108.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph109.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph110.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph111.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph112.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph113.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph114.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph115.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph116.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph117.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph118.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph119.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph120.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph121.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph122.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph123.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph124.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph125.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph126.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph127.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph128.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph129.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph130.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph131.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph132.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph133.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph134.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph135.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph136.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph137.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph138.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph139.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph140.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph141.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph142.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph143.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph144.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph145.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph146.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph147.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph148.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph149.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph150.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph151.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph152.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph153.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph154.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph155.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph156.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph157.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph158.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph159.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph160.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph161.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph162.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph163.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph164.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph165.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph166.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph167.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph168.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph169.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph170.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph171.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph172.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph173.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph174.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph175.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph176.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph177.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph178.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Graph179.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test03/Start.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test09/B.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test09/C.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test09/Start.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test10/B.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test10/C.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test10/Start.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test11/B.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test11/C.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test11/Start.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test13/B.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test13/C.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test13/Start.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test14/B.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test14/C.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test14/Start.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test15/test15.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test17/test17.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test18/test18.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test19/test19.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test20/test20.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test22/1.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test22/2.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test22/main.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test23/AddressBook.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test23/ContactTapToSelectNumber.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test23/Contacts.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test23/Main.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test23/SendVCard.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/AddressBook.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/AddressBookContact.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/AddressBookReadOnly.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/Alarm.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/AlarmEdit.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/Audio.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/Calculator.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/Calendar.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/CalendarAppointment.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/Calendar_ToolsMenu.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/CallHistory.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/Camera.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/ContactFavorites.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/ContactTapToSelectNumber.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/Contacts.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/ContactsReadOnly.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/Date.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/DefaultValues.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/DeleteItems.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/GlobalSettings.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/ImageViewer.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/KeyboardNumeric.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/KeyboardText.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/KeyboardToolsMenu.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/Main.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/MakeCall.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/MediaPlayer.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/MessagingCompose.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/MessagingDrafts.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/MessagingInbox.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/MessagingSent.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/NeoBrowser.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/Notes.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/NumberToDial.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/RunningApplications.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/SendMessage.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/SendPictureAsMMS.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/SendVCard.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/SysFiles.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/Tetris.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/test24/Time.graphml (100%) rename {src => graphwalker-core/src}/test/resources/graphml/weight/FSM.graphml (100%) rename {src => graphwalker-core/src}/test/resources/lib/small_jar.jar (100%) rename {src => graphwalker-core/src}/test/resources/templates/junit.template (100%) rename {src => graphwalker-core/src}/test/resources/templates/perl.template (100%) rename {src => graphwalker-core/src}/test/resources/templates/short.report (100%) create mode 100644 graphwalker-core/src/test/resources/xml/ReachedVertex.xml create mode 100644 graphwalker-core/src/test/resources/xml/bugs/Issue_10.xml create mode 100644 graphwalker-core/src/test/resources/xml/bugs/Issue_9.xml create mode 100644 graphwalker-core/src/test/resources/xml/javaExecutor.xml create mode 100644 graphwalker-core/src/test/resources/xml/mbt_setup.dtd create mode 100644 graphwalker-core/src/test/resources/xml/multipleA.xml create mode 100644 graphwalker-core/src/test/resources/xml/multipleB.xml create mode 100644 graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml create mode 100644 graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml create mode 100644 graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml create mode 100644 graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml create mode 100644 graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml create mode 100644 graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml create mode 100644 graphwalker-core/src/test/resources/xml/reqCoverage.xml create mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init.xml create mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init10.xml create mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init11.xml create mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init2.xml create mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init3.xml create mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init4.xml create mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init5.xml create mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init6.xml create mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init7.xml create mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init8.xml create mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init9.xml create mode 100644 graphwalker-core/src/test/resources/xml/switch/A.xml create mode 100644 graphwalker-core/src/test/resources/xml/switch/B.xml create mode 100644 graphwalker-core/src/test/resources/xml/switch/C.xml create mode 100644 graphwalker-parent/pom.xml create mode 100644 graphwalker-standalone/pom.xml create mode 100644 graphwalker-standalone/src/assemble/standalone.xml delete mode 100644 pom.xml delete mode 100644 src/assemble/standalone.xml delete mode 100644 src/main/java/org/graphwalker/ClassPathHack.java delete mode 100644 src/main/java/org/graphwalker/multipleModels/ModelAPI.java delete mode 100644 src/main/resources/META-INF/MANIFEST.MF delete mode 100644 src/main/resources/org/graphwalker/resources/graphwalker.properties delete mode 100644 src/main/resources/org/graphwalker/resources/version.properties delete mode 100644 src/test/java/org/graphwalker/SoapServiceTest.java delete mode 100755 src/test/java/org/graphwalker/mbt_init.xml delete mode 100644 src/test/java/org/graphwalker/multiple/Model_A1_API.java delete mode 100644 src/test/java/org/graphwalker/multiple/Model_A_API.java delete mode 100644 src/test/java/org/graphwalker/multiple/Model_B1_API.java delete mode 100644 src/test/java/org/graphwalker/multiple/Model_B_API.java delete mode 100644 src/test/java/org/graphwalker/multiple/Model_C_API.java delete mode 100644 src/test/resources/xml/ReachedVertex.xml delete mode 100644 src/test/resources/xml/bugs/Issue_10.xml delete mode 100644 src/test/resources/xml/bugs/Issue_9.xml delete mode 100644 src/test/resources/xml/javaExecutor.xml delete mode 100644 src/test/resources/xml/mbt_setup.dtd delete mode 100644 src/test/resources/xml/multipleA.xml delete mode 100644 src/test/resources/xml/multipleB.xml delete mode 100644 src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml delete mode 100644 src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml delete mode 100644 src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml delete mode 100644 src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml delete mode 100644 src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml delete mode 100644 src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml delete mode 100644 src/test/resources/xml/reqCoverage.xml delete mode 100644 src/test/resources/xml/reqtags/mbt_init.xml delete mode 100644 src/test/resources/xml/reqtags/mbt_init10.xml delete mode 100644 src/test/resources/xml/reqtags/mbt_init11.xml delete mode 100644 src/test/resources/xml/reqtags/mbt_init2.xml delete mode 100644 src/test/resources/xml/reqtags/mbt_init3.xml delete mode 100644 src/test/resources/xml/reqtags/mbt_init4.xml delete mode 100644 src/test/resources/xml/reqtags/mbt_init5.xml delete mode 100644 src/test/resources/xml/reqtags/mbt_init6.xml delete mode 100644 src/test/resources/xml/reqtags/mbt_init7.xml delete mode 100644 src/test/resources/xml/reqtags/mbt_init8.xml delete mode 100644 src/test/resources/xml/reqtags/mbt_init9.xml delete mode 100644 src/test/resources/xml/switch/A.xml delete mode 100644 src/test/resources/xml/switch/B.xml delete mode 100644 src/test/resources/xml/switch/C.xml diff --git a/graphwalker-core/pom.xml b/graphwalker-core/pom.xml new file mode 100644 index 00000000..97db232d --- /dev/null +++ b/graphwalker-core/pom.xml @@ -0,0 +1,81 @@ + + + + org.graphwalker + graphwalker-parent + ../graphwalker-parent/pom.xml + 2.5.14-SNAPSHOT + + + 4.0.0 + graphwalker-core + ${parent.version} + GraphWalker Core + + + + junit + junit + test + + + com.sun.xml.ws + jaxws-rt + + + commons-cli + commons-cli + + + log4j + log4j + + + org.jdom + jdom + + + commons-configuration + commons-configuration + + + net.sf.jung + jung-graph-impl + + + org.beanshell + bsh + + + net.sf.jung + jung-algorithms + + + net.sf.jung + jung-visualization + + + + + + + org.codehaus.mojo + jaxws-maven-plugin + + + wsgen + + wsgen + + + org.graphwalker.SoapServices + + + + + + + + \ No newline at end of file diff --git a/src/main/java/org/graphwalker/CLI.java b/graphwalker-core/src/main/java/org/graphwalker/CLI.java similarity index 97% rename from src/main/java/org/graphwalker/CLI.java rename to graphwalker-core/src/main/java/org/graphwalker/CLI.java index 026a862b..348bbd99 100644 --- a/src/main/java/org/graphwalker/CLI.java +++ b/graphwalker-core/src/main/java/org/graphwalker/CLI.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/graphwalker-core/src/main/java/org/graphwalker/ClassPathHack.java b/graphwalker-core/src/main/java/org/graphwalker/ClassPathHack.java new file mode 100644 index 00000000..29f6834d --- /dev/null +++ b/graphwalker-core/src/main/java/org/graphwalker/ClassPathHack.java @@ -0,0 +1,57 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker; + +import java.io.File; +import java.io.IOException; +import java.lang.reflect.Method; +import java.net.URL; +import java.net.URLClassLoader; + +public class ClassPathHack { + private static final Class[] parameters = new Class[] { URL.class }; + + @SuppressWarnings("deprecation") + public static void addFile(File f) throws IOException { + // f.toURL is deprecated + addURL(f.toURL()); + } + + protected static void addURL(URL u) throws IOException { + URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader(); + Class sysclass = URLClassLoader.class; + + try { + Method method = sysclass.getDeclaredMethod("addURL", parameters); + method.setAccessible(true); + method.invoke(sysloader, u); + } catch (Exception e) { + Util.logStackTraceToError(e); + throw new IOException("Error, could not add URL to system classloader"); + } + + } +} diff --git a/src/main/java/org/graphwalker/EventDrivenModels.java b/graphwalker-core/src/main/java/org/graphwalker/EventDrivenModels.java similarity index 79% rename from src/main/java/org/graphwalker/EventDrivenModels.java rename to graphwalker-core/src/main/java/org/graphwalker/EventDrivenModels.java index ef0b316f..0d68427f 100644 --- a/src/main/java/org/graphwalker/EventDrivenModels.java +++ b/graphwalker-core/src/main/java/org/graphwalker/EventDrivenModels.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/GUI/App.java b/graphwalker-core/src/main/java/org/graphwalker/GUI/App.java similarity index 96% rename from src/main/java/org/graphwalker/GUI/App.java rename to graphwalker-core/src/main/java/org/graphwalker/GUI/App.java index 02c9103b..f8119278 100644 --- a/src/main/java/org/graphwalker/GUI/App.java +++ b/graphwalker-core/src/main/java/org/graphwalker/GUI/App.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/GUI/Status.java b/graphwalker-core/src/main/java/org/graphwalker/GUI/Status.java similarity index 78% rename from src/main/java/org/graphwalker/GUI/Status.java rename to graphwalker-core/src/main/java/org/graphwalker/GUI/Status.java index c604a115..e903d451 100644 --- a/src/main/java/org/graphwalker/GUI/Status.java +++ b/graphwalker-core/src/main/java/org/graphwalker/GUI/Status.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/GUI/StatusBar.java b/graphwalker-core/src/main/java/org/graphwalker/GUI/StatusBar.java similarity index 57% rename from src/main/java/org/graphwalker/GUI/StatusBar.java rename to graphwalker-core/src/main/java/org/graphwalker/GUI/StatusBar.java index 829660f1..66107204 100644 --- a/src/main/java/org/graphwalker/GUI/StatusBar.java +++ b/graphwalker-core/src/main/java/org/graphwalker/GUI/StatusBar.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/GUI/resources/icons/back.png b/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/back.png similarity index 100% rename from src/main/java/org/graphwalker/GUI/resources/icons/back.png rename to graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/back.png diff --git a/src/main/java/org/graphwalker/GUI/resources/icons/exit.png b/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/exit.png similarity index 100% rename from src/main/java/org/graphwalker/GUI/resources/icons/exit.png rename to graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/exit.png diff --git a/src/main/java/org/graphwalker/GUI/resources/icons/first.png b/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/first.png similarity index 100% rename from src/main/java/org/graphwalker/GUI/resources/icons/first.png rename to graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/first.png diff --git a/src/main/java/org/graphwalker/GUI/resources/icons/new.png b/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/new.png similarity index 100% rename from src/main/java/org/graphwalker/GUI/resources/icons/new.png rename to graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/new.png diff --git a/src/main/java/org/graphwalker/GUI/resources/icons/next.png b/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/next.png similarity index 100% rename from src/main/java/org/graphwalker/GUI/resources/icons/next.png rename to graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/next.png diff --git a/src/main/java/org/graphwalker/GUI/resources/icons/open.png b/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/open.png similarity index 100% rename from src/main/java/org/graphwalker/GUI/resources/icons/open.png rename to graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/open.png diff --git a/src/main/java/org/graphwalker/GUI/resources/icons/pause.png b/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/pause.png similarity index 100% rename from src/main/java/org/graphwalker/GUI/resources/icons/pause.png rename to graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/pause.png diff --git a/src/main/java/org/graphwalker/GUI/resources/icons/reload.png b/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/reload.png similarity index 100% rename from src/main/java/org/graphwalker/GUI/resources/icons/reload.png rename to graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/reload.png diff --git a/src/main/java/org/graphwalker/GUI/resources/icons/run.png b/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/run.png similarity index 100% rename from src/main/java/org/graphwalker/GUI/resources/icons/run.png rename to graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/run.png diff --git a/src/main/java/org/graphwalker/GUI/resources/icons/save.png b/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/save.png similarity index 100% rename from src/main/java/org/graphwalker/GUI/resources/icons/save.png rename to graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/save.png diff --git a/src/main/java/org/graphwalker/Keywords.java b/graphwalker-core/src/main/java/org/graphwalker/Keywords.java similarity index 93% rename from src/main/java/org/graphwalker/Keywords.java rename to graphwalker-core/src/main/java/org/graphwalker/Keywords.java index 05642558..f1b40df2 100644 --- a/src/main/java/org/graphwalker/Keywords.java +++ b/graphwalker-core/src/main/java/org/graphwalker/Keywords.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/Model.java b/graphwalker-core/src/main/java/org/graphwalker/Model.java similarity index 57% rename from src/main/java/org/graphwalker/Model.java rename to graphwalker-core/src/main/java/org/graphwalker/Model.java index ecdd182c..4ef9c908 100644 --- a/src/main/java/org/graphwalker/Model.java +++ b/graphwalker-core/src/main/java/org/graphwalker/Model.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/ModelBasedTesting.java b/graphwalker-core/src/main/java/org/graphwalker/ModelBasedTesting.java similarity index 97% rename from src/main/java/org/graphwalker/ModelBasedTesting.java rename to graphwalker-core/src/main/java/org/graphwalker/ModelBasedTesting.java index 94e9a75b..1a9aab6a 100644 --- a/src/main/java/org/graphwalker/ModelBasedTesting.java +++ b/graphwalker-core/src/main/java/org/graphwalker/ModelBasedTesting.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/MultipleModels.java b/graphwalker-core/src/main/java/org/graphwalker/MultipleModels.java similarity index 84% rename from src/main/java/org/graphwalker/MultipleModels.java rename to graphwalker-core/src/main/java/org/graphwalker/MultipleModels.java index a08dbf0e..4362ba8c 100644 --- a/src/main/java/org/graphwalker/MultipleModels.java +++ b/graphwalker-core/src/main/java/org/graphwalker/MultipleModels.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ package org.graphwalker; import java.util.HashMap; diff --git a/src/main/java/org/graphwalker/SoapServices.java b/graphwalker-core/src/main/java/org/graphwalker/SoapServices.java similarity index 84% rename from src/main/java/org/graphwalker/SoapServices.java rename to graphwalker-core/src/main/java/org/graphwalker/SoapServices.java index 994c26cb..fddd7ce3 100644 --- a/src/main/java/org/graphwalker/SoapServices.java +++ b/graphwalker-core/src/main/java/org/graphwalker/SoapServices.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/StatisticsManager.java b/graphwalker-core/src/main/java/org/graphwalker/StatisticsManager.java similarity index 79% rename from src/main/java/org/graphwalker/StatisticsManager.java rename to graphwalker-core/src/main/java/org/graphwalker/StatisticsManager.java index 34a7cf2d..70da6c11 100644 --- a/src/main/java/org/graphwalker/StatisticsManager.java +++ b/graphwalker-core/src/main/java/org/graphwalker/StatisticsManager.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/Util.java b/graphwalker-core/src/main/java/org/graphwalker/Util.java similarity index 96% rename from src/main/java/org/graphwalker/Util.java rename to graphwalker-core/src/main/java/org/graphwalker/Util.java index 0f3cc2ad..90559b9a 100644 --- a/src/main/java/org/graphwalker/Util.java +++ b/graphwalker-core/src/main/java/org/graphwalker/Util.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/conditions/AlternativeCondition.java b/graphwalker-core/src/main/java/org/graphwalker/conditions/AlternativeCondition.java similarity index 67% rename from src/main/java/org/graphwalker/conditions/AlternativeCondition.java rename to graphwalker-core/src/main/java/org/graphwalker/conditions/AlternativeCondition.java index d62cffac..eb7f5844 100644 --- a/src/main/java/org/graphwalker/conditions/AlternativeCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/conditions/AlternativeCondition.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/conditions/CombinationalCondition.java b/graphwalker-core/src/main/java/org/graphwalker/conditions/CombinationalCondition.java similarity index 66% rename from src/main/java/org/graphwalker/conditions/CombinationalCondition.java rename to graphwalker-core/src/main/java/org/graphwalker/conditions/CombinationalCondition.java index d382dc2f..8db1a550 100644 --- a/src/main/java/org/graphwalker/conditions/CombinationalCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/conditions/CombinationalCondition.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/conditions/EdgeCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/conditions/EdgeCoverage.java similarity index 65% rename from src/main/java/org/graphwalker/conditions/EdgeCoverage.java rename to graphwalker-core/src/main/java/org/graphwalker/conditions/EdgeCoverage.java index 31c67f1e..efe1f357 100644 --- a/src/main/java/org/graphwalker/conditions/EdgeCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/conditions/EdgeCoverage.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/conditions/NeverCondition.java b/graphwalker-core/src/main/java/org/graphwalker/conditions/NeverCondition.java similarity index 55% rename from src/main/java/org/graphwalker/conditions/NeverCondition.java rename to graphwalker-core/src/main/java/org/graphwalker/conditions/NeverCondition.java index eff644fc..649be094 100644 --- a/src/main/java/org/graphwalker/conditions/NeverCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/conditions/NeverCondition.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/conditions/ReachedEdge.java b/graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedEdge.java similarity index 73% rename from src/main/java/org/graphwalker/conditions/ReachedEdge.java rename to graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedEdge.java index b685c28e..327765b5 100644 --- a/src/main/java/org/graphwalker/conditions/ReachedEdge.java +++ b/graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedEdge.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/conditions/ReachedRequirement.java b/graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedRequirement.java similarity index 63% rename from src/main/java/org/graphwalker/conditions/ReachedRequirement.java rename to graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedRequirement.java index 47b9535b..f349fa5e 100644 --- a/src/main/java/org/graphwalker/conditions/ReachedRequirement.java +++ b/graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedRequirement.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/conditions/ReachedVertex.java b/graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedVertex.java similarity index 77% rename from src/main/java/org/graphwalker/conditions/ReachedVertex.java rename to graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedVertex.java index 1251c016..fa53dec9 100644 --- a/src/main/java/org/graphwalker/conditions/ReachedVertex.java +++ b/graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedVertex.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/conditions/RequirementCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/conditions/RequirementCoverage.java similarity index 62% rename from src/main/java/org/graphwalker/conditions/RequirementCoverage.java rename to graphwalker-core/src/main/java/org/graphwalker/conditions/RequirementCoverage.java index 80e64e0d..9b307283 100644 --- a/src/main/java/org/graphwalker/conditions/RequirementCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/conditions/RequirementCoverage.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/conditions/StopCondition.java b/graphwalker-core/src/main/java/org/graphwalker/conditions/StopCondition.java similarity index 58% rename from src/main/java/org/graphwalker/conditions/StopCondition.java rename to graphwalker-core/src/main/java/org/graphwalker/conditions/StopCondition.java index affa2982..e8cdd012 100644 --- a/src/main/java/org/graphwalker/conditions/StopCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/conditions/StopCondition.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/conditions/TestCaseLength.java b/graphwalker-core/src/main/java/org/graphwalker/conditions/TestCaseLength.java similarity index 58% rename from src/main/java/org/graphwalker/conditions/TestCaseLength.java rename to graphwalker-core/src/main/java/org/graphwalker/conditions/TestCaseLength.java index ee3b86ee..b54bdba7 100644 --- a/src/main/java/org/graphwalker/conditions/TestCaseLength.java +++ b/graphwalker-core/src/main/java/org/graphwalker/conditions/TestCaseLength.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/conditions/TimeDuration.java b/graphwalker-core/src/main/java/org/graphwalker/conditions/TimeDuration.java similarity index 61% rename from src/main/java/org/graphwalker/conditions/TimeDuration.java rename to graphwalker-core/src/main/java/org/graphwalker/conditions/TimeDuration.java index 3d92875b..003b2801 100644 --- a/src/main/java/org/graphwalker/conditions/TimeDuration.java +++ b/graphwalker-core/src/main/java/org/graphwalker/conditions/TimeDuration.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/conditions/VertexCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/conditions/VertexCoverage.java similarity index 63% rename from src/main/java/org/graphwalker/conditions/VertexCoverage.java rename to graphwalker-core/src/main/java/org/graphwalker/conditions/VertexCoverage.java index a69ecae8..e59f5d04 100644 --- a/src/main/java/org/graphwalker/conditions/VertexCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/conditions/VertexCoverage.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/events/AppEvent.java b/graphwalker-core/src/main/java/org/graphwalker/events/AppEvent.java similarity index 52% rename from src/main/java/org/graphwalker/events/AppEvent.java rename to graphwalker-core/src/main/java/org/graphwalker/events/AppEvent.java index 544f5e54..a0663b4f 100644 --- a/src/main/java/org/graphwalker/events/AppEvent.java +++ b/graphwalker-core/src/main/java/org/graphwalker/events/AppEvent.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/events/MbtEvent.java b/graphwalker-core/src/main/java/org/graphwalker/events/MbtEvent.java similarity index 52% rename from src/main/java/org/graphwalker/events/MbtEvent.java rename to graphwalker-core/src/main/java/org/graphwalker/events/MbtEvent.java index 4ca50907..54b02198 100644 --- a/src/main/java/org/graphwalker/events/MbtEvent.java +++ b/graphwalker-core/src/main/java/org/graphwalker/events/MbtEvent.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/exceptions/FoundNoEdgeException.java b/graphwalker-core/src/main/java/org/graphwalker/exceptions/FoundNoEdgeException.java similarity index 57% rename from src/main/java/org/graphwalker/exceptions/FoundNoEdgeException.java rename to graphwalker-core/src/main/java/org/graphwalker/exceptions/FoundNoEdgeException.java index 3a319593..f27619a7 100644 --- a/src/main/java/org/graphwalker/exceptions/FoundNoEdgeException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/exceptions/FoundNoEdgeException.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/exceptions/GeneratorException.java b/graphwalker-core/src/main/java/org/graphwalker/exceptions/GeneratorException.java similarity index 54% rename from src/main/java/org/graphwalker/exceptions/GeneratorException.java rename to graphwalker-core/src/main/java/org/graphwalker/exceptions/GeneratorException.java index 81e70026..69b0c2ac 100644 --- a/src/main/java/org/graphwalker/exceptions/GeneratorException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/exceptions/GeneratorException.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/exceptions/GuiStoppedExecution.java b/graphwalker-core/src/main/java/org/graphwalker/exceptions/GuiStoppedExecution.java similarity index 55% rename from src/main/java/org/graphwalker/exceptions/GuiStoppedExecution.java rename to graphwalker-core/src/main/java/org/graphwalker/exceptions/GuiStoppedExecution.java index fdd976b8..63f3ee05 100644 --- a/src/main/java/org/graphwalker/exceptions/GuiStoppedExecution.java +++ b/graphwalker-core/src/main/java/org/graphwalker/exceptions/GuiStoppedExecution.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/exceptions/InvalidDataException.java b/graphwalker-core/src/main/java/org/graphwalker/exceptions/InvalidDataException.java similarity index 58% rename from src/main/java/org/graphwalker/exceptions/InvalidDataException.java rename to graphwalker-core/src/main/java/org/graphwalker/exceptions/InvalidDataException.java index d641fce7..f0215b3e 100644 --- a/src/main/java/org/graphwalker/exceptions/InvalidDataException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/exceptions/InvalidDataException.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/exceptions/StopConditionException.java b/graphwalker-core/src/main/java/org/graphwalker/exceptions/StopConditionException.java similarity index 58% rename from src/main/java/org/graphwalker/exceptions/StopConditionException.java rename to graphwalker-core/src/main/java/org/graphwalker/exceptions/StopConditionException.java index 0e816324..8e0dda1c 100644 --- a/src/main/java/org/graphwalker/exceptions/StopConditionException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/exceptions/StopConditionException.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/filters/AccessableEdgeFilter.java b/graphwalker-core/src/main/java/org/graphwalker/filters/AccessableEdgeFilter.java similarity index 67% rename from src/main/java/org/graphwalker/filters/AccessableEdgeFilter.java rename to graphwalker-core/src/main/java/org/graphwalker/filters/AccessableEdgeFilter.java index 1a53fdca..bad68567 100644 --- a/src/main/java/org/graphwalker/filters/AccessableEdgeFilter.java +++ b/graphwalker-core/src/main/java/org/graphwalker/filters/AccessableEdgeFilter.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/generators/A_StarPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/generators/A_StarPathGenerator.java old mode 100755 new mode 100644 similarity index 83% rename from src/main/java/org/graphwalker/generators/A_StarPathGenerator.java rename to graphwalker-core/src/main/java/org/graphwalker/generators/A_StarPathGenerator.java index 433a56c8..3bc40299 --- a/src/main/java/org/graphwalker/generators/A_StarPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/generators/A_StarPathGenerator.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/generators/AllPathPermutationsGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/generators/AllPathPermutationsGenerator.java similarity index 82% rename from src/main/java/org/graphwalker/generators/AllPathPermutationsGenerator.java rename to graphwalker-core/src/main/java/org/graphwalker/generators/AllPathPermutationsGenerator.java index 2884d122..d56ed75e 100644 --- a/src/main/java/org/graphwalker/generators/AllPathPermutationsGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/generators/AllPathPermutationsGenerator.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/generators/CodeGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/generators/CodeGenerator.java similarity index 70% rename from src/main/java/org/graphwalker/generators/CodeGenerator.java rename to graphwalker-core/src/main/java/org/graphwalker/generators/CodeGenerator.java index dbc96b19..d5ff9a91 100644 --- a/src/main/java/org/graphwalker/generators/CodeGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/generators/CodeGenerator.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/generators/CombinedPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/generators/CombinedPathGenerator.java similarity index 73% rename from src/main/java/org/graphwalker/generators/CombinedPathGenerator.java rename to graphwalker-core/src/main/java/org/graphwalker/generators/CombinedPathGenerator.java index 29b36d14..556c3983 100644 --- a/src/main/java/org/graphwalker/generators/CombinedPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/generators/CombinedPathGenerator.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/generators/ListGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/generators/ListGenerator.java similarity index 68% rename from src/main/java/org/graphwalker/generators/ListGenerator.java rename to graphwalker-core/src/main/java/org/graphwalker/generators/ListGenerator.java index 7bf409bc..ebd66083 100644 --- a/src/main/java/org/graphwalker/generators/ListGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/generators/ListGenerator.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/generators/NonOptimizedShortestPath.java b/graphwalker-core/src/main/java/org/graphwalker/generators/NonOptimizedShortestPath.java similarity index 80% rename from src/main/java/org/graphwalker/generators/NonOptimizedShortestPath.java rename to graphwalker-core/src/main/java/org/graphwalker/generators/NonOptimizedShortestPath.java index 901c87c8..f2805006 100644 --- a/src/main/java/org/graphwalker/generators/NonOptimizedShortestPath.java +++ b/graphwalker-core/src/main/java/org/graphwalker/generators/NonOptimizedShortestPath.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/generators/PathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/generators/PathGenerator.java similarity index 69% rename from src/main/java/org/graphwalker/generators/PathGenerator.java rename to graphwalker-core/src/main/java/org/graphwalker/generators/PathGenerator.java index 07569eb8..eac0c78f 100644 --- a/src/main/java/org/graphwalker/generators/PathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/generators/PathGenerator.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/generators/RandomPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/generators/RandomPathGenerator.java similarity index 75% rename from src/main/java/org/graphwalker/generators/RandomPathGenerator.java rename to graphwalker-core/src/main/java/org/graphwalker/generators/RandomPathGenerator.java index 18671237..a5a4ea3a 100644 --- a/src/main/java/org/graphwalker/generators/RandomPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/generators/RandomPathGenerator.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/generators/RequirementsGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/generators/RequirementsGenerator.java similarity index 70% rename from src/main/java/org/graphwalker/generators/RequirementsGenerator.java rename to graphwalker-core/src/main/java/org/graphwalker/generators/RequirementsGenerator.java index a1a38ad4..eb12e3cb 100644 --- a/src/main/java/org/graphwalker/generators/RequirementsGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/generators/RequirementsGenerator.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/graph/AbstractElement.java b/graphwalker-core/src/main/java/org/graphwalker/graph/AbstractElement.java similarity index 89% rename from src/main/java/org/graphwalker/graph/AbstractElement.java rename to graphwalker-core/src/main/java/org/graphwalker/graph/AbstractElement.java index 619b6b7b..f3277136 100644 --- a/src/main/java/org/graphwalker/graph/AbstractElement.java +++ b/graphwalker-core/src/main/java/org/graphwalker/graph/AbstractElement.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/graph/Edge.java b/graphwalker-core/src/main/java/org/graphwalker/graph/Edge.java similarity index 82% rename from src/main/java/org/graphwalker/graph/Edge.java rename to graphwalker-core/src/main/java/org/graphwalker/graph/Edge.java index 78d5012e..99ddfe87 100644 --- a/src/main/java/org/graphwalker/graph/Edge.java +++ b/graphwalker-core/src/main/java/org/graphwalker/graph/Edge.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/graph/Graph.java b/graphwalker-core/src/main/java/org/graphwalker/graph/Graph.java similarity index 72% rename from src/main/java/org/graphwalker/graph/Graph.java rename to graphwalker-core/src/main/java/org/graphwalker/graph/Graph.java index 533c118d..a831c8d8 100644 --- a/src/main/java/org/graphwalker/graph/Graph.java +++ b/graphwalker-core/src/main/java/org/graphwalker/graph/Graph.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/graph/Vertex.java b/graphwalker-core/src/main/java/org/graphwalker/graph/Vertex.java similarity index 80% rename from src/main/java/org/graphwalker/graph/Vertex.java rename to graphwalker-core/src/main/java/org/graphwalker/graph/Vertex.java index 58b9e72c..88754722 100644 --- a/src/main/java/org/graphwalker/graph/Vertex.java +++ b/graphwalker-core/src/main/java/org/graphwalker/graph/Vertex.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/io/AbstractModelHandler.java b/graphwalker-core/src/main/java/org/graphwalker/io/AbstractModelHandler.java similarity index 56% rename from src/main/java/org/graphwalker/io/AbstractModelHandler.java rename to graphwalker-core/src/main/java/org/graphwalker/io/AbstractModelHandler.java index 5ec44715..4dc44cac 100644 --- a/src/main/java/org/graphwalker/io/AbstractModelHandler.java +++ b/graphwalker-core/src/main/java/org/graphwalker/io/AbstractModelHandler.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/io/GraphML.java b/graphwalker-core/src/main/java/org/graphwalker/io/GraphML.java similarity index 97% rename from src/main/java/org/graphwalker/io/GraphML.java rename to graphwalker-core/src/main/java/org/graphwalker/io/GraphML.java index d4bb71f6..b605b94f 100644 --- a/src/main/java/org/graphwalker/io/GraphML.java +++ b/graphwalker-core/src/main/java/org/graphwalker/io/GraphML.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/io/ParseLog.java b/graphwalker-core/src/main/java/org/graphwalker/io/ParseLog.java similarity index 67% rename from src/main/java/org/graphwalker/io/ParseLog.java rename to graphwalker-core/src/main/java/org/graphwalker/io/ParseLog.java index 56de88be..d4386858 100644 --- a/src/main/java/org/graphwalker/io/ParseLog.java +++ b/graphwalker-core/src/main/java/org/graphwalker/io/ParseLog.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/io/PrintHTMLTestSequence.java b/graphwalker-core/src/main/java/org/graphwalker/io/PrintHTMLTestSequence.java similarity index 75% rename from src/main/java/org/graphwalker/io/PrintHTMLTestSequence.java rename to graphwalker-core/src/main/java/org/graphwalker/io/PrintHTMLTestSequence.java index e833a414..d1fb226c 100644 --- a/src/main/java/org/graphwalker/io/PrintHTMLTestSequence.java +++ b/graphwalker-core/src/main/java/org/graphwalker/io/PrintHTMLTestSequence.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/machines/ExtendedFiniteStateMachine.java b/graphwalker-core/src/main/java/org/graphwalker/machines/ExtendedFiniteStateMachine.java similarity index 88% rename from src/main/java/org/graphwalker/machines/ExtendedFiniteStateMachine.java rename to graphwalker-core/src/main/java/org/graphwalker/machines/ExtendedFiniteStateMachine.java index 3e4b4808..7d3421a1 100644 --- a/src/main/java/org/graphwalker/machines/ExtendedFiniteStateMachine.java +++ b/graphwalker-core/src/main/java/org/graphwalker/machines/ExtendedFiniteStateMachine.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/machines/FiniteStateMachine.java b/graphwalker-core/src/main/java/org/graphwalker/machines/FiniteStateMachine.java similarity index 91% rename from src/main/java/org/graphwalker/machines/FiniteStateMachine.java rename to graphwalker-core/src/main/java/org/graphwalker/machines/FiniteStateMachine.java index 5841db7a..ffe8ed78 100644 --- a/src/main/java/org/graphwalker/machines/FiniteStateMachine.java +++ b/graphwalker-core/src/main/java/org/graphwalker/machines/FiniteStateMachine.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/graphwalker-core/src/main/java/org/graphwalker/multipleModels/ModelAPI.java b/graphwalker-core/src/main/java/org/graphwalker/multipleModels/ModelAPI.java new file mode 100644 index 00000000..e89292ec --- /dev/null +++ b/graphwalker-core/src/main/java/org/graphwalker/multipleModels/ModelAPI.java @@ -0,0 +1,52 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker.multipleModels; + +import org.graphwalker.ModelBasedTesting; +import org.graphwalker.generators.PathGenerator; + +/** + * @author krikar Any test should extend this class. + */ +public class ModelAPI { + private ModelBasedTesting mbt = null; + + public ModelAPI(String model, boolean efsm, PathGenerator generator, boolean weight) { + mbt = new ModelBasedTesting(); + mbt.readGraph(model); + mbt.enableExtended(efsm); + mbt.setGenerator(generator); + mbt.setWeighted(weight); + } + + public void setMbt(ModelBasedTesting mbt) { + this.mbt = mbt; + } + + public ModelBasedTesting getMbt() { + return mbt; + } +} \ No newline at end of file diff --git a/src/main/java/org/graphwalker/multipleModels/ModelHandler.java b/graphwalker-core/src/main/java/org/graphwalker/multipleModels/ModelHandler.java similarity index 91% rename from src/main/java/org/graphwalker/multipleModels/ModelHandler.java rename to graphwalker-core/src/main/java/org/graphwalker/multipleModels/ModelHandler.java index d690276b..3d942d07 100644 --- a/src/main/java/org/graphwalker/multipleModels/ModelHandler.java +++ b/graphwalker-core/src/main/java/org/graphwalker/multipleModels/ModelHandler.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ /* * The MIT License * diff --git a/src/main/java/org/graphwalker/statistics/EdgeCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/statistics/EdgeCoverageStatistics.java similarity index 64% rename from src/main/java/org/graphwalker/statistics/EdgeCoverageStatistics.java rename to graphwalker-core/src/main/java/org/graphwalker/statistics/EdgeCoverageStatistics.java index 942d5fe6..ba75dbc2 100644 --- a/src/main/java/org/graphwalker/statistics/EdgeCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/statistics/EdgeCoverageStatistics.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/statistics/EdgeSequenceCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/statistics/EdgeSequenceCoverageStatistics.java similarity index 76% rename from src/main/java/org/graphwalker/statistics/EdgeSequenceCoverageStatistics.java rename to graphwalker-core/src/main/java/org/graphwalker/statistics/EdgeSequenceCoverageStatistics.java index 343eaf57..acaa6faa 100644 --- a/src/main/java/org/graphwalker/statistics/EdgeSequenceCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/statistics/EdgeSequenceCoverageStatistics.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/statistics/RequirementCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/statistics/RequirementCoverageStatistics.java similarity index 69% rename from src/main/java/org/graphwalker/statistics/RequirementCoverageStatistics.java rename to graphwalker-core/src/main/java/org/graphwalker/statistics/RequirementCoverageStatistics.java index 0e99136e..9080e0ce 100644 --- a/src/main/java/org/graphwalker/statistics/RequirementCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/statistics/RequirementCoverageStatistics.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/statistics/Statistics.java b/graphwalker-core/src/main/java/org/graphwalker/statistics/Statistics.java similarity index 54% rename from src/main/java/org/graphwalker/statistics/Statistics.java rename to graphwalker-core/src/main/java/org/graphwalker/statistics/Statistics.java index e9a300d8..1cb4c452 100644 --- a/src/main/java/org/graphwalker/statistics/Statistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/statistics/Statistics.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/java/org/graphwalker/statistics/VertexCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/statistics/VertexCoverageStatistics.java similarity index 64% rename from src/main/java/org/graphwalker/statistics/VertexCoverageStatistics.java rename to graphwalker-core/src/main/java/org/graphwalker/statistics/VertexCoverageStatistics.java index 338cbd77..5e7d9b2c 100644 --- a/src/main/java/org/graphwalker/statistics/VertexCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/statistics/VertexCoverageStatistics.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/main/resources/org/graphwalker/GUI/resources/icons/back.png b/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/back.png similarity index 100% rename from src/main/resources/org/graphwalker/GUI/resources/icons/back.png rename to graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/back.png diff --git a/src/main/resources/org/graphwalker/GUI/resources/icons/exit.png b/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/exit.png similarity index 100% rename from src/main/resources/org/graphwalker/GUI/resources/icons/exit.png rename to graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/exit.png diff --git a/src/main/resources/org/graphwalker/GUI/resources/icons/first.png b/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/first.png similarity index 100% rename from src/main/resources/org/graphwalker/GUI/resources/icons/first.png rename to graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/first.png diff --git a/src/main/resources/org/graphwalker/GUI/resources/icons/new.png b/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/new.png similarity index 100% rename from src/main/resources/org/graphwalker/GUI/resources/icons/new.png rename to graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/new.png diff --git a/src/main/resources/org/graphwalker/GUI/resources/icons/next.png b/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/next.png similarity index 100% rename from src/main/resources/org/graphwalker/GUI/resources/icons/next.png rename to graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/next.png diff --git a/src/main/resources/org/graphwalker/GUI/resources/icons/open.png b/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/open.png similarity index 100% rename from src/main/resources/org/graphwalker/GUI/resources/icons/open.png rename to graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/open.png diff --git a/src/main/resources/org/graphwalker/GUI/resources/icons/pause.png b/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/pause.png similarity index 100% rename from src/main/resources/org/graphwalker/GUI/resources/icons/pause.png rename to graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/pause.png diff --git a/src/main/resources/org/graphwalker/GUI/resources/icons/reload.png b/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/reload.png similarity index 100% rename from src/main/resources/org/graphwalker/GUI/resources/icons/reload.png rename to graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/reload.png diff --git a/src/main/resources/org/graphwalker/GUI/resources/icons/run.png b/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/run.png similarity index 100% rename from src/main/resources/org/graphwalker/GUI/resources/icons/run.png rename to graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/run.png diff --git a/src/main/resources/org/graphwalker/GUI/resources/icons/save.png b/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/save.png similarity index 100% rename from src/main/resources/org/graphwalker/GUI/resources/icons/save.png rename to graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/save.png diff --git a/graphwalker-core/src/main/resources/org/graphwalker/resources/graphwalker.properties b/graphwalker-core/src/main/resources/org/graphwalker/resources/graphwalker.properties new file mode 100644 index 00000000..f6b0e895 --- /dev/null +++ b/graphwalker-core/src/main/resources/org/graphwalker/resources/graphwalker.properties @@ -0,0 +1,52 @@ +### +# #%L +# GraphWalker Core +# %% +# Copyright (C) 2011 GraphWalker +# %% +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# #L% +### +# Set root logger level to DEBUG and its only appender to A1. +log4j.rootLogger=ALL, CONSOLE, LOG + +# stdout is set to be a ConsoleAppender. +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender + +# A1 uses PatternLayout. +log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=%d [%t] %-5p %c - %m%n + +log4j.appender.LOG.layout=org.apache.log4j.PatternLayout +log4j.appender.LOG.layout.ConversionPattern=%d [%t] %-5p - %m%n + +log4j.appender.LOG=org.apache.log4j.RollingFileAppender +log4j.appender.LOG.File=logs/graphwalker.log +log4j.appender.LOG.MaxFileSize=20MB +log4j.appender.LOG.MaxBackupIndex=5 + +# Differentiate the log levels +log4j.appender.CONSOLE.threshold=ERROR +log4j.appender.LOG.threshold=INFO + +# The port on which the web services run +graphwalker.ws.port=9090 + +# Should the SOAP service be started when the GUI app starts +org.graphwalker.GUI.startSOAP=false \ No newline at end of file diff --git a/graphwalker-core/src/main/resources/org/graphwalker/resources/version.properties b/graphwalker-core/src/main/resources/org/graphwalker/resources/version.properties new file mode 100644 index 00000000..44560172 --- /dev/null +++ b/graphwalker-core/src/main/resources/org/graphwalker/resources/version.properties @@ -0,0 +1,29 @@ +### +# #%L +# GraphWalker Core +# %% +# Copyright (C) 2011 GraphWalker +# %% +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# #L% +### +version.major=2 +version.minor=5 +version.fix=14 +version.svn.rev=911 \ No newline at end of file diff --git a/src/test/java/org/graphwalker/CLITest.java b/graphwalker-core/src/test/java/org/graphwalker/CLITest.java similarity index 93% rename from src/test/java/org/graphwalker/CLITest.java rename to graphwalker-core/src/test/java/org/graphwalker/CLITest.java index f7088400..ce25047a 100644 --- a/src/test/java/org/graphwalker/CLITest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/CLITest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/ExtendedFiniteStateMachineTest.java b/graphwalker-core/src/test/java/org/graphwalker/ExtendedFiniteStateMachineTest.java similarity index 72% rename from src/test/java/org/graphwalker/ExtendedFiniteStateMachineTest.java rename to graphwalker-core/src/test/java/org/graphwalker/ExtendedFiniteStateMachineTest.java index e375dfd7..063f512c 100644 --- a/src/test/java/org/graphwalker/ExtendedFiniteStateMachineTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/ExtendedFiniteStateMachineTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/ExtendedMain.java b/graphwalker-core/src/test/java/org/graphwalker/ExtendedMain.java similarity index 74% rename from src/test/java/org/graphwalker/ExtendedMain.java rename to graphwalker-core/src/test/java/org/graphwalker/ExtendedMain.java index 04b2597e..03919a05 100644 --- a/src/test/java/org/graphwalker/ExtendedMain.java +++ b/graphwalker-core/src/test/java/org/graphwalker/ExtendedMain.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/FiniteStateMachineTest.java b/graphwalker-core/src/test/java/org/graphwalker/FiniteStateMachineTest.java similarity index 71% rename from src/test/java/org/graphwalker/FiniteStateMachineTest.java rename to graphwalker-core/src/test/java/org/graphwalker/FiniteStateMachineTest.java index 4dbe8a23..125dc6db 100644 --- a/src/test/java/org/graphwalker/FiniteStateMachineTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/FiniteStateMachineTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/KeywordsTest.java b/graphwalker-core/src/test/java/org/graphwalker/KeywordsTest.java similarity index 76% rename from src/test/java/org/graphwalker/KeywordsTest.java rename to graphwalker-core/src/test/java/org/graphwalker/KeywordsTest.java index 214861ba..a8fff176 100644 --- a/src/test/java/org/graphwalker/KeywordsTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/KeywordsTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/ModelBasedTestingTest.java b/graphwalker-core/src/test/java/org/graphwalker/ModelBasedTestingTest.java similarity index 89% rename from src/test/java/org/graphwalker/ModelBasedTestingTest.java rename to graphwalker-core/src/test/java/org/graphwalker/ModelBasedTestingTest.java index 22a6ee77..22f75c82 100644 --- a/src/test/java/org/graphwalker/ModelBasedTestingTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/ModelBasedTestingTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/MultipleModelsTest.java b/graphwalker-core/src/test/java/org/graphwalker/MultipleModelsTest.java similarity index 88% rename from src/test/java/org/graphwalker/MultipleModelsTest.java rename to graphwalker-core/src/test/java/org/graphwalker/MultipleModelsTest.java index f3f0c28a..080381af 100644 --- a/src/test/java/org/graphwalker/MultipleModelsTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/MultipleModelsTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ package org.graphwalker; import static org.junit.Assert.assertEquals; diff --git a/src/test/java/org/graphwalker/RequirementVariableTest.java b/graphwalker-core/src/test/java/org/graphwalker/RequirementVariableTest.java similarity index 85% rename from src/test/java/org/graphwalker/RequirementVariableTest.java rename to graphwalker-core/src/test/java/org/graphwalker/RequirementVariableTest.java index 54b40d05..091cbcad 100644 --- a/src/test/java/org/graphwalker/RequirementVariableTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/RequirementVariableTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/graphwalker-core/src/test/java/org/graphwalker/SoapServiceTest.java b/graphwalker-core/src/test/java/org/graphwalker/SoapServiceTest.java new file mode 100644 index 00000000..a2e5bf5c --- /dev/null +++ b/graphwalker-core/src/test/java/org/graphwalker/SoapServiceTest.java @@ -0,0 +1,38 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker; + +import org.junit.Test; + +public class SoapServiceTest { + + @Test(expected = RuntimeException.class) + public void testGetDataValue() { + SoapServices ss = new SoapServices(new ModelBasedTesting()); + ss.GetDataValue(null); + } + +} diff --git a/src/test/java/org/graphwalker/StatisticsManagerTest.java b/graphwalker-core/src/test/java/org/graphwalker/StatisticsManagerTest.java similarity index 90% rename from src/test/java/org/graphwalker/StatisticsManagerTest.java rename to graphwalker-core/src/test/java/org/graphwalker/StatisticsManagerTest.java index 078ae280..bd237ab4 100644 --- a/src/test/java/org/graphwalker/StatisticsManagerTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/StatisticsManagerTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/UtilTest.java b/graphwalker-core/src/test/java/org/graphwalker/UtilTest.java similarity index 69% rename from src/test/java/org/graphwalker/UtilTest.java rename to graphwalker-core/src/test/java/org/graphwalker/UtilTest.java index e01435f1..b16addbf 100644 --- a/src/test/java/org/graphwalker/UtilTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/UtilTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/bugs/Issue_10.java b/graphwalker-core/src/test/java/org/graphwalker/bugs/Issue_10.java similarity index 72% rename from src/test/java/org/graphwalker/bugs/Issue_10.java rename to graphwalker-core/src/test/java/org/graphwalker/bugs/Issue_10.java index 6295df15..17fb0172 100644 --- a/src/test/java/org/graphwalker/bugs/Issue_10.java +++ b/graphwalker-core/src/test/java/org/graphwalker/bugs/Issue_10.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/bugs/Issue_9.java b/graphwalker-core/src/test/java/org/graphwalker/bugs/Issue_9.java similarity index 73% rename from src/test/java/org/graphwalker/bugs/Issue_9.java rename to graphwalker-core/src/test/java/org/graphwalker/bugs/Issue_9.java index e4800b0e..b5c47b2e 100644 --- a/src/test/java/org/graphwalker/bugs/Issue_9.java +++ b/graphwalker-core/src/test/java/org/graphwalker/bugs/Issue_9.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/conditions/AlternativeConditionTest.java b/graphwalker-core/src/test/java/org/graphwalker/conditions/AlternativeConditionTest.java similarity index 64% rename from src/test/java/org/graphwalker/conditions/AlternativeConditionTest.java rename to graphwalker-core/src/test/java/org/graphwalker/conditions/AlternativeConditionTest.java index bfcf8176..4cc06620 100644 --- a/src/test/java/org/graphwalker/conditions/AlternativeConditionTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/conditions/AlternativeConditionTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/conditions/CombinationalConditionTest.java b/graphwalker-core/src/test/java/org/graphwalker/conditions/CombinationalConditionTest.java similarity index 62% rename from src/test/java/org/graphwalker/conditions/CombinationalConditionTest.java rename to graphwalker-core/src/test/java/org/graphwalker/conditions/CombinationalConditionTest.java index 9187d4da..6c0a4914 100644 --- a/src/test/java/org/graphwalker/conditions/CombinationalConditionTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/conditions/CombinationalConditionTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/conditions/EdgeCoverageTest.java b/graphwalker-core/src/test/java/org/graphwalker/conditions/EdgeCoverageTest.java similarity index 73% rename from src/test/java/org/graphwalker/conditions/EdgeCoverageTest.java rename to graphwalker-core/src/test/java/org/graphwalker/conditions/EdgeCoverageTest.java index 867cee66..faa52eb0 100644 --- a/src/test/java/org/graphwalker/conditions/EdgeCoverageTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/conditions/EdgeCoverageTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/conditions/ReachedEdgeTest.java b/graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedEdgeTest.java similarity index 73% rename from src/test/java/org/graphwalker/conditions/ReachedEdgeTest.java rename to graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedEdgeTest.java index 2242488b..faef8852 100644 --- a/src/test/java/org/graphwalker/conditions/ReachedEdgeTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedEdgeTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/conditions/ReachedRequirementTest.java b/graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedRequirementTest.java similarity index 74% rename from src/test/java/org/graphwalker/conditions/ReachedRequirementTest.java rename to graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedRequirementTest.java index 0a1883b2..d78f769b 100644 --- a/src/test/java/org/graphwalker/conditions/ReachedRequirementTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedRequirementTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/conditions/ReachedStateTest.java b/graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedStateTest.java similarity index 73% rename from src/test/java/org/graphwalker/conditions/ReachedStateTest.java rename to graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedStateTest.java index 66a5f849..f79a2c01 100644 --- a/src/test/java/org/graphwalker/conditions/ReachedStateTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedStateTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/conditions/RequirementCoverageTest.java b/graphwalker-core/src/test/java/org/graphwalker/conditions/RequirementCoverageTest.java similarity index 74% rename from src/test/java/org/graphwalker/conditions/RequirementCoverageTest.java rename to graphwalker-core/src/test/java/org/graphwalker/conditions/RequirementCoverageTest.java index 020682e6..aacffcaf 100644 --- a/src/test/java/org/graphwalker/conditions/RequirementCoverageTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/conditions/RequirementCoverageTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/conditions/StateCoverageTest.java b/graphwalker-core/src/test/java/org/graphwalker/conditions/StateCoverageTest.java similarity index 74% rename from src/test/java/org/graphwalker/conditions/StateCoverageTest.java rename to graphwalker-core/src/test/java/org/graphwalker/conditions/StateCoverageTest.java index aa48061a..465d62d7 100644 --- a/src/test/java/org/graphwalker/conditions/StateCoverageTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/conditions/StateCoverageTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/conditions/TestCaseLengthTest.java b/graphwalker-core/src/test/java/org/graphwalker/conditions/TestCaseLengthTest.java similarity index 73% rename from src/test/java/org/graphwalker/conditions/TestCaseLengthTest.java rename to graphwalker-core/src/test/java/org/graphwalker/conditions/TestCaseLengthTest.java index a5dd2b08..f0cd4fcc 100644 --- a/src/test/java/org/graphwalker/conditions/TestCaseLengthTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/conditions/TestCaseLengthTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/conditions/TimeDurationTest.java b/graphwalker-core/src/test/java/org/graphwalker/conditions/TimeDurationTest.java similarity index 76% rename from src/test/java/org/graphwalker/conditions/TimeDurationTest.java rename to graphwalker-core/src/test/java/org/graphwalker/conditions/TimeDurationTest.java index 71e1eb76..8e8a891b 100644 --- a/src/test/java/org/graphwalker/conditions/TimeDurationTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/conditions/TimeDurationTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/filters/AccessableEdgeFilterTest.java b/graphwalker-core/src/test/java/org/graphwalker/filters/AccessableEdgeFilterTest.java similarity index 76% rename from src/test/java/org/graphwalker/filters/AccessableEdgeFilterTest.java rename to graphwalker-core/src/test/java/org/graphwalker/filters/AccessableEdgeFilterTest.java index 162e1cce..7586474b 100644 --- a/src/test/java/org/graphwalker/filters/AccessableEdgeFilterTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/filters/AccessableEdgeFilterTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMBeanShellTest.java b/graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMBeanShellTest.java similarity index 78% rename from src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMBeanShellTest.java rename to graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMBeanShellTest.java index 039b909c..1f0a6863 100644 --- a/src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMBeanShellTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMBeanShellTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMJavaScriptTest.java b/graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMJavaScriptTest.java similarity index 78% rename from src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMJavaScriptTest.java rename to graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMJavaScriptTest.java index 1b3647c8..626577c8 100644 --- a/src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMJavaScriptTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMJavaScriptTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/generators/A_StarPathGeneratorFSMTest.java b/graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorFSMTest.java similarity index 74% rename from src/test/java/org/graphwalker/generators/A_StarPathGeneratorFSMTest.java rename to graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorFSMTest.java index 7d95c1cc..70b90bd1 100644 --- a/src/test/java/org/graphwalker/generators/A_StarPathGeneratorFSMTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorFSMTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/generators/AllPathPermutationsGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/generators/AllPathPermutationsGeneratorTest.java similarity index 68% rename from src/test/java/org/graphwalker/generators/AllPathPermutationsGeneratorTest.java rename to graphwalker-core/src/test/java/org/graphwalker/generators/AllPathPermutationsGeneratorTest.java index afdd60da..040e7c4b 100644 --- a/src/test/java/org/graphwalker/generators/AllPathPermutationsGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/generators/AllPathPermutationsGeneratorTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/generators/CodeGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/generators/CodeGeneratorTest.java similarity index 72% rename from src/test/java/org/graphwalker/generators/CodeGeneratorTest.java rename to graphwalker-core/src/test/java/org/graphwalker/generators/CodeGeneratorTest.java index 60bc0c02..2d80a087 100644 --- a/src/test/java/org/graphwalker/generators/CodeGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/generators/CodeGeneratorTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/generators/CombinedPathGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/generators/CombinedPathGeneratorTest.java similarity index 70% rename from src/test/java/org/graphwalker/generators/CombinedPathGeneratorTest.java rename to graphwalker-core/src/test/java/org/graphwalker/generators/CombinedPathGeneratorTest.java index 2847c6d8..ead04bab 100644 --- a/src/test/java/org/graphwalker/generators/CombinedPathGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/generators/CombinedPathGeneratorTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/generators/ListGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/generators/ListGeneratorTest.java similarity index 66% rename from src/test/java/org/graphwalker/generators/ListGeneratorTest.java rename to graphwalker-core/src/test/java/org/graphwalker/generators/ListGeneratorTest.java index 8f7c53e9..93efffdc 100644 --- a/src/test/java/org/graphwalker/generators/ListGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/generators/ListGeneratorTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/generators/RandomPathGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/generators/RandomPathGeneratorTest.java similarity index 73% rename from src/test/java/org/graphwalker/generators/RandomPathGeneratorTest.java rename to graphwalker-core/src/test/java/org/graphwalker/generators/RandomPathGeneratorTest.java index 36591bb5..cc83598e 100644 --- a/src/test/java/org/graphwalker/generators/RandomPathGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/generators/RandomPathGeneratorTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/src/test/java/org/graphwalker/io/GraphMLTest.java b/graphwalker-core/src/test/java/org/graphwalker/io/GraphMLTest.java similarity index 92% rename from src/test/java/org/graphwalker/io/GraphMLTest.java rename to graphwalker-core/src/test/java/org/graphwalker/io/GraphMLTest.java index e6fce779..c5370bf4 100644 --- a/src/test/java/org/graphwalker/io/GraphMLTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/io/GraphMLTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // diff --git a/graphwalker-core/src/test/java/org/graphwalker/mbt_init.xml b/graphwalker-core/src/test/java/org/graphwalker/mbt_init.xml new file mode 100644 index 00000000..aebe7dab --- /dev/null +++ b/graphwalker-core/src/test/java/org/graphwalker/mbt_init.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/src/test/java/org/graphwalker/multiple/ModelHandlerTest.java b/graphwalker-core/src/test/java/org/graphwalker/multiple/ModelHandlerTest.java similarity index 84% rename from src/test/java/org/graphwalker/multiple/ModelHandlerTest.java rename to graphwalker-core/src/test/java/org/graphwalker/multiple/ModelHandlerTest.java index f6417dfb..f5b1b708 100644 --- a/src/test/java/org/graphwalker/multiple/ModelHandlerTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/multiple/ModelHandlerTest.java @@ -1,3 +1,28 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ package org.graphwalker.multiple; import org.apache.log4j.Logger; diff --git a/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_A1_API.java b/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_A1_API.java new file mode 100644 index 00000000..dd279eb4 --- /dev/null +++ b/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_A1_API.java @@ -0,0 +1,58 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker.multiple; + +import org.graphwalker.generators.PathGenerator; +import org.graphwalker.multipleModels.ModelAPI; + +/** + * Hello world! + * + */ +public class Model_A1_API extends ModelAPI { + + public Model_A1_API(String model, boolean efsm, PathGenerator generator) { + super(model, efsm, generator, false); + } + + public void e_Init() { + } + + public void e_StartClient() { + } + + public void e_ValidPremiumCredentials() { + } + + public void v_ClientNotRunning() { + } + + public void v_LoginPrompted() { + } + + public void v_WhatsNew() { + } +} diff --git a/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_A_API.java b/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_A_API.java new file mode 100644 index 00000000..cbb26cef --- /dev/null +++ b/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_A_API.java @@ -0,0 +1,70 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker.multiple; + +import org.graphwalker.generators.PathGenerator; +import org.graphwalker.multipleModels.ModelAPI; + +/** + * Hello world! + * + */ +public class Model_A_API extends ModelAPI { + + public Model_A_API(String model, boolean efsm, PathGenerator generator) { + super(model, efsm, generator, false); + } + + public void e_ExitClient() { + } + + public void e_Init() { + } + + public void e_LogOut() { + } + + public void e_Start() { + } + + public void e_ToggleRememberMe() { + } + + public void e_ValidLogin() { + } + + public void v_ClientNotRunning() { + } + + public void v_ClientRunning() { + } + + public void v_Login() { + } + + public void v_WhatsNew() { + } +} diff --git a/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_B1_API.java b/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_B1_API.java new file mode 100644 index 00000000..28ee0efd --- /dev/null +++ b/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_B1_API.java @@ -0,0 +1,61 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker.multiple; + +import org.graphwalker.generators.PathGenerator; +import org.graphwalker.multipleModels.ModelAPI; + +/** + * Hello world! + * + */ +public class Model_B1_API extends ModelAPI { + + public Model_B1_API(String model, boolean efsm, PathGenerator generator) { + super(model, efsm, generator, false); + } + + public void e_Init() { + } + + public void e_Logout() { + } + + public void e_Close() { + } + + public void e_ExitClient() { + } + + public void v_ClientNotRunning() { + } + + public void v_LoginPrompted() { + } + + public void v_WhatsNew() { + } +} diff --git a/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_B_API.java b/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_B_API.java new file mode 100644 index 00000000..776a4d1d --- /dev/null +++ b/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_B_API.java @@ -0,0 +1,55 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker.multiple; + +import org.graphwalker.generators.PathGenerator; +import org.graphwalker.multipleModels.ModelAPI; + +/** + * Hello world! + * + */ +public class Model_B_API extends ModelAPI { + + public Model_B_API(String model, boolean efsm, PathGenerator generator) { + super(model, efsm, generator, false); + } + + public void e_CreatePlaylist() { + } + + public void e_DeletePlaylist() { + } + + public void e_Init() { + } + + public void v_PaylistCreated() { + } + + public void v_WhatsNew() { + } +} diff --git a/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_C_API.java b/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_C_API.java new file mode 100644 index 00000000..51fb868a --- /dev/null +++ b/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_C_API.java @@ -0,0 +1,55 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker.multiple; + +import org.graphwalker.generators.PathGenerator; +import org.graphwalker.multipleModels.ModelAPI; + +/** + * Hello world! + * + */ +public class Model_C_API extends ModelAPI { + + public Model_C_API(String model, boolean efsm, PathGenerator generator) { + super(model, efsm, generator, false); + } + + public void e_GotoWhatsNew() { + } + + public void e_ViewPlaylist() { + } + + public void e_Init() { + } + + public void v_PaylistCreated() { + } + + public void v_WhatsNew() { + } +} diff --git a/src/test/resources/bsh/reqtags/graph.bsh b/graphwalker-core/src/test/resources/bsh/reqtags/graph.bsh similarity index 100% rename from src/test/resources/bsh/reqtags/graph.bsh rename to graphwalker-core/src/test/resources/bsh/reqtags/graph.bsh diff --git a/src/test/resources/bsh/reqtags/mbt_startup.bsh b/graphwalker-core/src/test/resources/bsh/reqtags/mbt_startup.bsh similarity index 100% rename from src/test/resources/bsh/reqtags/mbt_startup.bsh rename to graphwalker-core/src/test/resources/bsh/reqtags/mbt_startup.bsh diff --git a/src/test/resources/graphml/ModelBasedTestingTest.testNewState.graphml b/graphwalker-core/src/test/resources/graphml/ModelBasedTestingTest.testNewState.graphml similarity index 100% rename from src/test/resources/graphml/ModelBasedTestingTest.testNewState.graphml rename to graphwalker-core/src/test/resources/graphml/ModelBasedTestingTest.testNewState.graphml diff --git a/src/test/resources/graphml/UC01.graphml b/graphwalker-core/src/test/resources/graphml/UC01.graphml similarity index 100% rename from src/test/resources/graphml/UC01.graphml rename to graphwalker-core/src/test/resources/graphml/UC01.graphml diff --git a/src/test/resources/graphml/bugs/Issue_10.graphml b/graphwalker-core/src/test/resources/graphml/bugs/Issue_10.graphml similarity index 100% rename from src/test/resources/graphml/bugs/Issue_10.graphml rename to graphwalker-core/src/test/resources/graphml/bugs/Issue_10.graphml diff --git a/src/test/resources/graphml/bugs/Issue_9.graphml b/graphwalker-core/src/test/resources/graphml/bugs/Issue_9.graphml similarity index 100% rename from src/test/resources/graphml/bugs/Issue_9.graphml rename to graphwalker-core/src/test/resources/graphml/bugs/Issue_9.graphml diff --git a/src/test/resources/graphml/efsm_lables/testMergeEFSM_Lables.graphml b/graphwalker-core/src/test/resources/graphml/efsm_lables/testMergeEFSM_Lables.graphml similarity index 100% rename from src/test/resources/graphml/efsm_lables/testMergeEFSM_Lables.graphml rename to graphwalker-core/src/test/resources/graphml/efsm_lables/testMergeEFSM_Lables.graphml diff --git a/src/test/resources/graphml/mergeSubgraphs_01/a.graphml b/graphwalker-core/src/test/resources/graphml/mergeSubgraphs_01/a.graphml similarity index 100% rename from src/test/resources/graphml/mergeSubgraphs_01/a.graphml rename to graphwalker-core/src/test/resources/graphml/mergeSubgraphs_01/a.graphml diff --git a/src/test/resources/graphml/mergeSubgraphs_01/b.graphml b/graphwalker-core/src/test/resources/graphml/mergeSubgraphs_01/b.graphml similarity index 100% rename from src/test/resources/graphml/mergeSubgraphs_01/b.graphml rename to graphwalker-core/src/test/resources/graphml/mergeSubgraphs_01/b.graphml diff --git a/src/test/resources/graphml/mergeSubgraphs_02/a.graphml b/graphwalker-core/src/test/resources/graphml/mergeSubgraphs_02/a.graphml similarity index 100% rename from src/test/resources/graphml/mergeSubgraphs_02/a.graphml rename to graphwalker-core/src/test/resources/graphml/mergeSubgraphs_02/a.graphml diff --git a/src/test/resources/graphml/mergeSubgraphs_02/b.graphml b/graphwalker-core/src/test/resources/graphml/mergeSubgraphs_02/b.graphml similarity index 100% rename from src/test/resources/graphml/mergeSubgraphs_02/b.graphml rename to graphwalker-core/src/test/resources/graphml/mergeSubgraphs_02/b.graphml diff --git a/src/test/resources/graphml/merging/Filter.graphml b/graphwalker-core/src/test/resources/graphml/merging/Filter.graphml similarity index 100% rename from src/test/resources/graphml/merging/Filter.graphml rename to graphwalker-core/src/test/resources/graphml/merging/Filter.graphml diff --git a/src/test/resources/graphml/merging/Filterval5CD.graphml b/graphwalker-core/src/test/resources/graphml/merging/Filterval5CD.graphml similarity index 100% rename from src/test/resources/graphml/merging/Filterval5CD.graphml rename to graphwalker-core/src/test/resources/graphml/merging/Filterval5CD.graphml diff --git a/src/test/resources/graphml/merging/Filterval7CD.graphml b/graphwalker-core/src/test/resources/graphml/merging/Filterval7CD.graphml similarity index 100% rename from src/test/resources/graphml/merging/Filterval7CD.graphml rename to graphwalker-core/src/test/resources/graphml/merging/Filterval7CD.graphml diff --git a/src/test/resources/graphml/merging/FiltervalOH.graphml b/graphwalker-core/src/test/resources/graphml/merging/FiltervalOH.graphml similarity index 100% rename from src/test/resources/graphml/merging/FiltervalOH.graphml rename to graphwalker-core/src/test/resources/graphml/merging/FiltervalOH.graphml diff --git a/src/test/resources/graphml/merging/FiltervalTH.graphml b/graphwalker-core/src/test/resources/graphml/merging/FiltervalTH.graphml similarity index 100% rename from src/test/resources/graphml/merging/FiltervalTH.graphml rename to graphwalker-core/src/test/resources/graphml/merging/FiltervalTH.graphml diff --git a/src/test/resources/graphml/methods/ExtendedMain.graphml b/graphwalker-core/src/test/resources/graphml/methods/ExtendedMain.graphml similarity index 100% rename from src/test/resources/graphml/methods/ExtendedMain.graphml rename to graphwalker-core/src/test/resources/graphml/methods/ExtendedMain.graphml diff --git a/src/test/resources/graphml/methods/Main.graphml b/graphwalker-core/src/test/resources/graphml/methods/Main.graphml similarity index 100% rename from src/test/resources/graphml/methods/Main.graphml rename to graphwalker-core/src/test/resources/graphml/methods/Main.graphml diff --git a/src/test/resources/graphml/misc/missing_inedges.graphml b/graphwalker-core/src/test/resources/graphml/misc/missing_inedges.graphml similarity index 100% rename from src/test/resources/graphml/misc/missing_inedges.graphml rename to graphwalker-core/src/test/resources/graphml/misc/missing_inedges.graphml diff --git a/src/test/resources/graphml/misc/no_missing_inedges.graphml b/graphwalker-core/src/test/resources/graphml/misc/no_missing_inedges.graphml similarity index 100% rename from src/test/resources/graphml/misc/no_missing_inedges.graphml rename to graphwalker-core/src/test/resources/graphml/misc/no_missing_inedges.graphml diff --git a/src/test/resources/graphml/modelWithDescr.graphml b/graphwalker-core/src/test/resources/graphml/modelWithDescr.graphml similarity index 100% rename from src/test/resources/graphml/modelWithDescr.graphml rename to graphwalker-core/src/test/resources/graphml/modelWithDescr.graphml diff --git a/src/test/resources/graphml/multiple/A.graphml b/graphwalker-core/src/test/resources/graphml/multiple/A.graphml similarity index 100% rename from src/test/resources/graphml/multiple/A.graphml rename to graphwalker-core/src/test/resources/graphml/multiple/A.graphml diff --git a/src/test/resources/graphml/multiple/B.graphml b/graphwalker-core/src/test/resources/graphml/multiple/B.graphml similarity index 100% rename from src/test/resources/graphml/multiple/B.graphml rename to graphwalker-core/src/test/resources/graphml/multiple/B.graphml diff --git a/src/test/resources/graphml/multiple/switch/A.graphml b/graphwalker-core/src/test/resources/graphml/multiple/switch/A.graphml similarity index 100% rename from src/test/resources/graphml/multiple/switch/A.graphml rename to graphwalker-core/src/test/resources/graphml/multiple/switch/A.graphml diff --git a/src/test/resources/graphml/multiple/switch/A1.graphml b/graphwalker-core/src/test/resources/graphml/multiple/switch/A1.graphml similarity index 100% rename from src/test/resources/graphml/multiple/switch/A1.graphml rename to graphwalker-core/src/test/resources/graphml/multiple/switch/A1.graphml diff --git a/src/test/resources/graphml/multiple/switch/B.graphml b/graphwalker-core/src/test/resources/graphml/multiple/switch/B.graphml similarity index 100% rename from src/test/resources/graphml/multiple/switch/B.graphml rename to graphwalker-core/src/test/resources/graphml/multiple/switch/B.graphml diff --git a/src/test/resources/graphml/multiple/switch/B1.graphml b/graphwalker-core/src/test/resources/graphml/multiple/switch/B1.graphml similarity index 100% rename from src/test/resources/graphml/multiple/switch/B1.graphml rename to graphwalker-core/src/test/resources/graphml/multiple/switch/B1.graphml diff --git a/src/test/resources/graphml/multiple/switch/C.graphml b/graphwalker-core/src/test/resources/graphml/multiple/switch/C.graphml similarity index 100% rename from src/test/resources/graphml/multiple/switch/C.graphml rename to graphwalker-core/src/test/resources/graphml/multiple/switch/C.graphml diff --git a/src/test/resources/graphml/org.graphwalker.EventDrivenModels.eventModel.a.graphml b/graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.eventModel.a.graphml similarity index 100% rename from src/test/resources/graphml/org.graphwalker.EventDrivenModels.eventModel.a.graphml rename to graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.eventModel.a.graphml diff --git a/src/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.1.graphml b/graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.1.graphml similarity index 100% rename from src/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.1.graphml rename to graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.1.graphml diff --git a/src/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.2/a.graphml b/graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.2/a.graphml similarity index 100% rename from src/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.2/a.graphml rename to graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.2/a.graphml diff --git a/src/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.2/b.graphml b/graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.2/b.graphml similarity index 100% rename from src/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.2/b.graphml rename to graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.2/b.graphml diff --git a/src/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.A.graphml b/graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.A.graphml similarity index 100% rename from src/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.A.graphml rename to graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.A.graphml diff --git a/src/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.B.graphml b/graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.B.graphml similarity index 100% rename from src/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.B.graphml rename to graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.B.graphml diff --git a/src/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.C.graphml b/graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.C.graphml similarity index 100% rename from src/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.C.graphml rename to graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.C.graphml diff --git a/src/test/resources/graphml/permutations/simple.graphml b/graphwalker-core/src/test/resources/graphml/permutations/simple.graphml similarity index 100% rename from src/test/resources/graphml/permutations/simple.graphml rename to graphwalker-core/src/test/resources/graphml/permutations/simple.graphml diff --git a/src/test/resources/graphml/reqtags/ExtendedMain.graphml b/graphwalker-core/src/test/resources/graphml/reqtags/ExtendedMain.graphml similarity index 100% rename from src/test/resources/graphml/reqtags/ExtendedMain.graphml rename to graphwalker-core/src/test/resources/graphml/reqtags/ExtendedMain.graphml diff --git a/src/test/resources/graphml/reqtags/execAction.graphml b/graphwalker-core/src/test/resources/graphml/reqtags/execAction.graphml similarity index 100% rename from src/test/resources/graphml/reqtags/execAction.graphml rename to graphwalker-core/src/test/resources/graphml/reqtags/execAction.graphml diff --git a/src/test/resources/graphml/test01/graph1.graphml b/graphwalker-core/src/test/resources/graphml/test01/graph1.graphml similarity index 100% rename from src/test/resources/graphml/test01/graph1.graphml rename to graphwalker-core/src/test/resources/graphml/test01/graph1.graphml diff --git a/src/test/resources/graphml/test01/graph2.graphml b/graphwalker-core/src/test/resources/graphml/test01/graph2.graphml similarity index 100% rename from src/test/resources/graphml/test01/graph2.graphml rename to graphwalker-core/src/test/resources/graphml/test01/graph2.graphml diff --git a/src/test/resources/graphml/test02/graph1.graphml b/graphwalker-core/src/test/resources/graphml/test02/graph1.graphml similarity index 100% rename from src/test/resources/graphml/test02/graph1.graphml rename to graphwalker-core/src/test/resources/graphml/test02/graph1.graphml diff --git a/src/test/resources/graphml/test02/graph2.graphml b/graphwalker-core/src/test/resources/graphml/test02/graph2.graphml similarity index 100% rename from src/test/resources/graphml/test02/graph2.graphml rename to graphwalker-core/src/test/resources/graphml/test02/graph2.graphml diff --git a/src/test/resources/graphml/test03/Graph001.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph001.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph001.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph001.graphml diff --git a/src/test/resources/graphml/test03/Graph002.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph002.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph002.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph002.graphml diff --git a/src/test/resources/graphml/test03/Graph003.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph003.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph003.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph003.graphml diff --git a/src/test/resources/graphml/test03/Graph004.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph004.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph004.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph004.graphml diff --git a/src/test/resources/graphml/test03/Graph005.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph005.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph005.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph005.graphml diff --git a/src/test/resources/graphml/test03/Graph006.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph006.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph006.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph006.graphml diff --git a/src/test/resources/graphml/test03/Graph007.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph007.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph007.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph007.graphml diff --git a/src/test/resources/graphml/test03/Graph008.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph008.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph008.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph008.graphml diff --git a/src/test/resources/graphml/test03/Graph009.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph009.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph009.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph009.graphml diff --git a/src/test/resources/graphml/test03/Graph010.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph010.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph010.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph010.graphml diff --git a/src/test/resources/graphml/test03/Graph011.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph011.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph011.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph011.graphml diff --git a/src/test/resources/graphml/test03/Graph012.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph012.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph012.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph012.graphml diff --git a/src/test/resources/graphml/test03/Graph013.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph013.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph013.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph013.graphml diff --git a/src/test/resources/graphml/test03/Graph014.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph014.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph014.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph014.graphml diff --git a/src/test/resources/graphml/test03/Graph015.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph015.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph015.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph015.graphml diff --git a/src/test/resources/graphml/test03/Graph016.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph016.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph016.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph016.graphml diff --git a/src/test/resources/graphml/test03/Graph017.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph017.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph017.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph017.graphml diff --git a/src/test/resources/graphml/test03/Graph018.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph018.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph018.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph018.graphml diff --git a/src/test/resources/graphml/test03/Graph019.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph019.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph019.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph019.graphml diff --git a/src/test/resources/graphml/test03/Graph020.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph020.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph020.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph020.graphml diff --git a/src/test/resources/graphml/test03/Graph021.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph021.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph021.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph021.graphml diff --git a/src/test/resources/graphml/test03/Graph022.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph022.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph022.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph022.graphml diff --git a/src/test/resources/graphml/test03/Graph023.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph023.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph023.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph023.graphml diff --git a/src/test/resources/graphml/test03/Graph024.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph024.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph024.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph024.graphml diff --git a/src/test/resources/graphml/test03/Graph025.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph025.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph025.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph025.graphml diff --git a/src/test/resources/graphml/test03/Graph026.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph026.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph026.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph026.graphml diff --git a/src/test/resources/graphml/test03/Graph027.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph027.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph027.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph027.graphml diff --git a/src/test/resources/graphml/test03/Graph028.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph028.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph028.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph028.graphml diff --git a/src/test/resources/graphml/test03/Graph029.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph029.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph029.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph029.graphml diff --git a/src/test/resources/graphml/test03/Graph030.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph030.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph030.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph030.graphml diff --git a/src/test/resources/graphml/test03/Graph031.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph031.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph031.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph031.graphml diff --git a/src/test/resources/graphml/test03/Graph032.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph032.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph032.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph032.graphml diff --git a/src/test/resources/graphml/test03/Graph033.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph033.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph033.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph033.graphml diff --git a/src/test/resources/graphml/test03/Graph034.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph034.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph034.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph034.graphml diff --git a/src/test/resources/graphml/test03/Graph035.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph035.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph035.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph035.graphml diff --git a/src/test/resources/graphml/test03/Graph036.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph036.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph036.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph036.graphml diff --git a/src/test/resources/graphml/test03/Graph037.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph037.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph037.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph037.graphml diff --git a/src/test/resources/graphml/test03/Graph038.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph038.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph038.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph038.graphml diff --git a/src/test/resources/graphml/test03/Graph039.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph039.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph039.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph039.graphml diff --git a/src/test/resources/graphml/test03/Graph040.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph040.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph040.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph040.graphml diff --git a/src/test/resources/graphml/test03/Graph041.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph041.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph041.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph041.graphml diff --git a/src/test/resources/graphml/test03/Graph042.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph042.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph042.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph042.graphml diff --git a/src/test/resources/graphml/test03/Graph043.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph043.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph043.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph043.graphml diff --git a/src/test/resources/graphml/test03/Graph044.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph044.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph044.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph044.graphml diff --git a/src/test/resources/graphml/test03/Graph045.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph045.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph045.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph045.graphml diff --git a/src/test/resources/graphml/test03/Graph046.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph046.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph046.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph046.graphml diff --git a/src/test/resources/graphml/test03/Graph047.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph047.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph047.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph047.graphml diff --git a/src/test/resources/graphml/test03/Graph050.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph050.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph050.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph050.graphml diff --git a/src/test/resources/graphml/test03/Graph051.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph051.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph051.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph051.graphml diff --git a/src/test/resources/graphml/test03/Graph052.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph052.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph052.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph052.graphml diff --git a/src/test/resources/graphml/test03/Graph053.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph053.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph053.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph053.graphml diff --git a/src/test/resources/graphml/test03/Graph054.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph054.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph054.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph054.graphml diff --git a/src/test/resources/graphml/test03/Graph055.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph055.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph055.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph055.graphml diff --git a/src/test/resources/graphml/test03/Graph070.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph070.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph070.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph070.graphml diff --git a/src/test/resources/graphml/test03/Graph071.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph071.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph071.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph071.graphml diff --git a/src/test/resources/graphml/test03/Graph072.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph072.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph072.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph072.graphml diff --git a/src/test/resources/graphml/test03/Graph073.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph073.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph073.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph073.graphml diff --git a/src/test/resources/graphml/test03/Graph074.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph074.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph074.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph074.graphml diff --git a/src/test/resources/graphml/test03/Graph075.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph075.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph075.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph075.graphml diff --git a/src/test/resources/graphml/test03/Graph076.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph076.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph076.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph076.graphml diff --git a/src/test/resources/graphml/test03/Graph077.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph077.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph077.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph077.graphml diff --git a/src/test/resources/graphml/test03/Graph078.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph078.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph078.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph078.graphml diff --git a/src/test/resources/graphml/test03/Graph079.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph079.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph079.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph079.graphml diff --git a/src/test/resources/graphml/test03/Graph080.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph080.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph080.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph080.graphml diff --git a/src/test/resources/graphml/test03/Graph081.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph081.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph081.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph081.graphml diff --git a/src/test/resources/graphml/test03/Graph082.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph082.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph082.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph082.graphml diff --git a/src/test/resources/graphml/test03/Graph083.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph083.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph083.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph083.graphml diff --git a/src/test/resources/graphml/test03/Graph084.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph084.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph084.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph084.graphml diff --git a/src/test/resources/graphml/test03/Graph085.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph085.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph085.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph085.graphml diff --git a/src/test/resources/graphml/test03/Graph086.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph086.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph086.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph086.graphml diff --git a/src/test/resources/graphml/test03/Graph087.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph087.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph087.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph087.graphml diff --git a/src/test/resources/graphml/test03/Graph088.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph088.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph088.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph088.graphml diff --git a/src/test/resources/graphml/test03/Graph089.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph089.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph089.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph089.graphml diff --git a/src/test/resources/graphml/test03/Graph092.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph092.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph092.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph092.graphml diff --git a/src/test/resources/graphml/test03/Graph093.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph093.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph093.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph093.graphml diff --git a/src/test/resources/graphml/test03/Graph094.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph094.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph094.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph094.graphml diff --git a/src/test/resources/graphml/test03/Graph095.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph095.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph095.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph095.graphml diff --git a/src/test/resources/graphml/test03/Graph096.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph096.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph096.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph096.graphml diff --git a/src/test/resources/graphml/test03/Graph097.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph097.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph097.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph097.graphml diff --git a/src/test/resources/graphml/test03/Graph098.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph098.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph098.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph098.graphml diff --git a/src/test/resources/graphml/test03/Graph099.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph099.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph099.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph099.graphml diff --git a/src/test/resources/graphml/test03/Graph100.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph100.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph100.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph100.graphml diff --git a/src/test/resources/graphml/test03/Graph101.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph101.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph101.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph101.graphml diff --git a/src/test/resources/graphml/test03/Graph102.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph102.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph102.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph102.graphml diff --git a/src/test/resources/graphml/test03/Graph103.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph103.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph103.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph103.graphml diff --git a/src/test/resources/graphml/test03/Graph104.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph104.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph104.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph104.graphml diff --git a/src/test/resources/graphml/test03/Graph105.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph105.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph105.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph105.graphml diff --git a/src/test/resources/graphml/test03/Graph106.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph106.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph106.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph106.graphml diff --git a/src/test/resources/graphml/test03/Graph107.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph107.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph107.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph107.graphml diff --git a/src/test/resources/graphml/test03/Graph108.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph108.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph108.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph108.graphml diff --git a/src/test/resources/graphml/test03/Graph109.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph109.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph109.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph109.graphml diff --git a/src/test/resources/graphml/test03/Graph110.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph110.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph110.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph110.graphml diff --git a/src/test/resources/graphml/test03/Graph111.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph111.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph111.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph111.graphml diff --git a/src/test/resources/graphml/test03/Graph112.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph112.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph112.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph112.graphml diff --git a/src/test/resources/graphml/test03/Graph113.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph113.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph113.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph113.graphml diff --git a/src/test/resources/graphml/test03/Graph114.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph114.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph114.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph114.graphml diff --git a/src/test/resources/graphml/test03/Graph115.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph115.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph115.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph115.graphml diff --git a/src/test/resources/graphml/test03/Graph116.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph116.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph116.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph116.graphml diff --git a/src/test/resources/graphml/test03/Graph117.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph117.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph117.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph117.graphml diff --git a/src/test/resources/graphml/test03/Graph118.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph118.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph118.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph118.graphml diff --git a/src/test/resources/graphml/test03/Graph119.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph119.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph119.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph119.graphml diff --git a/src/test/resources/graphml/test03/Graph120.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph120.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph120.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph120.graphml diff --git a/src/test/resources/graphml/test03/Graph121.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph121.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph121.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph121.graphml diff --git a/src/test/resources/graphml/test03/Graph122.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph122.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph122.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph122.graphml diff --git a/src/test/resources/graphml/test03/Graph123.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph123.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph123.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph123.graphml diff --git a/src/test/resources/graphml/test03/Graph124.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph124.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph124.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph124.graphml diff --git a/src/test/resources/graphml/test03/Graph125.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph125.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph125.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph125.graphml diff --git a/src/test/resources/graphml/test03/Graph126.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph126.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph126.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph126.graphml diff --git a/src/test/resources/graphml/test03/Graph127.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph127.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph127.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph127.graphml diff --git a/src/test/resources/graphml/test03/Graph128.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph128.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph128.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph128.graphml diff --git a/src/test/resources/graphml/test03/Graph129.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph129.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph129.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph129.graphml diff --git a/src/test/resources/graphml/test03/Graph130.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph130.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph130.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph130.graphml diff --git a/src/test/resources/graphml/test03/Graph131.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph131.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph131.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph131.graphml diff --git a/src/test/resources/graphml/test03/Graph132.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph132.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph132.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph132.graphml diff --git a/src/test/resources/graphml/test03/Graph133.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph133.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph133.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph133.graphml diff --git a/src/test/resources/graphml/test03/Graph134.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph134.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph134.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph134.graphml diff --git a/src/test/resources/graphml/test03/Graph135.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph135.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph135.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph135.graphml diff --git a/src/test/resources/graphml/test03/Graph136.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph136.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph136.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph136.graphml diff --git a/src/test/resources/graphml/test03/Graph137.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph137.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph137.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph137.graphml diff --git a/src/test/resources/graphml/test03/Graph138.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph138.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph138.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph138.graphml diff --git a/src/test/resources/graphml/test03/Graph139.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph139.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph139.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph139.graphml diff --git a/src/test/resources/graphml/test03/Graph140.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph140.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph140.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph140.graphml diff --git a/src/test/resources/graphml/test03/Graph141.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph141.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph141.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph141.graphml diff --git a/src/test/resources/graphml/test03/Graph142.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph142.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph142.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph142.graphml diff --git a/src/test/resources/graphml/test03/Graph143.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph143.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph143.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph143.graphml diff --git a/src/test/resources/graphml/test03/Graph144.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph144.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph144.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph144.graphml diff --git a/src/test/resources/graphml/test03/Graph145.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph145.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph145.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph145.graphml diff --git a/src/test/resources/graphml/test03/Graph146.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph146.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph146.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph146.graphml diff --git a/src/test/resources/graphml/test03/Graph147.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph147.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph147.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph147.graphml diff --git a/src/test/resources/graphml/test03/Graph148.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph148.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph148.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph148.graphml diff --git a/src/test/resources/graphml/test03/Graph149.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph149.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph149.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph149.graphml diff --git a/src/test/resources/graphml/test03/Graph150.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph150.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph150.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph150.graphml diff --git a/src/test/resources/graphml/test03/Graph151.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph151.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph151.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph151.graphml diff --git a/src/test/resources/graphml/test03/Graph152.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph152.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph152.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph152.graphml diff --git a/src/test/resources/graphml/test03/Graph153.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph153.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph153.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph153.graphml diff --git a/src/test/resources/graphml/test03/Graph154.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph154.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph154.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph154.graphml diff --git a/src/test/resources/graphml/test03/Graph155.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph155.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph155.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph155.graphml diff --git a/src/test/resources/graphml/test03/Graph156.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph156.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph156.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph156.graphml diff --git a/src/test/resources/graphml/test03/Graph157.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph157.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph157.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph157.graphml diff --git a/src/test/resources/graphml/test03/Graph158.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph158.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph158.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph158.graphml diff --git a/src/test/resources/graphml/test03/Graph159.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph159.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph159.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph159.graphml diff --git a/src/test/resources/graphml/test03/Graph160.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph160.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph160.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph160.graphml diff --git a/src/test/resources/graphml/test03/Graph161.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph161.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph161.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph161.graphml diff --git a/src/test/resources/graphml/test03/Graph162.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph162.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph162.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph162.graphml diff --git a/src/test/resources/graphml/test03/Graph163.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph163.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph163.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph163.graphml diff --git a/src/test/resources/graphml/test03/Graph164.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph164.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph164.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph164.graphml diff --git a/src/test/resources/graphml/test03/Graph165.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph165.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph165.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph165.graphml diff --git a/src/test/resources/graphml/test03/Graph166.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph166.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph166.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph166.graphml diff --git a/src/test/resources/graphml/test03/Graph167.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph167.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph167.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph167.graphml diff --git a/src/test/resources/graphml/test03/Graph168.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph168.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph168.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph168.graphml diff --git a/src/test/resources/graphml/test03/Graph169.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph169.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph169.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph169.graphml diff --git a/src/test/resources/graphml/test03/Graph170.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph170.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph170.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph170.graphml diff --git a/src/test/resources/graphml/test03/Graph171.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph171.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph171.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph171.graphml diff --git a/src/test/resources/graphml/test03/Graph172.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph172.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph172.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph172.graphml diff --git a/src/test/resources/graphml/test03/Graph173.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph173.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph173.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph173.graphml diff --git a/src/test/resources/graphml/test03/Graph174.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph174.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph174.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph174.graphml diff --git a/src/test/resources/graphml/test03/Graph175.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph175.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph175.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph175.graphml diff --git a/src/test/resources/graphml/test03/Graph176.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph176.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph176.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph176.graphml diff --git a/src/test/resources/graphml/test03/Graph177.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph177.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph177.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph177.graphml diff --git a/src/test/resources/graphml/test03/Graph178.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph178.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph178.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph178.graphml diff --git a/src/test/resources/graphml/test03/Graph179.graphml b/graphwalker-core/src/test/resources/graphml/test03/Graph179.graphml similarity index 100% rename from src/test/resources/graphml/test03/Graph179.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Graph179.graphml diff --git a/src/test/resources/graphml/test03/Start.graphml b/graphwalker-core/src/test/resources/graphml/test03/Start.graphml similarity index 100% rename from src/test/resources/graphml/test03/Start.graphml rename to graphwalker-core/src/test/resources/graphml/test03/Start.graphml diff --git a/src/test/resources/graphml/test09/B.graphml b/graphwalker-core/src/test/resources/graphml/test09/B.graphml similarity index 100% rename from src/test/resources/graphml/test09/B.graphml rename to graphwalker-core/src/test/resources/graphml/test09/B.graphml diff --git a/src/test/resources/graphml/test09/C.graphml b/graphwalker-core/src/test/resources/graphml/test09/C.graphml similarity index 100% rename from src/test/resources/graphml/test09/C.graphml rename to graphwalker-core/src/test/resources/graphml/test09/C.graphml diff --git a/src/test/resources/graphml/test09/Start.graphml b/graphwalker-core/src/test/resources/graphml/test09/Start.graphml similarity index 100% rename from src/test/resources/graphml/test09/Start.graphml rename to graphwalker-core/src/test/resources/graphml/test09/Start.graphml diff --git a/src/test/resources/graphml/test10/B.graphml b/graphwalker-core/src/test/resources/graphml/test10/B.graphml similarity index 100% rename from src/test/resources/graphml/test10/B.graphml rename to graphwalker-core/src/test/resources/graphml/test10/B.graphml diff --git a/src/test/resources/graphml/test10/C.graphml b/graphwalker-core/src/test/resources/graphml/test10/C.graphml similarity index 100% rename from src/test/resources/graphml/test10/C.graphml rename to graphwalker-core/src/test/resources/graphml/test10/C.graphml diff --git a/src/test/resources/graphml/test10/Start.graphml b/graphwalker-core/src/test/resources/graphml/test10/Start.graphml similarity index 100% rename from src/test/resources/graphml/test10/Start.graphml rename to graphwalker-core/src/test/resources/graphml/test10/Start.graphml diff --git a/src/test/resources/graphml/test11/B.graphml b/graphwalker-core/src/test/resources/graphml/test11/B.graphml similarity index 100% rename from src/test/resources/graphml/test11/B.graphml rename to graphwalker-core/src/test/resources/graphml/test11/B.graphml diff --git a/src/test/resources/graphml/test11/C.graphml b/graphwalker-core/src/test/resources/graphml/test11/C.graphml similarity index 100% rename from src/test/resources/graphml/test11/C.graphml rename to graphwalker-core/src/test/resources/graphml/test11/C.graphml diff --git a/src/test/resources/graphml/test11/Start.graphml b/graphwalker-core/src/test/resources/graphml/test11/Start.graphml similarity index 100% rename from src/test/resources/graphml/test11/Start.graphml rename to graphwalker-core/src/test/resources/graphml/test11/Start.graphml diff --git a/src/test/resources/graphml/test13/B.graphml b/graphwalker-core/src/test/resources/graphml/test13/B.graphml similarity index 100% rename from src/test/resources/graphml/test13/B.graphml rename to graphwalker-core/src/test/resources/graphml/test13/B.graphml diff --git a/src/test/resources/graphml/test13/C.graphml b/graphwalker-core/src/test/resources/graphml/test13/C.graphml similarity index 100% rename from src/test/resources/graphml/test13/C.graphml rename to graphwalker-core/src/test/resources/graphml/test13/C.graphml diff --git a/src/test/resources/graphml/test13/Start.graphml b/graphwalker-core/src/test/resources/graphml/test13/Start.graphml similarity index 100% rename from src/test/resources/graphml/test13/Start.graphml rename to graphwalker-core/src/test/resources/graphml/test13/Start.graphml diff --git a/src/test/resources/graphml/test14/B.graphml b/graphwalker-core/src/test/resources/graphml/test14/B.graphml similarity index 100% rename from src/test/resources/graphml/test14/B.graphml rename to graphwalker-core/src/test/resources/graphml/test14/B.graphml diff --git a/src/test/resources/graphml/test14/C.graphml b/graphwalker-core/src/test/resources/graphml/test14/C.graphml similarity index 100% rename from src/test/resources/graphml/test14/C.graphml rename to graphwalker-core/src/test/resources/graphml/test14/C.graphml diff --git a/src/test/resources/graphml/test14/Start.graphml b/graphwalker-core/src/test/resources/graphml/test14/Start.graphml similarity index 100% rename from src/test/resources/graphml/test14/Start.graphml rename to graphwalker-core/src/test/resources/graphml/test14/Start.graphml diff --git a/src/test/resources/graphml/test15/test15.graphml b/graphwalker-core/src/test/resources/graphml/test15/test15.graphml similarity index 100% rename from src/test/resources/graphml/test15/test15.graphml rename to graphwalker-core/src/test/resources/graphml/test15/test15.graphml diff --git a/src/test/resources/graphml/test17/test17.graphml b/graphwalker-core/src/test/resources/graphml/test17/test17.graphml similarity index 100% rename from src/test/resources/graphml/test17/test17.graphml rename to graphwalker-core/src/test/resources/graphml/test17/test17.graphml diff --git a/src/test/resources/graphml/test18/test18.graphml b/graphwalker-core/src/test/resources/graphml/test18/test18.graphml similarity index 100% rename from src/test/resources/graphml/test18/test18.graphml rename to graphwalker-core/src/test/resources/graphml/test18/test18.graphml diff --git a/src/test/resources/graphml/test19/test19.graphml b/graphwalker-core/src/test/resources/graphml/test19/test19.graphml similarity index 100% rename from src/test/resources/graphml/test19/test19.graphml rename to graphwalker-core/src/test/resources/graphml/test19/test19.graphml diff --git a/src/test/resources/graphml/test20/test20.graphml b/graphwalker-core/src/test/resources/graphml/test20/test20.graphml similarity index 100% rename from src/test/resources/graphml/test20/test20.graphml rename to graphwalker-core/src/test/resources/graphml/test20/test20.graphml diff --git a/src/test/resources/graphml/test22/1.graphml b/graphwalker-core/src/test/resources/graphml/test22/1.graphml similarity index 100% rename from src/test/resources/graphml/test22/1.graphml rename to graphwalker-core/src/test/resources/graphml/test22/1.graphml diff --git a/src/test/resources/graphml/test22/2.graphml b/graphwalker-core/src/test/resources/graphml/test22/2.graphml similarity index 100% rename from src/test/resources/graphml/test22/2.graphml rename to graphwalker-core/src/test/resources/graphml/test22/2.graphml diff --git a/src/test/resources/graphml/test22/main.graphml b/graphwalker-core/src/test/resources/graphml/test22/main.graphml similarity index 100% rename from src/test/resources/graphml/test22/main.graphml rename to graphwalker-core/src/test/resources/graphml/test22/main.graphml diff --git a/src/test/resources/graphml/test23/AddressBook.graphml b/graphwalker-core/src/test/resources/graphml/test23/AddressBook.graphml similarity index 100% rename from src/test/resources/graphml/test23/AddressBook.graphml rename to graphwalker-core/src/test/resources/graphml/test23/AddressBook.graphml diff --git a/src/test/resources/graphml/test23/ContactTapToSelectNumber.graphml b/graphwalker-core/src/test/resources/graphml/test23/ContactTapToSelectNumber.graphml similarity index 100% rename from src/test/resources/graphml/test23/ContactTapToSelectNumber.graphml rename to graphwalker-core/src/test/resources/graphml/test23/ContactTapToSelectNumber.graphml diff --git a/src/test/resources/graphml/test23/Contacts.graphml b/graphwalker-core/src/test/resources/graphml/test23/Contacts.graphml similarity index 100% rename from src/test/resources/graphml/test23/Contacts.graphml rename to graphwalker-core/src/test/resources/graphml/test23/Contacts.graphml diff --git a/src/test/resources/graphml/test23/Main.graphml b/graphwalker-core/src/test/resources/graphml/test23/Main.graphml similarity index 100% rename from src/test/resources/graphml/test23/Main.graphml rename to graphwalker-core/src/test/resources/graphml/test23/Main.graphml diff --git a/src/test/resources/graphml/test23/SendVCard.graphml b/graphwalker-core/src/test/resources/graphml/test23/SendVCard.graphml similarity index 100% rename from src/test/resources/graphml/test23/SendVCard.graphml rename to graphwalker-core/src/test/resources/graphml/test23/SendVCard.graphml diff --git a/src/test/resources/graphml/test24/AddressBook.graphml b/graphwalker-core/src/test/resources/graphml/test24/AddressBook.graphml similarity index 100% rename from src/test/resources/graphml/test24/AddressBook.graphml rename to graphwalker-core/src/test/resources/graphml/test24/AddressBook.graphml diff --git a/src/test/resources/graphml/test24/AddressBookContact.graphml b/graphwalker-core/src/test/resources/graphml/test24/AddressBookContact.graphml similarity index 100% rename from src/test/resources/graphml/test24/AddressBookContact.graphml rename to graphwalker-core/src/test/resources/graphml/test24/AddressBookContact.graphml diff --git a/src/test/resources/graphml/test24/AddressBookReadOnly.graphml b/graphwalker-core/src/test/resources/graphml/test24/AddressBookReadOnly.graphml similarity index 100% rename from src/test/resources/graphml/test24/AddressBookReadOnly.graphml rename to graphwalker-core/src/test/resources/graphml/test24/AddressBookReadOnly.graphml diff --git a/src/test/resources/graphml/test24/Alarm.graphml b/graphwalker-core/src/test/resources/graphml/test24/Alarm.graphml similarity index 100% rename from src/test/resources/graphml/test24/Alarm.graphml rename to graphwalker-core/src/test/resources/graphml/test24/Alarm.graphml diff --git a/src/test/resources/graphml/test24/AlarmEdit.graphml b/graphwalker-core/src/test/resources/graphml/test24/AlarmEdit.graphml similarity index 100% rename from src/test/resources/graphml/test24/AlarmEdit.graphml rename to graphwalker-core/src/test/resources/graphml/test24/AlarmEdit.graphml diff --git a/src/test/resources/graphml/test24/Audio.graphml b/graphwalker-core/src/test/resources/graphml/test24/Audio.graphml similarity index 100% rename from src/test/resources/graphml/test24/Audio.graphml rename to graphwalker-core/src/test/resources/graphml/test24/Audio.graphml diff --git a/src/test/resources/graphml/test24/Calculator.graphml b/graphwalker-core/src/test/resources/graphml/test24/Calculator.graphml similarity index 100% rename from src/test/resources/graphml/test24/Calculator.graphml rename to graphwalker-core/src/test/resources/graphml/test24/Calculator.graphml diff --git a/src/test/resources/graphml/test24/Calendar.graphml b/graphwalker-core/src/test/resources/graphml/test24/Calendar.graphml similarity index 100% rename from src/test/resources/graphml/test24/Calendar.graphml rename to graphwalker-core/src/test/resources/graphml/test24/Calendar.graphml diff --git a/src/test/resources/graphml/test24/CalendarAppointment.graphml b/graphwalker-core/src/test/resources/graphml/test24/CalendarAppointment.graphml similarity index 100% rename from src/test/resources/graphml/test24/CalendarAppointment.graphml rename to graphwalker-core/src/test/resources/graphml/test24/CalendarAppointment.graphml diff --git a/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml b/graphwalker-core/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml similarity index 100% rename from src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml rename to graphwalker-core/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml diff --git a/src/test/resources/graphml/test24/CallHistory.graphml b/graphwalker-core/src/test/resources/graphml/test24/CallHistory.graphml similarity index 100% rename from src/test/resources/graphml/test24/CallHistory.graphml rename to graphwalker-core/src/test/resources/graphml/test24/CallHistory.graphml diff --git a/src/test/resources/graphml/test24/Camera.graphml b/graphwalker-core/src/test/resources/graphml/test24/Camera.graphml similarity index 100% rename from src/test/resources/graphml/test24/Camera.graphml rename to graphwalker-core/src/test/resources/graphml/test24/Camera.graphml diff --git a/src/test/resources/graphml/test24/ContactFavorites.graphml b/graphwalker-core/src/test/resources/graphml/test24/ContactFavorites.graphml similarity index 100% rename from src/test/resources/graphml/test24/ContactFavorites.graphml rename to graphwalker-core/src/test/resources/graphml/test24/ContactFavorites.graphml diff --git a/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml b/graphwalker-core/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml similarity index 100% rename from src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml rename to graphwalker-core/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml diff --git a/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml b/graphwalker-core/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml similarity index 100% rename from src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml rename to graphwalker-core/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml diff --git a/src/test/resources/graphml/test24/Contacts.graphml b/graphwalker-core/src/test/resources/graphml/test24/Contacts.graphml similarity index 100% rename from src/test/resources/graphml/test24/Contacts.graphml rename to graphwalker-core/src/test/resources/graphml/test24/Contacts.graphml diff --git a/src/test/resources/graphml/test24/ContactsReadOnly.graphml b/graphwalker-core/src/test/resources/graphml/test24/ContactsReadOnly.graphml similarity index 100% rename from src/test/resources/graphml/test24/ContactsReadOnly.graphml rename to graphwalker-core/src/test/resources/graphml/test24/ContactsReadOnly.graphml diff --git a/src/test/resources/graphml/test24/Date.graphml b/graphwalker-core/src/test/resources/graphml/test24/Date.graphml similarity index 100% rename from src/test/resources/graphml/test24/Date.graphml rename to graphwalker-core/src/test/resources/graphml/test24/Date.graphml diff --git a/src/test/resources/graphml/test24/DefaultValues.graphml b/graphwalker-core/src/test/resources/graphml/test24/DefaultValues.graphml similarity index 100% rename from src/test/resources/graphml/test24/DefaultValues.graphml rename to graphwalker-core/src/test/resources/graphml/test24/DefaultValues.graphml diff --git a/src/test/resources/graphml/test24/DeleteItems.graphml b/graphwalker-core/src/test/resources/graphml/test24/DeleteItems.graphml similarity index 100% rename from src/test/resources/graphml/test24/DeleteItems.graphml rename to graphwalker-core/src/test/resources/graphml/test24/DeleteItems.graphml diff --git a/src/test/resources/graphml/test24/GlobalSettings.graphml b/graphwalker-core/src/test/resources/graphml/test24/GlobalSettings.graphml similarity index 100% rename from src/test/resources/graphml/test24/GlobalSettings.graphml rename to graphwalker-core/src/test/resources/graphml/test24/GlobalSettings.graphml diff --git a/src/test/resources/graphml/test24/ImageViewer.graphml b/graphwalker-core/src/test/resources/graphml/test24/ImageViewer.graphml similarity index 100% rename from src/test/resources/graphml/test24/ImageViewer.graphml rename to graphwalker-core/src/test/resources/graphml/test24/ImageViewer.graphml diff --git a/src/test/resources/graphml/test24/KeyboardNumeric.graphml b/graphwalker-core/src/test/resources/graphml/test24/KeyboardNumeric.graphml similarity index 100% rename from src/test/resources/graphml/test24/KeyboardNumeric.graphml rename to graphwalker-core/src/test/resources/graphml/test24/KeyboardNumeric.graphml diff --git a/src/test/resources/graphml/test24/KeyboardText.graphml b/graphwalker-core/src/test/resources/graphml/test24/KeyboardText.graphml similarity index 100% rename from src/test/resources/graphml/test24/KeyboardText.graphml rename to graphwalker-core/src/test/resources/graphml/test24/KeyboardText.graphml diff --git a/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml b/graphwalker-core/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml similarity index 100% rename from src/test/resources/graphml/test24/KeyboardToolsMenu.graphml rename to graphwalker-core/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml diff --git a/src/test/resources/graphml/test24/Main.graphml b/graphwalker-core/src/test/resources/graphml/test24/Main.graphml similarity index 100% rename from src/test/resources/graphml/test24/Main.graphml rename to graphwalker-core/src/test/resources/graphml/test24/Main.graphml diff --git a/src/test/resources/graphml/test24/MakeCall.graphml b/graphwalker-core/src/test/resources/graphml/test24/MakeCall.graphml similarity index 100% rename from src/test/resources/graphml/test24/MakeCall.graphml rename to graphwalker-core/src/test/resources/graphml/test24/MakeCall.graphml diff --git a/src/test/resources/graphml/test24/MediaPlayer.graphml b/graphwalker-core/src/test/resources/graphml/test24/MediaPlayer.graphml similarity index 100% rename from src/test/resources/graphml/test24/MediaPlayer.graphml rename to graphwalker-core/src/test/resources/graphml/test24/MediaPlayer.graphml diff --git a/src/test/resources/graphml/test24/MessagingCompose.graphml b/graphwalker-core/src/test/resources/graphml/test24/MessagingCompose.graphml similarity index 100% rename from src/test/resources/graphml/test24/MessagingCompose.graphml rename to graphwalker-core/src/test/resources/graphml/test24/MessagingCompose.graphml diff --git a/src/test/resources/graphml/test24/MessagingDrafts.graphml b/graphwalker-core/src/test/resources/graphml/test24/MessagingDrafts.graphml similarity index 100% rename from src/test/resources/graphml/test24/MessagingDrafts.graphml rename to graphwalker-core/src/test/resources/graphml/test24/MessagingDrafts.graphml diff --git a/src/test/resources/graphml/test24/MessagingInbox.graphml b/graphwalker-core/src/test/resources/graphml/test24/MessagingInbox.graphml similarity index 100% rename from src/test/resources/graphml/test24/MessagingInbox.graphml rename to graphwalker-core/src/test/resources/graphml/test24/MessagingInbox.graphml diff --git a/src/test/resources/graphml/test24/MessagingSent.graphml b/graphwalker-core/src/test/resources/graphml/test24/MessagingSent.graphml similarity index 100% rename from src/test/resources/graphml/test24/MessagingSent.graphml rename to graphwalker-core/src/test/resources/graphml/test24/MessagingSent.graphml diff --git a/src/test/resources/graphml/test24/NeoBrowser.graphml b/graphwalker-core/src/test/resources/graphml/test24/NeoBrowser.graphml similarity index 100% rename from src/test/resources/graphml/test24/NeoBrowser.graphml rename to graphwalker-core/src/test/resources/graphml/test24/NeoBrowser.graphml diff --git a/src/test/resources/graphml/test24/Notes.graphml b/graphwalker-core/src/test/resources/graphml/test24/Notes.graphml similarity index 100% rename from src/test/resources/graphml/test24/Notes.graphml rename to graphwalker-core/src/test/resources/graphml/test24/Notes.graphml diff --git a/src/test/resources/graphml/test24/NumberToDial.graphml b/graphwalker-core/src/test/resources/graphml/test24/NumberToDial.graphml similarity index 100% rename from src/test/resources/graphml/test24/NumberToDial.graphml rename to graphwalker-core/src/test/resources/graphml/test24/NumberToDial.graphml diff --git a/src/test/resources/graphml/test24/RunningApplications.graphml b/graphwalker-core/src/test/resources/graphml/test24/RunningApplications.graphml similarity index 100% rename from src/test/resources/graphml/test24/RunningApplications.graphml rename to graphwalker-core/src/test/resources/graphml/test24/RunningApplications.graphml diff --git a/src/test/resources/graphml/test24/SendMessage.graphml b/graphwalker-core/src/test/resources/graphml/test24/SendMessage.graphml similarity index 100% rename from src/test/resources/graphml/test24/SendMessage.graphml rename to graphwalker-core/src/test/resources/graphml/test24/SendMessage.graphml diff --git a/src/test/resources/graphml/test24/SendPictureAsMMS.graphml b/graphwalker-core/src/test/resources/graphml/test24/SendPictureAsMMS.graphml similarity index 100% rename from src/test/resources/graphml/test24/SendPictureAsMMS.graphml rename to graphwalker-core/src/test/resources/graphml/test24/SendPictureAsMMS.graphml diff --git a/src/test/resources/graphml/test24/SendVCard.graphml b/graphwalker-core/src/test/resources/graphml/test24/SendVCard.graphml similarity index 100% rename from src/test/resources/graphml/test24/SendVCard.graphml rename to graphwalker-core/src/test/resources/graphml/test24/SendVCard.graphml diff --git a/src/test/resources/graphml/test24/SysFiles.graphml b/graphwalker-core/src/test/resources/graphml/test24/SysFiles.graphml similarity index 100% rename from src/test/resources/graphml/test24/SysFiles.graphml rename to graphwalker-core/src/test/resources/graphml/test24/SysFiles.graphml diff --git a/src/test/resources/graphml/test24/Tetris.graphml b/graphwalker-core/src/test/resources/graphml/test24/Tetris.graphml similarity index 100% rename from src/test/resources/graphml/test24/Tetris.graphml rename to graphwalker-core/src/test/resources/graphml/test24/Tetris.graphml diff --git a/src/test/resources/graphml/test24/Time.graphml b/graphwalker-core/src/test/resources/graphml/test24/Time.graphml similarity index 100% rename from src/test/resources/graphml/test24/Time.graphml rename to graphwalker-core/src/test/resources/graphml/test24/Time.graphml diff --git a/src/test/resources/graphml/weight/FSM.graphml b/graphwalker-core/src/test/resources/graphml/weight/FSM.graphml similarity index 100% rename from src/test/resources/graphml/weight/FSM.graphml rename to graphwalker-core/src/test/resources/graphml/weight/FSM.graphml diff --git a/src/test/resources/lib/small_jar.jar b/graphwalker-core/src/test/resources/lib/small_jar.jar similarity index 100% rename from src/test/resources/lib/small_jar.jar rename to graphwalker-core/src/test/resources/lib/small_jar.jar diff --git a/src/test/resources/templates/junit.template b/graphwalker-core/src/test/resources/templates/junit.template similarity index 100% rename from src/test/resources/templates/junit.template rename to graphwalker-core/src/test/resources/templates/junit.template diff --git a/src/test/resources/templates/perl.template b/graphwalker-core/src/test/resources/templates/perl.template similarity index 100% rename from src/test/resources/templates/perl.template rename to graphwalker-core/src/test/resources/templates/perl.template diff --git a/src/test/resources/templates/short.report b/graphwalker-core/src/test/resources/templates/short.report similarity index 100% rename from src/test/resources/templates/short.report rename to graphwalker-core/src/test/resources/templates/short.report diff --git a/graphwalker-core/src/test/resources/xml/ReachedVertex.xml b/graphwalker-core/src/test/resources/xml/ReachedVertex.xml new file mode 100644 index 00000000..0d356526 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/ReachedVertex.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/bugs/Issue_10.xml b/graphwalker-core/src/test/resources/xml/bugs/Issue_10.xml new file mode 100644 index 00000000..7bd77551 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/bugs/Issue_10.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/bugs/Issue_9.xml b/graphwalker-core/src/test/resources/xml/bugs/Issue_9.xml new file mode 100644 index 00000000..49a8ffbb --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/bugs/Issue_9.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/javaExecutor.xml b/graphwalker-core/src/test/resources/xml/javaExecutor.xml new file mode 100644 index 00000000..2560a82a --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/javaExecutor.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/mbt_setup.dtd b/graphwalker-core/src/test/resources/xml/mbt_setup.dtd new file mode 100644 index 00000000..10933d85 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/mbt_setup.dtd @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/multipleA.xml b/graphwalker-core/src/test/resources/xml/multipleA.xml new file mode 100644 index 00000000..08bcc527 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/multipleA.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/multipleB.xml b/graphwalker-core/src/test/resources/xml/multipleB.xml new file mode 100644 index 00000000..51f3c5d2 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/multipleB.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml new file mode 100644 index 00000000..d2c4ab92 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml new file mode 100644 index 00000000..1e75b023 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml new file mode 100644 index 00000000..dce2c684 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml new file mode 100644 index 00000000..2ec5035d --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml new file mode 100644 index 00000000..c414df40 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml new file mode 100644 index 00000000..c1928fec --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqCoverage.xml b/graphwalker-core/src/test/resources/xml/reqCoverage.xml new file mode 100644 index 00000000..ae8633e5 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/reqCoverage.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init.xml new file mode 100644 index 00000000..32b65290 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init10.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init10.xml new file mode 100644 index 00000000..2bc19a4f --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init10.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init11.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init11.xml new file mode 100644 index 00000000..f7ecb15e --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init11.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init2.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init2.xml new file mode 100644 index 00000000..d62e479d --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init2.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init3.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init3.xml new file mode 100644 index 00000000..13464110 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init3.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init4.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init4.xml new file mode 100644 index 00000000..18c155eb --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init4.xml @@ -0,0 +1,57 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init5.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init5.xml new file mode 100644 index 00000000..ce0e71c1 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init5.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init6.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init6.xml new file mode 100644 index 00000000..d8835294 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init6.xml @@ -0,0 +1,32 @@ + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init7.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init7.xml new file mode 100644 index 00000000..d8835294 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init7.xml @@ -0,0 +1,32 @@ + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init8.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init8.xml new file mode 100644 index 00000000..6f82cbe9 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init8.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init9.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init9.xml new file mode 100644 index 00000000..a32d2845 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init9.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/switch/A.xml b/graphwalker-core/src/test/resources/xml/switch/A.xml new file mode 100644 index 00000000..ccd862df --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/switch/A.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/switch/B.xml b/graphwalker-core/src/test/resources/xml/switch/B.xml new file mode 100644 index 00000000..ff6d8624 --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/switch/B.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/switch/C.xml b/graphwalker-core/src/test/resources/xml/switch/C.xml new file mode 100644 index 00000000..ea0bddab --- /dev/null +++ b/graphwalker-core/src/test/resources/xml/switch/C.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/graphwalker-parent/pom.xml b/graphwalker-parent/pom.xml new file mode 100644 index 00000000..a3b4f3e9 --- /dev/null +++ b/graphwalker-parent/pom.xml @@ -0,0 +1,255 @@ + + + 4.0.0 + org.graphwalker + graphwalker-parent + 2.5.14-SNAPSHOT + pom + GraphWalker + GraphWalker is a tool for generating offline and online test sequences from Finite State Machines and Extended Finite State Machines. + http://graphwalker.org + 2011 + + + GraphWalker + http://graphwalker.org + + + + + MIT-License + http://www.opensource.org/licenses/mit-license.php + repo + + + + + + krikar + Kristian Karl + kristian.hermann.karl@gmail.com + + Lead + + + + + + + Fredrik Gustafsson + + + Harald Hartwig + + + Johan Brorson + + + Johan Tejle + + + Nils Olsson + + + Ola Sundin + + + Stefan Vahlgren + + + Peter Johansson + + + + + UTF-8 + 2.0b4 + 2.0.1 + 4.8.2 + + + + ../graphwalker-core + ../graphwalker-standalone + + + + + + org.graphwalker + graphwalker + ${project.version} + pom + + + org.graphwalker + graphwalker-core + ${project.version} + + + log4j + log4j + 1.2.16 + + + junit + junit + ${junit.version} + test + + + com.sun.xml.ws + jaxws-rt + 2.1.3 + + + commons-cli + commons-cli + 1.2 + + + org.jdom + jdom + 1.1 + + + commons-configuration + commons-configuration + 1.6 + + + org.beanshell + bsh + ${beanshell.version} + + + net.sf.jung + jung-graph-impl + ${jung.version} + + + net.sf.jung + jung-algorithms + ${jung.version} + + + net.sf.jung + jung-visualization + ${jung.version} + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + + + + org.apache.maven.plugins + maven-source-plugin + 2.1.2 + + + attach-sources + + jar + + + true + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + + attach-javadocs + + jar + + + true + + + + + + org.codehaus.mojo + license-maven-plugin + 1.0-beta-3 + + mit + + + + update-license + prepare-package + + update-file-header + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.0 + + + + org.codehaus.mojo + findbugs-maven-plugin + 2.3 + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + + org.codehaus.mojo + cobertura-maven-plugin + 2.5.1 + + + + + + generate-reports + install + + site + + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 2.2.1 + + + org.codehaus.mojo + jaxws-maven-plugin + 1.10 + + + + + + \ No newline at end of file diff --git a/graphwalker-standalone/pom.xml b/graphwalker-standalone/pom.xml new file mode 100644 index 00000000..8b01a310 --- /dev/null +++ b/graphwalker-standalone/pom.xml @@ -0,0 +1,52 @@ + + + + org.graphwalker + graphwalker-parent + ../graphwalker-parent/pom.xml + 2.5.14-SNAPSHOT + + + 4.0.0 + graphwalker-standalone + ${parent.version} + GraphWalker Standalone + pom + + + + org.graphwalker + graphwalker-core + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + false + + src/assemble/standalone.xml + + + + org.graphwalker.CLI + + + + + + + + + \ No newline at end of file diff --git a/graphwalker-standalone/src/assemble/standalone.xml b/graphwalker-standalone/src/assemble/standalone.xml new file mode 100644 index 00000000..68532e8f --- /dev/null +++ b/graphwalker-standalone/src/assemble/standalone.xml @@ -0,0 +1,59 @@ + + + + standalone + + jar + + false + + + / + true + true + runtime + + org.jdom:jdom + commons-logging:commons-logging + net.sourceforge.collections:collections-generic + commons-lang:commons-lang + commons-collections:commons-collections + commons-cli:commons-cli + commons-configuration:commons-configuration + org.beanshell:bsh + net.sf.jung:jung-graph-impl + net.sf.jung:jung-algorithms + net.sf.jung:jung-visualization + net.sf.jung:jung-api + log4j:log4j:* + + + + + diff --git a/pom.xml b/pom.xml deleted file mode 100644 index a87a39d6..00000000 --- a/pom.xml +++ /dev/null @@ -1,173 +0,0 @@ - - 4.0.0 - org.graphwalker - graphwalker - jar - 2.5.14-SNAPSHOT - graphwalker - GraphWalker is a tool for generating offline and online test sequences from Finite State Machines and Extended Finite State Machines. - http://graphwalker.org - - - MIT License - http://www.opensource.org/licenses/mit-license.php - repo - - - - http://mbt.tigris.org/svn/mbt/trunk/graphwalker - scm:svn:http://mbt.tigris.org/svn/mbt/trunk/graphwalker - scm:svn:http://mbt.tigris.org/svn/mbt/trunk/graphwalker - - - - krikar - Kristian Karl - kristian.hermann.karl@gmail.com - - - johtej - Johan Tejle - johan.tejle@systemverification.com - - - - - Stefan Vahlgren - - - Peter Johansson - - - Ola Sundin - - - Johan Brorson - - - Harald Hartwig - - - Fredrik Gustafsson - - - - - UTF-8 - - - - org.sonatype.oss - oss-parent - 5 - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - - - - maven-assembly-plugin - - - src/assemble/standalone.xml - - - src/main/resources/META-INF/MANIFEST.MF - - - - - org.codehaus.mojo - jaxws-maven-plugin - - - wsgen - - wsgen - - - org.graphwalker.SoapServices - - - - - - - - - - org.apache.maven.plugins - maven-surefire-report-plugin - 2.6 - - true - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - - - - - junit - junit - 4.8.2 - test - - - com.sun.xml.ws - jaxws-rt - 2.1.3 - - - commons-cli - commons-cli - 1.2 - - - log4j - log4j - 1.2.16 - - - org.jdom - jdom - 1.1 - - - commons-configuration - commons-configuration - 1.6 - - - net.sf.jung - jung-graph-impl - 2.0.1 - - - org.beanshell - bsh - 2.0b4 - - - net.sf.jung - jung-algorithms - 2.0.1 - - - net.sf.jung - jung-visualization - 2.0.1 - - - diff --git a/src/assemble/standalone.xml b/src/assemble/standalone.xml deleted file mode 100644 index fbb132f3..00000000 --- a/src/assemble/standalone.xml +++ /dev/null @@ -1,36 +0,0 @@ - - standalone - - jar - - false - - - - - true - runtime - - org.jdom:jdom - commons-logging:commons-logging - net.sourceforge.collections:collections-generic - commons-lang:commons-lang - commons-collections:commons-collections - commons-cli:commons-cli - commons-configuration:commons-configuration - org.beanshell:bsh - net.sf.jung:jung-graph-impl - net.sf.jung:jung-algorithms - net.sf.jung:jung-visualization - net.sf.jung:jung-api - log4j:log4j:* - - - - - - target/classes - - - - diff --git a/src/main/java/org/graphwalker/ClassPathHack.java b/src/main/java/org/graphwalker/ClassPathHack.java deleted file mode 100644 index d019febb..00000000 --- a/src/main/java/org/graphwalker/ClassPathHack.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.graphwalker; - -import java.io.File; -import java.io.IOException; -import java.lang.reflect.Method; -import java.net.URL; -import java.net.URLClassLoader; - -public class ClassPathHack { - private static final Class[] parameters = new Class[] { URL.class }; - - @SuppressWarnings("deprecation") - public static void addFile(File f) throws IOException { - // f.toURL is deprecated - addURL(f.toURL()); - } - - protected static void addURL(URL u) throws IOException { - URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader(); - Class sysclass = URLClassLoader.class; - - try { - Method method = sysclass.getDeclaredMethod("addURL", parameters); - method.setAccessible(true); - method.invoke(sysloader, u); - } catch (Exception e) { - Util.logStackTraceToError(e); - throw new IOException("Error, could not add URL to system classloader"); - } - - } -} diff --git a/src/main/java/org/graphwalker/multipleModels/ModelAPI.java b/src/main/java/org/graphwalker/multipleModels/ModelAPI.java deleted file mode 100644 index ab89d6ea..00000000 --- a/src/main/java/org/graphwalker/multipleModels/ModelAPI.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.graphwalker.multipleModels; - -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.generators.PathGenerator; - -/** - * @author krikar Any test should extend this class. - */ -public class ModelAPI { - private ModelBasedTesting mbt = null; - - public ModelAPI(String model, boolean efsm, PathGenerator generator, boolean weight) { - mbt = new ModelBasedTesting(); - mbt.readGraph(model); - mbt.enableExtended(efsm); - mbt.setGenerator(generator); - mbt.setWeighted(weight); - } - - public void setMbt(ModelBasedTesting mbt) { - this.mbt = mbt; - } - - public ModelBasedTesting getMbt() { - return mbt; - } -} \ No newline at end of file diff --git a/src/main/resources/META-INF/MANIFEST.MF b/src/main/resources/META-INF/MANIFEST.MF deleted file mode 100644 index 202105b3..00000000 --- a/src/main/resources/META-INF/MANIFEST.MF +++ /dev/null @@ -1 +0,0 @@ -Main-Class: org.graphwalker.CLI diff --git a/src/main/resources/org/graphwalker/resources/graphwalker.properties b/src/main/resources/org/graphwalker/resources/graphwalker.properties deleted file mode 100644 index 45386501..00000000 --- a/src/main/resources/org/graphwalker/resources/graphwalker.properties +++ /dev/null @@ -1,27 +0,0 @@ -# Set root logger level to DEBUG and its only appender to A1. -log4j.rootLogger=ALL, CONSOLE, LOG - -# stdout is set to be a ConsoleAppender. -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender - -# A1 uses PatternLayout. -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=%d [%t] %-5p %c - %m%n - -log4j.appender.LOG.layout=org.apache.log4j.PatternLayout -log4j.appender.LOG.layout.ConversionPattern=%d [%t] %-5p - %m%n - -log4j.appender.LOG=org.apache.log4j.RollingFileAppender -log4j.appender.LOG.File=logs/graphwalker.log -log4j.appender.LOG.MaxFileSize=20MB -log4j.appender.LOG.MaxBackupIndex=5 - -# Differentiate the log levels -log4j.appender.CONSOLE.threshold=ERROR -log4j.appender.LOG.threshold=INFO - -# The port on which the web services run -graphwalker.ws.port=9090 - -# Should the SOAP service be started when the GUI app starts -org.graphwalker.GUI.startSOAP=false \ No newline at end of file diff --git a/src/main/resources/org/graphwalker/resources/version.properties b/src/main/resources/org/graphwalker/resources/version.properties deleted file mode 100644 index 25889ed4..00000000 --- a/src/main/resources/org/graphwalker/resources/version.properties +++ /dev/null @@ -1,4 +0,0 @@ -version.major=2 -version.minor=5 -version.fix=14 -version.svn.rev=911 \ No newline at end of file diff --git a/src/test/java/org/graphwalker/SoapServiceTest.java b/src/test/java/org/graphwalker/SoapServiceTest.java deleted file mode 100644 index 1312cd88..00000000 --- a/src/test/java/org/graphwalker/SoapServiceTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.graphwalker; - -import org.junit.Test; - -public class SoapServiceTest { - - @Test(expected = RuntimeException.class) - public void testGetDataValue() { - SoapServices ss = new SoapServices(new ModelBasedTesting()); - ss.GetDataValue(null); - } - -} diff --git a/src/test/java/org/graphwalker/mbt_init.xml b/src/test/java/org/graphwalker/mbt_init.xml deleted file mode 100755 index b9b6cc72..00000000 --- a/src/test/java/org/graphwalker/mbt_init.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/java/org/graphwalker/multiple/Model_A1_API.java b/src/test/java/org/graphwalker/multiple/Model_A1_API.java deleted file mode 100644 index 922d1aa5..00000000 --- a/src/test/java/org/graphwalker/multiple/Model_A1_API.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.graphwalker.multiple; - -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.multipleModels.ModelAPI; - -/** - * Hello world! - * - */ -public class Model_A1_API extends ModelAPI { - - public Model_A1_API(String model, boolean efsm, PathGenerator generator) { - super(model, efsm, generator, false); - } - - public void e_Init() { - } - - public void e_StartClient() { - } - - public void e_ValidPremiumCredentials() { - } - - public void v_ClientNotRunning() { - } - - public void v_LoginPrompted() { - } - - public void v_WhatsNew() { - } -} diff --git a/src/test/java/org/graphwalker/multiple/Model_A_API.java b/src/test/java/org/graphwalker/multiple/Model_A_API.java deleted file mode 100644 index bfa99fae..00000000 --- a/src/test/java/org/graphwalker/multiple/Model_A_API.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.graphwalker.multiple; - -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.multipleModels.ModelAPI; - -/** - * Hello world! - * - */ -public class Model_A_API extends ModelAPI { - - public Model_A_API(String model, boolean efsm, PathGenerator generator) { - super(model, efsm, generator, false); - } - - public void e_ExitClient() { - } - - public void e_Init() { - } - - public void e_LogOut() { - } - - public void e_Start() { - } - - public void e_ToggleRememberMe() { - } - - public void e_ValidLogin() { - } - - public void v_ClientNotRunning() { - } - - public void v_ClientRunning() { - } - - public void v_Login() { - } - - public void v_WhatsNew() { - } -} diff --git a/src/test/java/org/graphwalker/multiple/Model_B1_API.java b/src/test/java/org/graphwalker/multiple/Model_B1_API.java deleted file mode 100644 index fb40aa85..00000000 --- a/src/test/java/org/graphwalker/multiple/Model_B1_API.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.graphwalker.multiple; - -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.multipleModels.ModelAPI; - -/** - * Hello world! - * - */ -public class Model_B1_API extends ModelAPI { - - public Model_B1_API(String model, boolean efsm, PathGenerator generator) { - super(model, efsm, generator, false); - } - - public void e_Init() { - } - - public void e_Logout() { - } - - public void e_Close() { - } - - public void e_ExitClient() { - } - - public void v_ClientNotRunning() { - } - - public void v_LoginPrompted() { - } - - public void v_WhatsNew() { - } -} diff --git a/src/test/java/org/graphwalker/multiple/Model_B_API.java b/src/test/java/org/graphwalker/multiple/Model_B_API.java deleted file mode 100644 index 287d528b..00000000 --- a/src/test/java/org/graphwalker/multiple/Model_B_API.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.graphwalker.multiple; - -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.multipleModels.ModelAPI; - -/** - * Hello world! - * - */ -public class Model_B_API extends ModelAPI { - - public Model_B_API(String model, boolean efsm, PathGenerator generator) { - super(model, efsm, generator, false); - } - - public void e_CreatePlaylist() { - } - - public void e_DeletePlaylist() { - } - - public void e_Init() { - } - - public void v_PaylistCreated() { - } - - public void v_WhatsNew() { - } -} diff --git a/src/test/java/org/graphwalker/multiple/Model_C_API.java b/src/test/java/org/graphwalker/multiple/Model_C_API.java deleted file mode 100644 index 7327dc96..00000000 --- a/src/test/java/org/graphwalker/multiple/Model_C_API.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.graphwalker.multiple; - -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.multipleModels.ModelAPI; - -/** - * Hello world! - * - */ -public class Model_C_API extends ModelAPI { - - public Model_C_API(String model, boolean efsm, PathGenerator generator) { - super(model, efsm, generator, false); - } - - public void e_GotoWhatsNew() { - } - - public void e_ViewPlaylist() { - } - - public void e_Init() { - } - - public void v_PaylistCreated() { - } - - public void v_WhatsNew() { - } -} diff --git a/src/test/resources/xml/ReachedVertex.xml b/src/test/resources/xml/ReachedVertex.xml deleted file mode 100644 index 0a3d64e2..00000000 --- a/src/test/resources/xml/ReachedVertex.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/bugs/Issue_10.xml b/src/test/resources/xml/bugs/Issue_10.xml deleted file mode 100644 index e30cd8b8..00000000 --- a/src/test/resources/xml/bugs/Issue_10.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/bugs/Issue_9.xml b/src/test/resources/xml/bugs/Issue_9.xml deleted file mode 100644 index 1475b1e2..00000000 --- a/src/test/resources/xml/bugs/Issue_9.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/javaExecutor.xml b/src/test/resources/xml/javaExecutor.xml deleted file mode 100644 index 03d67134..00000000 --- a/src/test/resources/xml/javaExecutor.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/mbt_setup.dtd b/src/test/resources/xml/mbt_setup.dtd deleted file mode 100644 index a19ef6d4..00000000 --- a/src/test/resources/xml/mbt_setup.dtd +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/test/resources/xml/multipleA.xml b/src/test/resources/xml/multipleA.xml deleted file mode 100644 index 9b589641..00000000 --- a/src/test/resources/xml/multipleA.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/multipleB.xml b/src/test/resources/xml/multipleB.xml deleted file mode 100644 index 474169d4..00000000 --- a/src/test/resources/xml/multipleB.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml b/src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml deleted file mode 100644 index c392dbc6..00000000 --- a/src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml b/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml deleted file mode 100644 index e8868975..00000000 --- a/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml b/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml deleted file mode 100644 index ab157f74..00000000 --- a/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml b/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml deleted file mode 100644 index 33ba35dc..00000000 --- a/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml b/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml deleted file mode 100644 index 242ac72b..00000000 --- a/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml b/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml deleted file mode 100644 index 339d79c9..00000000 --- a/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/reqCoverage.xml b/src/test/resources/xml/reqCoverage.xml deleted file mode 100644 index 0f1e35b3..00000000 --- a/src/test/resources/xml/reqCoverage.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/test/resources/xml/reqtags/mbt_init.xml b/src/test/resources/xml/reqtags/mbt_init.xml deleted file mode 100644 index d1655a70..00000000 --- a/src/test/resources/xml/reqtags/mbt_init.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/reqtags/mbt_init10.xml b/src/test/resources/xml/reqtags/mbt_init10.xml deleted file mode 100644 index 2d3a1b2e..00000000 --- a/src/test/resources/xml/reqtags/mbt_init10.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/test/resources/xml/reqtags/mbt_init11.xml b/src/test/resources/xml/reqtags/mbt_init11.xml deleted file mode 100644 index b728718b..00000000 --- a/src/test/resources/xml/reqtags/mbt_init11.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/reqtags/mbt_init2.xml b/src/test/resources/xml/reqtags/mbt_init2.xml deleted file mode 100644 index 18716514..00000000 --- a/src/test/resources/xml/reqtags/mbt_init2.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/test/resources/xml/reqtags/mbt_init3.xml b/src/test/resources/xml/reqtags/mbt_init3.xml deleted file mode 100644 index 1bc55aba..00000000 --- a/src/test/resources/xml/reqtags/mbt_init3.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/test/resources/xml/reqtags/mbt_init4.xml b/src/test/resources/xml/reqtags/mbt_init4.xml deleted file mode 100644 index e6192683..00000000 --- a/src/test/resources/xml/reqtags/mbt_init4.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/reqtags/mbt_init5.xml b/src/test/resources/xml/reqtags/mbt_init5.xml deleted file mode 100644 index 1c7fed3f..00000000 --- a/src/test/resources/xml/reqtags/mbt_init5.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/reqtags/mbt_init6.xml b/src/test/resources/xml/reqtags/mbt_init6.xml deleted file mode 100644 index 9f8db291..00000000 --- a/src/test/resources/xml/reqtags/mbt_init6.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/test/resources/xml/reqtags/mbt_init7.xml b/src/test/resources/xml/reqtags/mbt_init7.xml deleted file mode 100644 index 9f8db291..00000000 --- a/src/test/resources/xml/reqtags/mbt_init7.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/test/resources/xml/reqtags/mbt_init8.xml b/src/test/resources/xml/reqtags/mbt_init8.xml deleted file mode 100644 index e2bac122..00000000 --- a/src/test/resources/xml/reqtags/mbt_init8.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/test/resources/xml/reqtags/mbt_init9.xml b/src/test/resources/xml/reqtags/mbt_init9.xml deleted file mode 100644 index 85be307d..00000000 --- a/src/test/resources/xml/reqtags/mbt_init9.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/test/resources/xml/switch/A.xml b/src/test/resources/xml/switch/A.xml deleted file mode 100644 index e323033b..00000000 --- a/src/test/resources/xml/switch/A.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/switch/B.xml b/src/test/resources/xml/switch/B.xml deleted file mode 100644 index 3b0481bf..00000000 --- a/src/test/resources/xml/switch/B.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/resources/xml/switch/C.xml b/src/test/resources/xml/switch/C.xml deleted file mode 100644 index e2b42960..00000000 --- a/src/test/resources/xml/switch/C.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - From b083355023b7d84f55eef7000d594f441ea7f535 Mon Sep 17 00:00:00 2001 From: Nils Olsson Date: Sat, 15 Oct 2011 21:21:51 +0200 Subject: [PATCH 002/371] Changed project version --- graphwalker-core/pom.xml | 2 +- graphwalker-standalone/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/graphwalker-core/pom.xml b/graphwalker-core/pom.xml index 97db232d..20c97e08 100644 --- a/graphwalker-core/pom.xml +++ b/graphwalker-core/pom.xml @@ -11,7 +11,7 @@ 4.0.0 graphwalker-core - ${parent.version} + 2.5.14-SNAPSHOT GraphWalker Core diff --git a/graphwalker-standalone/pom.xml b/graphwalker-standalone/pom.xml index 8b01a310..dc44402d 100644 --- a/graphwalker-standalone/pom.xml +++ b/graphwalker-standalone/pom.xml @@ -11,7 +11,7 @@ 4.0.0 graphwalker-standalone - ${parent.version} + 2.5.14-SNAPSHOT GraphWalker Standalone pom From 3997c8820a5604ec496a17abe915e4e071b1e9e4 Mon Sep 17 00:00:00 2001 From: Nils Olsson Date: Wed, 19 Oct 2011 21:53:51 +0200 Subject: [PATCH 003/371] Added more modules --- .gitignore | 8 +++ graphwalker-cli/pom.xml | 32 ++++++++++++ .../src/main/java/org/graphwalker/CLI.java | 2 +- .../test/java/org/graphwalker/CLITest.java | 3 -- .../java/org/graphwalker/bugs/Issue_10.java | 0 .../java/org/graphwalker/bugs/Issue_9.java | 0 graphwalker-core/pom.xml | 24 --------- .../java/org/graphwalker/Application.java | 34 +++++++++++++ .../org/graphwalker/ModelBasedTesting.java | 46 +++++++++-------- .../org/graphwalker/{GUI => }/Status.java | 7 ++- .../src/main/java/org/graphwalker/Util.java | 6 +-- .../resources => }/graphwalker.properties | 0 .../graphwalker/GUI/resources/icons/back.png | Bin 921 -> 0 bytes .../graphwalker/GUI/resources/icons/exit.png | Bin 639 -> 0 bytes .../graphwalker/GUI/resources/icons/first.png | Bin 932 -> 0 bytes .../graphwalker/GUI/resources/icons/new.png | Bin 3235 -> 0 bytes .../graphwalker/GUI/resources/icons/next.png | Bin 940 -> 0 bytes .../graphwalker/GUI/resources/icons/open.png | Bin 3324 -> 0 bytes .../graphwalker/GUI/resources/icons/pause.png | Bin 920 -> 0 bytes .../GUI/resources/icons/reload.png | Bin 947 -> 0 bytes .../graphwalker/GUI/resources/icons/run.png | Bin 923 -> 0 bytes .../graphwalker/GUI/resources/icons/save.png | Bin 3267 -> 0 bytes .../resources => }/version.properties | 0 graphwalker-gui/pom.xml | 28 ++++++++++ .../main/java/org/graphwalker/gui}/App.java | 14 +++-- .../java/org/graphwalker/gui}/StatusBar.java | 2 +- .../src/main}/resources/icons/back.png | Bin .../src/main}/resources/icons/exit.png | Bin .../src/main}/resources/icons/first.png | Bin .../src/main}/resources/icons/new.png | Bin .../src/main}/resources/icons/next.png | Bin .../src/main}/resources/icons/open.png | Bin .../src/main}/resources/icons/pause.png | Bin .../src/main}/resources/icons/reload.png | Bin .../src/main}/resources/icons/run.png | Bin .../src/main}/resources/icons/save.png | Bin graphwalker-parent/pom.xml | 23 +++++++-- graphwalker-standalone/pom.xml | 12 +++++ graphwalker-webservice/pom.xml | 48 ++++++++++++++++++ .../java/org/graphwalker/SoapServices.java | 29 +++++------ .../java/org/graphwalker/SoapServiceTest.java | 0 41 files changed, 235 insertions(+), 83 deletions(-) create mode 100644 graphwalker-cli/pom.xml rename {graphwalker-core => graphwalker-cli}/src/main/java/org/graphwalker/CLI.java (99%) rename {graphwalker-core => graphwalker-cli}/src/test/java/org/graphwalker/CLITest.java (99%) rename {graphwalker-core => graphwalker-cli}/src/test/java/org/graphwalker/bugs/Issue_10.java (100%) rename {graphwalker-core => graphwalker-cli}/src/test/java/org/graphwalker/bugs/Issue_9.java (100%) create mode 100644 graphwalker-core/src/main/java/org/graphwalker/Application.java rename graphwalker-core/src/main/java/org/graphwalker/{GUI => }/Status.java (97%) rename graphwalker-core/src/main/resources/{org/graphwalker/resources => }/graphwalker.properties (100%) delete mode 100644 graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/back.png delete mode 100644 graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/exit.png delete mode 100644 graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/first.png delete mode 100644 graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/new.png delete mode 100644 graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/next.png delete mode 100644 graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/open.png delete mode 100644 graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/pause.png delete mode 100644 graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/reload.png delete mode 100644 graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/run.png delete mode 100644 graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/save.png rename graphwalker-core/src/main/resources/{org/graphwalker/resources => }/version.properties (100%) create mode 100644 graphwalker-gui/pom.xml rename {graphwalker-core/src/main/java/org/graphwalker/GUI => graphwalker-gui/src/main/java/org/graphwalker/gui}/App.java (99%) rename {graphwalker-core/src/main/java/org/graphwalker/GUI => graphwalker-gui/src/main/java/org/graphwalker/gui}/StatusBar.java (98%) rename {graphwalker-core/src/main/java/org/graphwalker/GUI => graphwalker-gui/src/main}/resources/icons/back.png (100%) rename {graphwalker-core/src/main/java/org/graphwalker/GUI => graphwalker-gui/src/main}/resources/icons/exit.png (100%) rename {graphwalker-core/src/main/java/org/graphwalker/GUI => graphwalker-gui/src/main}/resources/icons/first.png (100%) rename {graphwalker-core/src/main/java/org/graphwalker/GUI => graphwalker-gui/src/main}/resources/icons/new.png (100%) rename {graphwalker-core/src/main/java/org/graphwalker/GUI => graphwalker-gui/src/main}/resources/icons/next.png (100%) rename {graphwalker-core/src/main/java/org/graphwalker/GUI => graphwalker-gui/src/main}/resources/icons/open.png (100%) rename {graphwalker-core/src/main/java/org/graphwalker/GUI => graphwalker-gui/src/main}/resources/icons/pause.png (100%) rename {graphwalker-core/src/main/java/org/graphwalker/GUI => graphwalker-gui/src/main}/resources/icons/reload.png (100%) rename {graphwalker-core/src/main/java/org/graphwalker/GUI => graphwalker-gui/src/main}/resources/icons/run.png (100%) rename {graphwalker-core/src/main/java/org/graphwalker/GUI => graphwalker-gui/src/main}/resources/icons/save.png (100%) create mode 100644 graphwalker-webservice/pom.xml rename {graphwalker-core => graphwalker-webservice}/src/main/java/org/graphwalker/SoapServices.java (94%) rename {graphwalker-core => graphwalker-webservice}/src/test/java/org/graphwalker/SoapServiceTest.java (100%) diff --git a/.gitignore b/.gitignore index 95f17e4a..db617e0a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,14 @@ .project .settings/ +# Intellij stuff # +################## +*.iml +*.ipr +*.iws +.idea/ + + # Build and unit tests stuff # ############################# logs/ diff --git a/graphwalker-cli/pom.xml b/graphwalker-cli/pom.xml new file mode 100644 index 00000000..163b7a4e --- /dev/null +++ b/graphwalker-cli/pom.xml @@ -0,0 +1,32 @@ + + + + org.graphwalker + graphwalker-parent + ../graphwalker-parent/pom.xml + 2.5.14-SNAPSHOT + + + 4.0.0 + graphwalker-cli + 2.5.14-SNAPSHOT + GraphWalker CLI + + + + org.graphwalker + graphwalker-core + + + org.graphwalker + graphwalker-gui + + + org.graphwalker + graphwalker-webservice + + + + diff --git a/graphwalker-core/src/main/java/org/graphwalker/CLI.java b/graphwalker-cli/src/main/java/org/graphwalker/CLI.java similarity index 99% rename from graphwalker-core/src/main/java/org/graphwalker/CLI.java rename to graphwalker-cli/src/main/java/org/graphwalker/CLI.java index 348bbd99..992679ba 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/CLI.java +++ b/graphwalker-cli/src/main/java/org/graphwalker/CLI.java @@ -72,7 +72,7 @@ import org.apache.commons.cli.PosixParser; import org.apache.commons.cli.UnrecognizedOptionException; import org.apache.log4j.Logger; -import org.graphwalker.GUI.App; +import org.graphwalker.gui.App; import org.graphwalker.Keywords.Generator; import org.graphwalker.Keywords.StopCondition; import org.graphwalker.conditions.AlternativeCondition; diff --git a/graphwalker-core/src/test/java/org/graphwalker/CLITest.java b/graphwalker-cli/src/test/java/org/graphwalker/CLITest.java similarity index 99% rename from graphwalker-core/src/test/java/org/graphwalker/CLITest.java rename to graphwalker-cli/src/test/java/org/graphwalker/CLITest.java index ce25047a..d9ca2c73 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/CLITest.java +++ b/graphwalker-cli/src/test/java/org/graphwalker/CLITest.java @@ -57,9 +57,6 @@ import java.util.regex.Pattern; import org.apache.log4j.Logger; -import org.graphwalker.CLI; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.Util; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/bugs/Issue_10.java b/graphwalker-cli/src/test/java/org/graphwalker/bugs/Issue_10.java similarity index 100% rename from graphwalker-core/src/test/java/org/graphwalker/bugs/Issue_10.java rename to graphwalker-cli/src/test/java/org/graphwalker/bugs/Issue_10.java diff --git a/graphwalker-core/src/test/java/org/graphwalker/bugs/Issue_9.java b/graphwalker-cli/src/test/java/org/graphwalker/bugs/Issue_9.java similarity index 100% rename from graphwalker-core/src/test/java/org/graphwalker/bugs/Issue_9.java rename to graphwalker-cli/src/test/java/org/graphwalker/bugs/Issue_9.java diff --git a/graphwalker-core/pom.xml b/graphwalker-core/pom.xml index 20c97e08..ac5ea4f7 100644 --- a/graphwalker-core/pom.xml +++ b/graphwalker-core/pom.xml @@ -20,10 +20,6 @@ junit test - - com.sun.xml.ws - jaxws-rt - commons-cli commons-cli @@ -58,24 +54,4 @@ - - - - org.codehaus.mojo - jaxws-maven-plugin - - - wsgen - - wsgen - - - org.graphwalker.SoapServices - - - - - - - \ No newline at end of file diff --git a/graphwalker-core/src/main/java/org/graphwalker/Application.java b/graphwalker-core/src/main/java/org/graphwalker/Application.java new file mode 100644 index 00000000..e1a39115 --- /dev/null +++ b/graphwalker-core/src/main/java/org/graphwalker/Application.java @@ -0,0 +1,34 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker; + +public interface Application { + Status getStatus(); + void setButtons(); + void updateLayout(); + void pause(); + void executingJavaTest(boolean flag); +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/ModelBasedTesting.java b/graphwalker-core/src/main/java/org/graphwalker/ModelBasedTesting.java index 1a9aab6a..c341b4eb 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/ModelBasedTesting.java +++ b/graphwalker-core/src/main/java/org/graphwalker/ModelBasedTesting.java @@ -61,8 +61,6 @@ import java.util.regex.Pattern; import org.apache.log4j.Logger; -import org.graphwalker.GUI.App; -import org.graphwalker.GUI.Status; import org.graphwalker.conditions.TimeDuration; import org.graphwalker.events.MbtEvent; import org.graphwalker.exceptions.FoundNoEdgeException; @@ -105,6 +103,7 @@ public class ModelBasedTesting { private boolean useJsScriptEngine = false; private boolean useGUI = false; private MbtEvent notifyApp = null; + private Application application; private String javaExecutorClass = null; private volatile Thread stopFlag = null; private volatile boolean finishedFlag = false; @@ -186,11 +185,16 @@ public boolean isUseGUI() { return useGUI; } - public void setUseGUI() { + public void setUseGUI(Application application) { useGUI = true; - notifyApp = App.getInstance(); + notifyApp = (MbtEvent)application; + this.application = application; } + public Application getGui() { + return application; + } + public boolean isDryRun() { return dryRun; } @@ -437,12 +441,12 @@ public String[] getNextStep() throws InterruptedException { if (isUseGUI()) { while (true) { - if (App.getInstance().getStatus().isStopped()) + if (application.getStatus().isStopped()) throw new GuiStoppedExecution(); - if (App.getInstance().getStatus().isNext() || App.getInstance().getStatus().isRunning() - || App.getInstance().getStatus().isExecutingJavaTest() || App.getInstance().getStatus().isExecutingSoapTest() - && !App.getInstance().getStatus().isPaused()) { + if (application.getStatus().isNext() || application.getStatus().isRunning() + || application.getStatus().isExecutingJavaTest() || application.getStatus().isExecutingSoapTest() + && !application.getStatus().isPaused()) { break; } Thread.sleep(500); @@ -494,13 +498,13 @@ public String[] getNextStep() throws InterruptedException { notifyApp.getNextEvent(); } if (isUseGUI()) { - if (App.getInstance().getStatus().isStopped()) { + if (application.getStatus().isStopped()) { throw new GuiStoppedExecution(); } - if (App.getInstance().getStatus().isNext()) { - App.getInstance().getStatus().unsetState(Status.next); - App.getInstance().setButtons(); + if (application.getStatus().isNext()) { + application.getStatus().unsetState(Status.next); + application.setButtons(); } } } @@ -530,8 +534,8 @@ public void readGraph(String graphmlFileName) { getMachine().setModel(getGraph()); } - if (isUseGUI() && App.getInstance() != null) { - App.getInstance().updateLayout(); + if (isUseGUI() && application != null) { + application.updateLayout(); } } @@ -551,7 +555,7 @@ public String getVersionString() { Properties properties = new Properties(); InputStream inputStream = null; try { - inputStream = getClass().getResourceAsStream("/org/graphwalker/resources/version.properties"); + inputStream = getClass().getResourceAsStream("/version.properties"); properties.load(inputStream); inputStream.close(); } catch (IOException e) { @@ -743,8 +747,8 @@ public void executePath(Object objInstance) throws InterruptedException { throw new RuntimeException("Needed execution instance is missing as parameter."); } if (isUseGUI()) { - App.getInstance().pause(); - App.getInstance().updateLayout(); + application.pause(); + application.updateLayout(); } executePath(null, objInstance); } @@ -970,7 +974,7 @@ private void executeMethod(Class clsClass, Object objInstance, String strMeth } try { if (isUseGUI()) { - App.getInstance().executingJavaTest(true); + application.executingJavaTest(true); } Method m = clsClass.getMethod(strMethod, null); m.invoke(objInstance, null); @@ -992,7 +996,7 @@ private void executeMethod(Class clsClass, Object objInstance, String strMeth throw new RuntimeException("NoSuchMethodException.", e); } finally { if (isUseGUI()) { - App.getInstance().executingJavaTest(false); + application.executingJavaTest(false); } } } @@ -1044,14 +1048,14 @@ protected void writePath(PrintStream out) throws InterruptedException { while (hasNextStep()) { String[] stepPair = getNextStep(); - if (stepPair[0].trim() != "") { + if (!"".equals(stepPair[0].trim())) { out.println(stepPair[0]); logExecution(getMachine().getLastEdge(), ""); if (isUseStatisticsManager()) { getStatisticsManager().addProgress(getMachine().getLastEdge()); } } - if (stepPair[1].trim() != "") { + if (!"".equals(stepPair[1].trim())) { out.println(stepPair[1]); logExecution(getMachine().getCurrentVertex(), ""); if (isUseStatisticsManager()) { diff --git a/graphwalker-core/src/main/java/org/graphwalker/GUI/Status.java b/graphwalker-core/src/main/java/org/graphwalker/Status.java similarity index 97% rename from graphwalker-core/src/main/java/org/graphwalker/GUI/Status.java rename to graphwalker-core/src/main/java/org/graphwalker/Status.java index e903d451..3168bdd7 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/GUI/Status.java +++ b/graphwalker-core/src/main/java/org/graphwalker/Status.java @@ -46,10 +46,9 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.GUI; +package org.graphwalker; import org.apache.log4j.Logger; -import org.graphwalker.Util; public class Status { static private Logger log = Util.setupLogger(Status.class); @@ -115,12 +114,12 @@ public void unsetState(int state) { log.debug("State: " + toStr(this.state)); } - protected void setStopped() { + public void setStopped() { log.debug("Set the state to stopped"); state = stopped; } - protected void reset() { + public void reset() { log.debug("Reset the state to initial"); state = initial; } diff --git a/graphwalker-core/src/main/java/org/graphwalker/Util.java b/graphwalker-core/src/main/java/org/graphwalker/Util.java index 90559b9a..4cfd3115 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/Util.java +++ b/graphwalker-core/src/main/java/org/graphwalker/Util.java @@ -174,7 +174,7 @@ public static Logger setupLogger(@SuppressWarnings("rawtypes") final Class class if (new File("graphwalker.properties").canRead()) { PropertyConfigurator.configure("graphwalker.properties"); } else { - PropertyConfigurator.configure(classParam.getResource("/org/graphwalker/resources/graphwalker.properties")); + PropertyConfigurator.configure(classParam.getResource("/graphwalker.properties")); } return logger; } @@ -1029,7 +1029,7 @@ public static String readWSPort() { } else { conf = new PropertiesConfiguration(); try { - conf.load(Util.class.getResourceAsStream("/org/graphwalker/resources/graphwalker.properties")); + conf.load(Util.class.getResourceAsStream("/graphwalker.properties")); } catch (ConfigurationException e) { Util.logger.error(e.getMessage()); } @@ -1054,7 +1054,7 @@ public static Boolean readSoapGuiStartupState() { } else { conf = new PropertiesConfiguration(); try { - conf.load(Util.class.getResourceAsStream("/org/graphwalker/resources/graphwalker.properties")); + conf.load(Util.class.getResourceAsStream("/graphwalker.properties")); } catch (ConfigurationException e) { Util.logger.error(e.getMessage()); } diff --git a/graphwalker-core/src/main/resources/org/graphwalker/resources/graphwalker.properties b/graphwalker-core/src/main/resources/graphwalker.properties similarity index 100% rename from graphwalker-core/src/main/resources/org/graphwalker/resources/graphwalker.properties rename to graphwalker-core/src/main/resources/graphwalker.properties diff --git a/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/back.png b/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/back.png deleted file mode 100644 index f4be8c3591ada022ce52e568bc870ed410081699..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 921 zcmV;K17`e*P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2igJ& z4*(vC>hoOy00S9GL_t(I%RQ3KZWC7+hM)5@GafsR9p}%nlh*lxMv>a0iVdoSSo9tu zLB&0EU#WD#4yiX$A!Su@1x-`YI3h)XMFKtEQUm40Q`Q_}a^Hb)W1;zm9GQG0A{A=f9wE6V;OSF;{ z3k5vS10YEf`hy|XTE4ycHA^$)t>crE?}ZSl&a#Ypt@hyEFxhOrIHX>kC(H#XDUnig zl^JUpMG<=khv=JMZPscFZ(6PYeiY5!-Szrsjf3rHFM~>Xl6)?Q?|EoF2Kau!<>e*T zS~6fbjCkMc@!hR&%tg0zLrzau?w?(J49b&5Dy2y#CkhnuArlh?f*|14(JOv?@&s#B zt~%w(BL8+Tg7Q@Pz7E3t9cPBrtFr)jo`(>Ew{K6`d$!N(*GHdjS}FX%r(T^SO)c6F z?r5cSRVhiSI6-7$TJ1Cb+HKN(cY#oniQ*(SO^8fPWMTr}BOm7I^)Hc9R;7{>r4#^R z5a4Nr5a7n^7(W;g0(?&s<^lwultKuJ&NAEfv|ctQMk&c^<8!X9G&nx_hd+0l9K1Ni z^E~FKD@;$77z{_mHbW}~&b9SuINZ*M#arEr9)&O>L?>q${ zO)WOd7)B8@QzeqvY>U75_tzV%YX`@zZlJXy@IACrXr)j}68HiAexKB4AOt3kNm9$& z(t_!u!F};2tCj<_N;+QB-SX!86H0VEyqUcB} zrRa3J4>B{_YSiYjHe(P)W9#wQ{9qI@7>%$tqfwv7!)~3QpFa>nAjgJ9+G@4#nL+R2 z%HsTRu2M#Oip)7O=g?X)TPd@)R2`C-hwZb@Js<@Td(Gx}Bw8bcAeYN+luD($xiGvf vm8t>YT+5hfXK*=qY~uJ(2!TygoOApSdj59SBLBm#00000NkvXXu0mjftFWW- diff --git a/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/exit.png b/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/exit.png deleted file mode 100644 index e66d3a73b1e5c944248a75743fc9ac134b223791..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 639 zcmV-_0)YLAP)C}9OHDko;MAiF=o(}Nr2;gZ7hTwRdv~WyVhRa#lgaECZk(ylZ0Kv&p*HJzJEOL z^y*Dl_q_l9fscdNOT+Qbn}=I&>_^tX%wQt~Vg2~?^U8~xx86L|6jOfj`86X0LxjGM zv9$K3=QqFo{(k+{9dti%vT|sOspeV7mD;5$3CVr=`R&Y;%a(G6`PT8+ountF+3cFn zz`*e2(+gp4K{giFCm&z@`ukf~Tn$+RdMN$-|L@3ybJt$p_SSM@Vr2aG`}=ieIGL(ep$*H{`vp+&YK64yrQ!F z5^xQle}29A{Km&0pHVb?{PFq4=hs#W#uuMo-+XOI~PPsK~RQ`h3(>t8()8Y Z0|0ij-ih&11_l5C002ovPDHLkV1iVjNj3lg diff --git a/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/first.png b/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/first.png deleted file mode 100644 index bb949c3828285efee524fb128bd569da7b2cf524..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 932 zcmV;V16%xwP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2igJ& z3lciY6wiYI00SgRL_t(I%QcZpZyQwrg}?h4&y4eOT*q;o7$s@cN5rE--Bd_bL9hkE zf{3>2e_)S9Saes3KY=O*SO6Okt58vzih@EHQL08Fks2p)(k5=~@x3#ids(>b&e@!! zb3XCg>M8(IO1$?J<9M-LE?*DA@T&9F0ko3Myr11WIceWD)^2E}aL(bqNBkckK-KH@ zuT&I&zOl7ae74`h*c5;$EHG26^2WLOM7r$jgM-$W&ifn~1bFZC{M_6(t(Ru${@;($ zN-{DuL=Xf3WLd^(HzCh+-nsl1jY?@{duQjS5TdW0b4=Ik%g>W+Y3-j4rfZYLQHYWf zDJ1~TIV$CGde-uAeFJ^@&82#MYOC4Y`$DWecyM9*wb}L6KOcwX(kR6!VyIX|2=Lww z#(57?VvMEJO?c66^Zu2$?eSsjl0I{$eCy!&Wmp;=p*%K9p-|xI)>9@b6{^)LQV2Y- z`Q!;h#Uc}x37mKA9v+AF@zO0B#>H#i!*p$eC<+Mz&F}aB;NR^Xl-BI-?eW8pKk@B% z-_z-Ih~tRqS{3I!x)5H|O6i(XlChCtdd86SEaT-0S>EU8Uw&oh*)Gmt&-eb}XtrU2_uX{{8`Q~%<=lgixi7Pq*+E{43+UQved4MzaBlhFne}keY<%WYOM$ZJ;3;iKLYR| zq{P^io-t(ooQ1}eZS6NNNo(z9`^C|nnOXtGxr<>62nSoC;Oq$Y35_-mB(u~H` z1ikL*9b?RKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}0005LNklgfLLX;36C`ecgh-so=rT8cW5eZs|8iYWM5;mzM2Ej_$C`N2nk@+@&Zot?2Ydb!C0B z0k9(o`0`|~;^_od;@P&t$!j_RDFtB^GBf+s@rmAXoGskDcou+Dmu@=7h2x*8)qax1 zF#t+Q7MEV&t==GLnl_G6P0Vk526y*Avw-zI>+n=BI@4BDO5qt}mYc$cQ9;9m7BH}V z(5a$WEV$(h`QJ6x;q>@)>yaqg@e!pubphdhf}s=T>e1mL01BS!2+*moW|;jabocK}r* Vv2Uk5Rn`Ci002ovPDHLkV1ng84B!9& diff --git a/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/next.png b/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/next.png deleted file mode 100644 index af63405040f02996be3b3b32b714fe949e0d8e6b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 940 zcmV;d15^BoP)(_`g8%^e{{R4h=>PzAFaQARU;qF*m;eA5Z<1fd zMgRZ1RCwAXl1)!sRRD&cbI!eU@122}VPIewAW&^g#k3(cjUSCo|3#D5)Qx|j zdlPZdT@(L=X@a^?S0=h3X#JqZ&|tAa3Y5w~=|~xvnS0LtILF1Tp4Gc}pZ66HS62~2 zAf+VBbHX5)uU0EJmFHi}a@z!uf>vtG%JK2>{eB#82qCc60^k8S=Wy1lW@F+rEB!m` zo7=^I50B6$0U!(tuTM9|KbSv1d#9@7&s(k5r$7!M9pXTNyfKDqJWk4Gq_ z7%mm@eII}{O*!lJ$a2fo%a<50hfCW#J0A)mGtW6kvpKnVaMHc;``QLmlM_TifRqv` zB>>i1Mr$L)+VI<>4X(a@@kVp9xwYSFeIovT{P@C1eSGc5U;hkhl?p?pB4HSSwIBrG z5JKV{^!k1JT627I%JnOk%>Lf)f~<~IZ|}c+6;#W^)JI3?bx+ybdq%NTq*RQEqKMPe z4%<6VDGv`(tCXphhk5bpG#DMN-IiV<`JzWnNIzWMe$_74tFp2yDa zGk$*X3%>6Wh5=KJI?h256|Z|z%7#*s@=%E^&&jRD_X|8fIO6F0ADEqAU1p}ISYG*wlmFU`Rjb6tkYzc(=V5Jr=%tBSE)~P~+OInJo?>{o z%*P+y=E~&-lp5H-_|}_LD;3f-BhM{8ZK#h_i2G;D;-AgU3*(LE+Sc=f!1okU7!n2r zoV9}*4y2Sg1~Zy8Bg=B;nsu}LbZbFst)IlbvwJg>b##&vYeTo+M<)p;Nij)EFV=K> zgRn_brW<2)j@$Q)F;Aorf_A&T=#wwaO-+#HIsI4@n*?nVbTVL1Yx3MO*POtbccnu+%05;ECI*wO5oz8u&^@ekfEX#1t@&5qqlZAc3{_2eY O0000KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}0006PNkl6o#Ms-A|1+773OlE}|k-rnGg7 zK+%mQE+SN>Zd964P?XFff?Bvxq!y{vCeR8(A%ZZ>qNwNxi<+_+qn|;YF`Z(J@n^2z zcW;Y9DTW#AfdlX6ea?X+UDxIKnbvNgj=$--c>Yv9fN}742hd0|of5!toVv=goov~> z5rB_@PxRk=PzTflpcfjayK0i!*$sV-vdPyn1h6JIkICo^i`j7;ntUxTzy_5?wsj4F zmu-8=lp+&q7{Idg@iz8tuTd1ImG99 zJR$fsukkjW zr7%sAQsArI!Qsju02CH`0LWUg64!NK0Z6SB@(;l->m;e^SxQ9}mYWc0O{O#f=)H5F z>gwHiJX=|gP$)!KXGfdVN|Bji@@6=|t$~MB*X&_zY%FbgBoJV5aNrTpF16#3VG5oP z`B}SeJ&{Oc+3myc-=S=~|I5?9uvE4kl2YXPKLp6%R7@-uOIscdej_|SidOa$00St> zFRk!v$2Isz3UXHw{2pCB{`zjza9tO}Ft!1L|6uWrzXt%ARNf8;hZzL`0000(_`g8%^e{{R4h=>PzAFaQARU;qF*m;eA5Z<1fd zMgRZ<9!W$&RCwAflG|!jR{(~;wbnjNX3WfsJ-w` z=t~qK?;u6eb1WrdO~qOhV;y6Rqse6UUWdKc>P38j|KtDofAL^#4IueTc6dOVay!QY^03if|_i8lgf9qv@^U>4i_5XHu(Z&K$ zOOsDe40>NKpFVXn)5Uk=@%S5{0uT?@)(9a)OQ%kK|8noc)t~=(h*FCAMx8j00dUSS zoy{mK&!x{U&}-IKo^Nh`C4?-a5CWso@Yd@OhgW}J-(YdrXD+QF<&hSE_nw7Ln?f6Y zd$_@+&(B{S4M)#jjmKY$zaKw7)9&`x@BR8`+G(|@&(%oNgd~daApij(1kROcW68B< z^5K9hUtBP+wzn?ItexF>_4a+5HRtJMP1>z_wzgk#Z}lgPHCXHT;m2Rte6dYCYtm^o z$(r-Ld4G^DEOc(jC`qq)A6OjpNRos&j(9hD&*s)Pvsun8&)Iyj&AZ8jIF3lugvCLZ z5FnkaUy)MEfl`v@u?BIh(8ghnrgDa=swk_9${L)tXyb^Zh}Qful#(bF4I&{VN+|>| zm!=3T&KmOBAt3|^f&6fabCx8Is3k|sD5X$RA_-w9QVMMy-g}OBG9oFMP7i3z)o9Gs zm`)E+0=n%M-g}I(#8HIz)sA%5+;7xtaI8r2WOf5}FlbEuqj_OK_~b-CH?#fQ(_`g8%^e{{R4h=>PzAFaQARU;qF*m;eA5Z<1fd zMgRZ>R{((Fe;xK-n?aZXodbKuV1-z~)R;ECAf|>U_VffKYJ3N; zZPNC_JCi;@llI1t@&--ng)ud)91I3Qf_SPhpimAXv(IbwqWvD=6SFfj2qBPCk{1Pm zF=LfV`Lfd9#k{Z~fE2W|B)PY{yF1m1qGcfj)>;5GfO8IKtqL3UAFTAQFRnf>t#7?0 zPEr5@;}5kOwa>;o3&K{jGSiv^3IJtu5U7^P%Z4mnn4x7~`Xa04cFWPEiyjNrrWf zG|TvB{~Z&bo=Z0VetBM3`YP8pw)ae>w}-xRFG1jwBnc)6@O_^@?%(IZ%q-0?lHOz81jg`m?HTLq>vW=sG|OnUT8xj6v$?s+>gpO@fuY=U45cJW z>4p?SqLe}arNEG9DMCmZ^*T~W#zsD5cxZ^iTCy~yD+mBkN};4gVr7V5K?kx zcnHta%+1eJubu#4W_A|e^Efknnmo@*k`zyCtSz>5mL_+*OTqZg-T^|u$!3#FpHJ}H z?|1m==U;F@6h(aV#U)zJCPz`kQJhfiD-(4N?~13Zt0T2WxUlwm(|B4D7$4*NEU&Dv zwEP5sv!kPoj*gHdDRG*T=LM(2YVz{g+Ibzv@k(@bc zBI!)OdiCn65F(fSC*OMW_6k{YbNFPVQ|+&ywZb}wbq?(*YW)>Xx9Xkb=-_6%-M%7( z$N|LT#YKb=D6MhMVSInA`&jp7V}gqa5dzqvXva}>@8IBIDvsl2=Nx&S(_`g8%^e{{R4h=>PzAFaQARU;qF*m;eA5Z<1fd zMgRZlCM*bvQHwDpm9~}&MC?$8vF&s^^F8mqF0`KYS)C)Etgj=4KuSqs3>nXx zE0-s3DxF$PjBNu*K{pP=$A^c955~T~C4|6Q3xEc2&f%<8?PlYym8m2K0n>8-cB{R&-|c=bwx2z_SgF-F9{%{NSDlz3m&+glr4)rifhY>G){-QaD2^Ei z0f)yYEM2=4?*IAfvMg81xA)&2dF4`(>O_fhsfaNNU$3pPy|azyc@zqH^0_RfLjHf} z?a_%hIa$4}b=q69_LQk+9p^wRg%E;XugBUq-?H=jb3VRym6@4olvW5Sm}=HA#^Pmj zOIk|VR7z4RYEb_Q!5W8cRZOG<03H3vG5!bkaBX1;$kAfL^UBnE(~R*O#;7r1)mL!^+5#y(LL zVXS2ogw!e%_~YRt@qBmpV!hek*n9oPOKF9dPJ?r3B`Fq*gi(kwmc$qmV+f;|Br$Z_ zweZy+dzWPp1Uvp{cz>o#y_MloR&Gu?cT!D0V?7=}Ai z2tmK!UrAwBJ5vpev5b75(b3Nw& xglGd;W4eLwKOPJQ4}u`ra?X(?3C=nG833RdlEfrpX0ZSO002ovPDHLkV1hM+mzw|p diff --git a/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/save.png b/graphwalker-core/src/main/resources/org/graphwalker/GUI/resources/icons/save.png deleted file mode 100644 index 9c9a22592f368512ec64e094c512133309bd1f93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3267 zcmV;!3_SCRP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}0005rNkl?`YRGqb{Z`rTR=tjfTkbN zYPAtnmfyTg1%_|lqS0z2*KjCMF5P7$@o=l3-N@Q83nJePff6iOE!8ePa`2T|_}uu$m+QIJp8dPoI&*VJdLU z$>QV+0BDk6kv+g>^Vn=2(7*fwb6_9`fQ)r;a$PvNd}jh+t8nSS(U3b+Z-woa?WUu?`RK-(zg3dmItbvFr5o_ThORiwpCxwNf#v ziZQ0lsliW2+QVOK6;-Vp)xD`3W6DSARkaTAdjL#p;DQ0p+VKDY002ovPDHLkV1goF B9O3`~ diff --git a/graphwalker-core/src/main/resources/org/graphwalker/resources/version.properties b/graphwalker-core/src/main/resources/version.properties similarity index 100% rename from graphwalker-core/src/main/resources/org/graphwalker/resources/version.properties rename to graphwalker-core/src/main/resources/version.properties diff --git a/graphwalker-gui/pom.xml b/graphwalker-gui/pom.xml new file mode 100644 index 00000000..90471421 --- /dev/null +++ b/graphwalker-gui/pom.xml @@ -0,0 +1,28 @@ + + + + org.graphwalker + graphwalker-parent + ../graphwalker-parent/pom.xml + 2.5.14-SNAPSHOT + + + 4.0.0 + graphwalker-gui + 2.5.14-SNAPSHOT + GraphWalker GUI + + + + org.graphwalker + graphwalker-core + + + org.graphwalker + graphwalker-webservice + + + + diff --git a/graphwalker-core/src/main/java/org/graphwalker/GUI/App.java b/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java similarity index 99% rename from graphwalker-core/src/main/java/org/graphwalker/GUI/App.java rename to graphwalker-gui/src/main/java/org/graphwalker/gui/App.java index f8119278..a3684301 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/GUI/App.java +++ b/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.GUI; +package org.graphwalker.gui; import java.awt.BasicStroke; import java.awt.BorderLayout; @@ -97,9 +97,7 @@ import org.apache.commons.collections15.Transformer; import org.apache.log4j.Logger; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.SoapServices; -import org.graphwalker.Util; +import org.graphwalker.*; import org.graphwalker.events.AppEvent; import org.graphwalker.events.MbtEvent; import org.graphwalker.exceptions.GeneratorException; @@ -128,7 +126,7 @@ import edu.uci.ics.jung.visualization.renderers.Renderer; import edu.uci.ics.jung.visualization.util.Animator; -public class App extends JFrame implements ActionListener, MbtEvent { +public class App extends JFrame implements ActionListener, MbtEvent, Application { /** * */ @@ -241,7 +239,7 @@ private void runSoap() { String wsURL = "http://0.0.0.0:" + Util.readWSPort() + "/mbt-services"; try { mbt = Util.loadMbtAsWSFromXml(Util.getFile(xmlFile.getAbsolutePath())); - mbt.setUseGUI(); + mbt.setUseGUI(this); soapService = new SoapServices(mbt); soapService.xmlFile = xmlFile.getAbsolutePath(); } catch (Exception e) { @@ -433,7 +431,7 @@ private void loadModel() { try { if (soapButton.isSelected()) { mbt = Util.loadMbtAsWSFromXml(Util.getFile(xmlFile.getAbsolutePath())); - mbt.setUseGUI(); + mbt.setUseGUI(this); soapService.mbt = mbt; } else { mbt = Util.loadMbtFromXml(Util.getFile(xmlFile.getAbsolutePath())); @@ -480,7 +478,7 @@ private void loadModel() { reset(); return; } - mbt.setUseGUI(); + mbt.setUseGUI(this); centerOnVertex(); updateLayout(); diff --git a/graphwalker-core/src/main/java/org/graphwalker/GUI/StatusBar.java b/graphwalker-gui/src/main/java/org/graphwalker/gui/StatusBar.java similarity index 98% rename from graphwalker-core/src/main/java/org/graphwalker/GUI/StatusBar.java rename to graphwalker-gui/src/main/java/org/graphwalker/gui/StatusBar.java index 66107204..72c008ce 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/GUI/StatusBar.java +++ b/graphwalker-gui/src/main/java/org/graphwalker/gui/StatusBar.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.GUI; +package org.graphwalker.gui; import java.awt.Dimension; diff --git a/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/back.png b/graphwalker-gui/src/main/resources/icons/back.png similarity index 100% rename from graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/back.png rename to graphwalker-gui/src/main/resources/icons/back.png diff --git a/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/exit.png b/graphwalker-gui/src/main/resources/icons/exit.png similarity index 100% rename from graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/exit.png rename to graphwalker-gui/src/main/resources/icons/exit.png diff --git a/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/first.png b/graphwalker-gui/src/main/resources/icons/first.png similarity index 100% rename from graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/first.png rename to graphwalker-gui/src/main/resources/icons/first.png diff --git a/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/new.png b/graphwalker-gui/src/main/resources/icons/new.png similarity index 100% rename from graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/new.png rename to graphwalker-gui/src/main/resources/icons/new.png diff --git a/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/next.png b/graphwalker-gui/src/main/resources/icons/next.png similarity index 100% rename from graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/next.png rename to graphwalker-gui/src/main/resources/icons/next.png diff --git a/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/open.png b/graphwalker-gui/src/main/resources/icons/open.png similarity index 100% rename from graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/open.png rename to graphwalker-gui/src/main/resources/icons/open.png diff --git a/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/pause.png b/graphwalker-gui/src/main/resources/icons/pause.png similarity index 100% rename from graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/pause.png rename to graphwalker-gui/src/main/resources/icons/pause.png diff --git a/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/reload.png b/graphwalker-gui/src/main/resources/icons/reload.png similarity index 100% rename from graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/reload.png rename to graphwalker-gui/src/main/resources/icons/reload.png diff --git a/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/run.png b/graphwalker-gui/src/main/resources/icons/run.png similarity index 100% rename from graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/run.png rename to graphwalker-gui/src/main/resources/icons/run.png diff --git a/graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/save.png b/graphwalker-gui/src/main/resources/icons/save.png similarity index 100% rename from graphwalker-core/src/main/java/org/graphwalker/GUI/resources/icons/save.png rename to graphwalker-gui/src/main/resources/icons/save.png diff --git a/graphwalker-parent/pom.xml b/graphwalker-parent/pom.xml index a3b4f3e9..67036811 100644 --- a/graphwalker-parent/pom.xml +++ b/graphwalker-parent/pom.xml @@ -72,22 +72,39 @@ ../graphwalker-core + ../graphwalker-cli + ../graphwalker-gui ../graphwalker-standalone + ../graphwalker-webservice org.graphwalker - graphwalker + graphwalker-cli ${project.version} - pom org.graphwalker graphwalker-core ${project.version} + + org.graphwalker + graphwalker-gui + ${project.version} + + + org.graphwalker + graphwalker-standalone + ${project.version} + + + org.graphwalker + graphwalker-webservice + ${project.version} + log4j log4j @@ -252,4 +269,4 @@ - \ No newline at end of file + diff --git a/graphwalker-standalone/pom.xml b/graphwalker-standalone/pom.xml index dc44402d..73e23c61 100644 --- a/graphwalker-standalone/pom.xml +++ b/graphwalker-standalone/pom.xml @@ -16,10 +16,22 @@ pom + + org.graphwalker + graphwalker-cli + org.graphwalker graphwalker-core + + org.graphwalker + graphwalker-gui + + + org.graphwalker + graphwalker-webservice + diff --git a/graphwalker-webservice/pom.xml b/graphwalker-webservice/pom.xml new file mode 100644 index 00000000..f4a9b568 --- /dev/null +++ b/graphwalker-webservice/pom.xml @@ -0,0 +1,48 @@ + + + + org.graphwalker + graphwalker-parent + ../graphwalker-parent/pom.xml + 2.5.14-SNAPSHOT + + + 4.0.0 + graphwalker-webservice + 2.5.14-SNAPSHOT + GraphWalker WebService + + + + org.graphwalker + graphwalker-core + + + com.sun.xml.ws + jaxws-rt + + + + + + + org.codehaus.mojo + jaxws-maven-plugin + + + wsgen + + wsgen + + + org.graphwalker.SoapServices + + + + + + + + diff --git a/graphwalker-core/src/main/java/org/graphwalker/SoapServices.java b/graphwalker-webservice/src/main/java/org/graphwalker/SoapServices.java similarity index 94% rename from graphwalker-core/src/main/java/org/graphwalker/SoapServices.java rename to graphwalker-webservice/src/main/java/org/graphwalker/SoapServices.java index fddd7ce3..48611fd5 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/SoapServices.java +++ b/graphwalker-webservice/src/main/java/org/graphwalker/SoapServices.java @@ -55,7 +55,6 @@ import javax.jws.WebService; import org.apache.log4j.Logger; -import org.graphwalker.GUI.App; import org.graphwalker.exceptions.InvalidDataException; @WebService @@ -155,8 +154,8 @@ public String GetNextStep() { return value; } finally { if (mbt.isUseGUI()) { - App.getInstance().setButtons(); - App.getInstance().updateLayout(); + mbt.getGui().setButtons(); + mbt.getGui().updateLayout(); } } } @@ -183,18 +182,18 @@ public boolean Reload() { try { if (!this.xmlFile.isEmpty()) { mbt = Util.loadMbtAsWSFromXml(Util.getFile(this.xmlFile)); - if (useGui) { - mbt.setUseGUI(); - } + //if (useGui) { + // mbt.setUseGUI(); + //} } } catch (Exception e) { Util.logStackTraceToError(e); retValue = false; } finally { if (mbt.isUseGUI()) { - App.getInstance().setMbt(mbt); - App.getInstance().setButtons(); - App.getInstance().updateLayout(); + //mbt.getGui().setMbt(mbt); + mbt.getGui().setButtons(); + mbt.getGui().updateLayout(); } } Reset(); @@ -219,17 +218,17 @@ public boolean Load(String xmlFile) { boolean useGui = mbt.isUseGUI(); try { mbt = Util.loadMbtAsWSFromXml(Util.getFile(this.xmlFile)); - if (useGui) { - mbt.setUseGUI(); - } + //if (useGui) { + // mbt.setUseGUI(); + //} } catch (Exception e) { Util.logStackTraceToError(e); retValue = false; } finally { if (mbt.isUseGUI()) { - App.getInstance().setMbt(mbt); - App.getInstance().setButtons(); - App.getInstance().updateLayout(); + //mbt.getGui().setMbt(mbt); + mbt.getGui().setButtons(); + mbt.getGui().updateLayout(); } } Reset(); diff --git a/graphwalker-core/src/test/java/org/graphwalker/SoapServiceTest.java b/graphwalker-webservice/src/test/java/org/graphwalker/SoapServiceTest.java similarity index 100% rename from graphwalker-core/src/test/java/org/graphwalker/SoapServiceTest.java rename to graphwalker-webservice/src/test/java/org/graphwalker/SoapServiceTest.java From 46d3a31210580a6d0f7ef069fe2a294ced87667e Mon Sep 17 00:00:00 2001 From: Nils Olsson Date: Fri, 21 Oct 2011 10:12:00 +0200 Subject: [PATCH 004/371] Updated package structure --- graphwalker-cli/pom.xml | 4 - .../java/org/graphwalker/{ => cli}/CLI.java | 37 +- .../org/graphwalker/{ => cli}/CLITest.java | 20 +- .../graphwalker/{ => cli}/bugs/Issue_10.java | 10 +- .../graphwalker/{ => cli}/bugs/Issue_9.java | 10 +- .../src/test/resources/graphml/UC01.graphml | 296 +++++++++++++ .../graphml/methods/ExtendedMain.graphml | 0 .../resources/graphml/methods/Main.graphml | 0 .../graphml/misc/missing_inedges.graphml | 0 .../graphml/misc/no_missing_inedges.graphml | 0 .../graphml/reqtags/ExtendedMain.graphml | 416 ++++++++++++++++++ .../graphml/test24/AddressBook.graphml | 0 .../graphml/test24/AddressBookContact.graphml | 0 .../test24/AddressBookReadOnly.graphml | 0 .../resources/graphml/test24/Alarm.graphml | 0 .../graphml/test24/AlarmEdit.graphml | 0 .../resources/graphml/test24/Audio.graphml | 0 .../graphml/test24/Calculator.graphml | 0 .../resources/graphml/test24/Calendar.graphml | 0 .../test24/CalendarAppointment.graphml | 0 .../graphml/test24/Calendar_ToolsMenu.graphml | 0 .../graphml/test24/CallHistory.graphml | 0 .../resources/graphml/test24/Camera.graphml | 0 .../graphml/test24/ContactFavorites.graphml | 0 .../test24/ContactFavoritesReadOnly.graphml | 0 .../test24/ContactTapToSelectNumber.graphml | 0 .../resources/graphml/test24/Contacts.graphml | 0 .../graphml/test24/ContactsReadOnly.graphml | 0 .../resources/graphml/test24/Date.graphml | 0 .../graphml/test24/DefaultValues.graphml | 0 .../graphml/test24/DeleteItems.graphml | 0 .../graphml/test24/GlobalSettings.graphml | 0 .../graphml/test24/ImageViewer.graphml | 0 .../graphml/test24/KeyboardNumeric.graphml | 0 .../graphml/test24/KeyboardText.graphml | 0 .../graphml/test24/KeyboardToolsMenu.graphml | 0 .../resources/graphml/test24/Main.graphml | 0 .../resources/graphml/test24/MakeCall.graphml | 0 .../graphml/test24/MediaPlayer.graphml | 0 .../graphml/test24/MessagingCompose.graphml | 0 .../graphml/test24/MessagingDrafts.graphml | 0 .../graphml/test24/MessagingInbox.graphml | 0 .../graphml/test24/MessagingSent.graphml | 0 .../graphml/test24/NeoBrowser.graphml | 0 .../resources/graphml/test24/Notes.graphml | 0 .../graphml/test24/NumberToDial.graphml | 0 .../test24/RunningApplications.graphml | 0 .../graphml/test24/SendMessage.graphml | 0 .../graphml/test24/SendPictureAsMMS.graphml | 0 .../graphml/test24/SendVCard.graphml | 0 .../resources/graphml/test24/SysFiles.graphml | 0 .../resources/graphml/test24/Tetris.graphml | 0 .../resources/graphml/test24/Time.graphml | 0 .../src/test/resources/lib/small_jar.jar | Bin .../test/resources/templates/junit.template | 0 .../test/resources/templates/perl.template | 0 .../src/test/resources/xml/ReachedVertex.xml | 0 .../src/test/resources/xml/javaExecutor.xml | 16 +- .../test/resources/xml/reqtags/mbt_init6.xml | 8 +- .../test/resources/xml/reqtags/mbt_init8.xml | 0 .../test/resources/xml/reqtags/mbt_init9.xml | 0 .../graphwalker/{ => core}/Application.java | 2 +- .../graphwalker/{ => core}/ClassPathHack.java | 2 +- .../{ => core}/EventDrivenModels.java | 2 +- .../org/graphwalker/core}/ExtendedMain.java | 52 +-- .../org/graphwalker/{ => core}/Keywords.java | 12 +- .../org/graphwalker/{ => core}/Model.java | 2 +- .../{ => core}/ModelBasedTesting.java | 64 +-- .../{ => core}/MultipleModels.java | 52 +-- .../{ => core}/StatisticsManager.java | 58 +-- .../org/graphwalker/{ => core}/Status.java | 2 +- .../java/org/graphwalker/{ => core}/Util.java | 72 +-- .../conditions/AlternativeCondition.java | 54 +-- .../conditions/CombinationalCondition.java | 54 +-- .../{ => core}/conditions/EdgeCoverage.java | 56 +-- .../{ => core}/conditions/NeverCondition.java | 52 +-- .../{ => core}/conditions/ReachedEdge.java | 56 +-- .../conditions/ReachedRequirement.java | 52 +-- .../{ => core}/conditions/ReachedVertex.java | 60 +-- .../conditions/RequirementCoverage.java | 54 +-- .../{ => core}/conditions/StopCondition.java | 54 +-- .../{ => core}/conditions/TestCaseLength.java | 52 +-- .../{ => core}/conditions/TimeDuration.java | 52 +-- .../{ => core}/conditions/VertexCoverage.java | 54 +-- .../{ => core}/events/AppEvent.java | 2 +- .../{ => core}/events/MbtEvent.java | 2 +- .../exceptions/FoundNoEdgeException.java | 52 +-- .../exceptions/GeneratorException.java | 2 +- .../exceptions/GuiStoppedExecution.java | 2 +- .../exceptions/InvalidDataException.java | 2 +- .../exceptions/StopConditionException.java | 2 +- .../filters/AccessableEdgeFilter.java | 56 +-- .../generators/A_StarPathGenerator.java | 65 ++- .../AllPathPermutationsGenerator.java | 60 +-- .../{ => core}/generators/CodeGenerator.java | 54 +-- .../generators/CombinedPathGenerator.java | 56 +-- .../{ => core}/generators/ListGenerator.java | 60 +-- .../generators/NonOptimizedShortestPath.java | 10 +- .../{ => core}/generators/PathGenerator.java | 60 +-- .../generators/RandomPathGenerator.java | 60 +-- .../generators/RequirementsGenerator.java | 6 +- .../{ => core}/graph/AbstractElement.java | 6 +- .../graphwalker/{ => core}/graph/Edge.java | 4 +- .../graphwalker/{ => core}/graph/Graph.java | 4 +- .../graphwalker/{ => core}/graph/Vertex.java | 6 +- .../{ => core}/io/AbstractModelHandler.java | 54 +-- .../graphwalker/{ => core}/io/GraphML.java | 16 +- .../graphwalker/{ => core}/io/ParseLog.java | 4 +- .../{ => core}/io/PrintHTMLTestSequence.java | 2 +- .../machines/ExtendedFiniteStateMachine.java | 62 +-- .../machines/FiniteStateMachine.java | 66 +-- .../{ => core}/multipleModels/ModelAPI.java | 56 +-- .../multipleModels/ModelHandler.java | 14 +- .../statistics/EdgeCoverageStatistics.java | 58 +-- .../EdgeSequenceCoverageStatistics.java | 58 +-- .../RequirementCoverageStatistics.java | 56 +-- .../{ => core}/statistics/Statistics.java | 54 +-- .../statistics/VertexCoverageStatistics.java | 58 +-- .../ExtendedFiniteStateMachineTest.java | 62 +-- .../{ => core}/FiniteStateMachineTest.java | 62 +-- .../graphwalker/{ => core}/KeywordsTest.java | 8 +- .../{ => core}/ModelBasedTestingTest.java | 18 +- .../{ => core}/MultipleModelsTest.java | 62 +-- .../{ => core}/RequirementVariableTest.java | 67 +-- .../{ => core}/StatisticsManagerTest.java | 70 +-- .../org/graphwalker/{ => core}/UtilTest.java | 9 +- .../conditions/AlternativeConditionTest.java | 55 ++- .../CombinationalConditionTest.java | 55 ++- .../conditions/EdgeCoverageTest.java | 69 ++- .../conditions/ReachedEdgeTest.java | 67 ++- .../conditions/ReachedRequirementTest.java | 67 ++- .../conditions/ReachedStateTest.java | 67 ++- .../conditions/RequirementCoverageTest.java | 67 ++- .../conditions/StateCoverageTest.java | 69 ++- .../conditions/TestCaseLengthTest.java | 67 ++- .../conditions/TimeDurationTest.java | 69 ++- .../filters/AccessableEdgeFilterTest.java | 59 ++- .../A_StarPathGeneratorEFSMBeanShellTest.java | 68 ++- ...A_StarPathGeneratorEFSMJavaScriptTest.java | 68 ++- .../A_StarPathGeneratorFSMTest.java | 68 ++- .../AllPathPermutationsGeneratorTest.java | 72 ++- .../generators/CodeGeneratorTest.java | 63 ++- .../generators/CombinedPathGeneratorTest.java | 63 ++- .../generators/ListGeneratorTest.java | 63 ++- .../generators/RandomPathGeneratorTest.java | 64 ++- .../{ => core}/io/GraphMLTest.java | 11 +- .../{ => core}/multiple/ModelHandlerTest.java | 16 +- .../{ => core}/multiple/Model_A1_API.java | 6 +- .../{ => core}/multiple/Model_A_API.java | 6 +- .../{ => core}/multiple/Model_B1_API.java | 6 +- .../{ => core}/multiple/Model_B_API.java | 6 +- .../{ => core}/multiple/Model_C_API.java | 6 +- ...aphwalker.EventDrivenModels.eventModel.xml | 2 +- ...walker.EventDrivenModels.load2Models.1.xml | 2 +- ...walker.EventDrivenModels.load2Models.2.xml | 2 +- ...alker.EventDrivenModels.switchModels.A.xml | 2 +- ...alker.EventDrivenModels.switchModels.B.xml | 2 +- ...alker.EventDrivenModels.switchModels.C.xml | 2 +- .../test/resources/xml/reqtags/mbt_init5.xml | 16 +- .../main/java/org/graphwalker/gui/App.java | 26 +- graphwalker-standalone/pom.xml | 2 +- graphwalker-webservice/pom.xml | 2 +- .../{ => webservice}/SoapServices.java | 6 +- .../{ => webservice}/SoapServiceTest.java | 4 +- 164 files changed, 2663 insertions(+), 1976 deletions(-) rename graphwalker-cli/src/main/java/org/graphwalker/{ => cli}/CLI.java (98%) rename graphwalker-cli/src/test/java/org/graphwalker/{ => cli}/CLITest.java (96%) rename graphwalker-cli/src/test/java/org/graphwalker/{ => cli}/bugs/Issue_10.java (95%) rename graphwalker-cli/src/test/java/org/graphwalker/{ => cli}/bugs/Issue_9.java (95%) create mode 100644 graphwalker-cli/src/test/resources/graphml/UC01.graphml rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/methods/ExtendedMain.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/methods/Main.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/misc/missing_inedges.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/misc/no_missing_inedges.graphml (100%) create mode 100644 graphwalker-cli/src/test/resources/graphml/reqtags/ExtendedMain.graphml rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/AddressBook.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/AddressBookContact.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/AddressBookReadOnly.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/Alarm.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/AlarmEdit.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/Audio.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/Calculator.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/Calendar.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/CalendarAppointment.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/CallHistory.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/Camera.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/ContactFavorites.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/Contacts.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/ContactsReadOnly.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/Date.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/DefaultValues.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/DeleteItems.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/GlobalSettings.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/ImageViewer.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/KeyboardNumeric.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/KeyboardText.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/Main.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/MakeCall.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/MediaPlayer.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/MessagingCompose.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/MessagingDrafts.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/MessagingInbox.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/MessagingSent.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/NeoBrowser.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/Notes.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/NumberToDial.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/RunningApplications.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/SendMessage.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/SendPictureAsMMS.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/SendVCard.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/SysFiles.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/Tetris.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/graphml/test24/Time.graphml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/lib/small_jar.jar (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/templates/junit.template (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/templates/perl.template (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/xml/ReachedVertex.xml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/xml/javaExecutor.xml (94%) rename graphwalker-core/src/test/java/org/graphwalker/mbt_init.xml => graphwalker-cli/src/test/resources/xml/reqtags/mbt_init6.xml (84%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/xml/reqtags/mbt_init8.xml (100%) rename {graphwalker-core => graphwalker-cli}/src/test/resources/xml/reqtags/mbt_init9.xml (100%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/Application.java (97%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/ClassPathHack.java (98%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/EventDrivenModels.java (99%) rename graphwalker-core/src/{test/java/org/graphwalker => main/java/org/graphwalker/core}/ExtendedMain.java (95%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/Keywords.java (98%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/Model.java (98%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/ModelBasedTesting.java (95%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/MultipleModels.java (96%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/StatisticsManager.java (94%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/Status.java (99%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/Util.java (94%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/conditions/AlternativeCondition.java (94%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/conditions/CombinationalCondition.java (94%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/conditions/EdgeCoverage.java (93%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/conditions/NeverCondition.java (95%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/conditions/ReachedEdge.java (94%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/conditions/ReachedRequirement.java (96%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/conditions/ReachedVertex.java (92%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/conditions/RequirementCoverage.java (95%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/conditions/StopCondition.java (94%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/conditions/TestCaseLength.java (96%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/conditions/TimeDuration.java (95%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/conditions/VertexCoverage.java (94%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/events/AppEvent.java (98%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/events/MbtEvent.java (98%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/exceptions/FoundNoEdgeException.java (96%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/exceptions/GeneratorException.java (98%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/exceptions/GuiStoppedExecution.java (98%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/exceptions/InvalidDataException.java (98%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/exceptions/StopConditionException.java (98%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/filters/AccessableEdgeFilter.java (93%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/generators/A_StarPathGenerator.java (93%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/generators/AllPathPermutationsGenerator.java (94%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/generators/CodeGenerator.java (95%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/generators/CombinedPathGenerator.java (93%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/generators/ListGenerator.java (91%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/generators/NonOptimizedShortestPath.java (96%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/generators/PathGenerator.java (91%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/generators/RandomPathGenerator.java (92%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/generators/RequirementsGenerator.java (96%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/graph/AbstractElement.java (99%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/graph/Edge.java (98%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/graph/Graph.java (98%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/graph/Vertex.java (98%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/io/AbstractModelHandler.java (94%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/io/GraphML.java (99%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/io/ParseLog.java (98%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/io/PrintHTMLTestSequence.java (99%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/machines/ExtendedFiniteStateMachine.java (94%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/machines/FiniteStateMachine.java (94%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/multipleModels/ModelAPI.java (89%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/multipleModels/ModelHandler.java (97%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/statistics/EdgeCoverageStatistics.java (92%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/statistics/EdgeSequenceCoverageStatistics.java (93%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/statistics/RequirementCoverageStatistics.java (93%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/statistics/Statistics.java (94%) rename graphwalker-core/src/main/java/org/graphwalker/{ => core}/statistics/VertexCoverageStatistics.java (92%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/ExtendedFiniteStateMachineTest.java (92%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/FiniteStateMachineTest.java (92%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/KeywordsTest.java (96%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/ModelBasedTestingTest.java (96%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/MultipleModelsTest.java (94%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/RequirementVariableTest.java (92%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/StatisticsManagerTest.java (95%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/UtilTest.java (95%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/conditions/AlternativeConditionTest.java (94%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/conditions/CombinationalConditionTest.java (93%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/conditions/EdgeCoverageTest.java (88%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/conditions/ReachedEdgeTest.java (89%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/conditions/ReachedRequirementTest.java (90%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/conditions/ReachedStateTest.java (89%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/conditions/RequirementCoverageTest.java (90%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/conditions/StateCoverageTest.java (88%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/conditions/TestCaseLengthTest.java (89%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/conditions/TimeDurationTest.java (90%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/filters/AccessableEdgeFilterTest.java (93%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/generators/A_StarPathGeneratorEFSMBeanShellTest.java (90%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/generators/A_StarPathGeneratorEFSMJavaScriptTest.java (90%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/generators/A_StarPathGeneratorFSMTest.java (89%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/generators/AllPathPermutationsGeneratorTest.java (85%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/generators/CodeGeneratorTest.java (91%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/generators/CombinedPathGeneratorTest.java (89%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/generators/ListGeneratorTest.java (90%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/generators/RandomPathGeneratorTest.java (90%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/io/GraphMLTest.java (98%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/multiple/ModelHandlerTest.java (94%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/multiple/Model_A1_API.java (91%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/multiple/Model_A_API.java (92%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/multiple/Model_B1_API.java (91%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/multiple/Model_B_API.java (91%) rename graphwalker-core/src/test/java/org/graphwalker/{ => core}/multiple/Model_C_API.java (91%) rename graphwalker-webservice/src/main/java/org/graphwalker/{ => webservice}/SoapServices.java (97%) rename graphwalker-webservice/src/test/java/org/graphwalker/{ => webservice}/SoapServiceTest.java (91%) diff --git a/graphwalker-cli/pom.xml b/graphwalker-cli/pom.xml index 163b7a4e..b4215c80 100644 --- a/graphwalker-cli/pom.xml +++ b/graphwalker-cli/pom.xml @@ -19,10 +19,6 @@ org.graphwalker graphwalker-core - - org.graphwalker - graphwalker-gui - org.graphwalker graphwalker-webservice diff --git a/graphwalker-cli/src/main/java/org/graphwalker/CLI.java b/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java similarity index 98% rename from graphwalker-cli/src/main/java/org/graphwalker/CLI.java rename to graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java index 992679ba..0b30a3c5 100644 --- a/graphwalker-cli/src/main/java/org/graphwalker/CLI.java +++ b/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.cli; import java.io.File; import java.io.FileInputStream; @@ -72,13 +72,16 @@ import org.apache.commons.cli.PosixParser; import org.apache.commons.cli.UnrecognizedOptionException; import org.apache.log4j.Logger; -import org.graphwalker.gui.App; -import org.graphwalker.Keywords.Generator; -import org.graphwalker.Keywords.StopCondition; -import org.graphwalker.conditions.AlternativeCondition; -import org.graphwalker.exceptions.GeneratorException; -import org.graphwalker.exceptions.StopConditionException; -import org.graphwalker.io.PrintHTMLTestSequence; +import org.graphwalker.core.Keywords; +import org.graphwalker.core.Keywords.Generator; +import org.graphwalker.core.Keywords.StopCondition; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.webservice.SoapServices; +import org.graphwalker.core.Util; +import org.graphwalker.core.conditions.AlternativeCondition; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.exceptions.StopConditionException; +import org.graphwalker.core.io.PrintHTMLTestSequence; import org.jdom.JDOMException; /** @@ -297,15 +300,15 @@ else if (args[0].equalsIgnoreCase("soap")) { /** * Command: gui */ - else if (args[0].equalsIgnoreCase("gui")) { - RunCommandGui(cl); - } + //else if (args[0].equalsIgnoreCase("gui")) { + // RunCommandGui(cl); + //} /** * Command: log */ - else if (args[0].equalsIgnoreCase("log")) { - RunCommandLog(cl); - } + //else if (args[0].equalsIgnoreCase("log")) { + // RunCommandLog(cl); + //} /** * Command: manual */ @@ -1070,6 +1073,7 @@ private void RunCommandSoap(CommandLine cl) throws StopConditionException, Gener * @param cl * @throws IOException */ + /* private void RunCommandGui(CommandLine cl) throws IOException { if (cl.hasOption("f")) { App.main(new String[] { cl.getOptionValue("f") }); @@ -1077,13 +1081,14 @@ private void RunCommandGui(CommandLine cl) throws IOException { App.main(); } } - + */ /** * Run the log command * * @param cl * @throws IOException */ + /* private void RunCommandLog(CommandLine cl) throws IOException { if (helpNeeded("log", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") || helpNeeded("log", !cl.hasOption("l"), "Missing the log file. See -l")) @@ -1091,7 +1096,7 @@ private void RunCommandLog(CommandLine cl) throws IOException { App.main(new String[] { cl.getOptionValue("f"), cl.getOptionValue("l") }); } - + */ private boolean helpNeeded(String module, boolean condition, String message) { if (condition) { System.out.println(message); diff --git a/graphwalker-cli/src/test/java/org/graphwalker/CLITest.java b/graphwalker-cli/src/test/java/org/graphwalker/cli/CLITest.java similarity index 96% rename from graphwalker-cli/src/test/java/org/graphwalker/CLITest.java rename to graphwalker-cli/src/test/java/org/graphwalker/cli/CLITest.java index d9ca2c73..8e87090a 100644 --- a/graphwalker-cli/src/test/java/org/graphwalker/CLITest.java +++ b/graphwalker-cli/src/test/java/org/graphwalker/cli/CLITest.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.cli; import java.io.File; import java.io.IOException; @@ -59,6 +59,8 @@ import org.apache.log4j.Logger; import junit.framework.TestCase; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.Util; public class CLITest extends TestCase { @@ -279,7 +281,7 @@ public void testOfflineA_StarReachedRequirement() { * graphml/reqtags/ExtendedMain.graphml */ public void testListReqTags() { - String args[] = { "requirements", "-f", "graphml/reqtags/ExtendedMain.graphml" }; + String args[] = { "requirements", "-f", "graphml/reqtags/ExtendedMain.graphml"}; runCommand(args); assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); assertEquals(6, getNumMatches(Pattern.compile("req[ \\d]+").matcher(outMsg))); @@ -356,7 +358,7 @@ public void testOnlineRandom10seconds() { * Test command: java -jar mbt.jar methods -f graphml/methods/Main.graphml */ public void testCountMethods() { - String args[] = { "methods", "-f", "graphml/methods/Main.graphml" }; + String args[] = { "methods", "-f", "graphml/methods/Main.graphml"}; runCommand(args); assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); pattern = Pattern @@ -387,7 +389,7 @@ public void testReservedKeywords() { * xml/reqtags/mbt_init6.xml */ public void testXmlSetup() { - String args[] = { "xml", "-f", "xml/reqtags/mbt_init6.xml" }; + String args[] = { "xml", "-f", "xml/reqtags/mbt_init6.xml"}; runCommand(args); assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); assertEquals(6, getNumMatches(Pattern.compile("req[ \\d]+").matcher(outMsg))); @@ -398,7 +400,7 @@ public void testXmlSetup() { * xml/reqtags/mbt_init5.xml */ public void testXmlSetupWithJavaExecutor() { - String args[] = { "xml", "-f", "xml/javaExecutor.xml" }; + String args[] = { "xml", "-f", "xml/javaExecutor.xml"}; runCommand(args); assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); assertEquals(outMsg, 76, getNumMatches(Pattern.compile("(Vertex:|Edge:)").matcher(outMsg))); @@ -408,7 +410,7 @@ public void testXmlSetupWithJavaExecutor() { * Test command: java -jar mbt.jar soap -f xml/reqtags/mbt_init6.xml */ public void testSOAPWithXML() { - String args[] = { "soap", "-f", "xml/reqtags/mbt_init6.xml" }; + String args[] = { "soap", "-f", "xml/reqtags/mbt_init6.xml"}; runCommand(args); assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); assertTrue( @@ -434,7 +436,7 @@ public void testSOAPWithoutXML() { * Test command: java -jar mbt.jar soap -f xml/reqtags/mbt_init6.xml */ public void testSOAPWithCorrectClassPathInXML() { - String args[] = { "soap", "-f", "xml/reqtags/mbt_init8.xml" }; + String args[] = { "soap", "-f", "xml/reqtags/mbt_init8.xml"}; runCommand(args); assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); assertTrue( @@ -447,7 +449,7 @@ public void testSOAPWithCorrectClassPathInXML() { * Test command: java -jar mbt.jar soap -f xml/reqtags/mbt_init9.xml */ public void testSOAPWithIncorrectClassPathInXML() { - String args[] = { "soap", "-f", "xml/reqtags/mbt_init9.xml" }; + String args[] = { "soap", "-f", "xml/reqtags/mbt_init9.xml"}; runCommand(args); assertTrue(errMsg, errMsg.matches("(?s).*Could not add: 'non-existing-path' to CLASSPATH.*")); } @@ -456,7 +458,7 @@ public void testSOAPWithIncorrectClassPathInXML() { * Test command: java -jar mbt.jar xml -f xml/ReachedVertex.xml */ public void testReachedVertexXML() { - String args[] = { "xml", "-f", "xml/ReachedVertex.xml" }; + String args[] = { "xml", "-f", "xml/ReachedVertex.xml"}; runCommand(args); System.out.println(errMsg); assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); diff --git a/graphwalker-cli/src/test/java/org/graphwalker/bugs/Issue_10.java b/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_10.java similarity index 95% rename from graphwalker-cli/src/test/java/org/graphwalker/bugs/Issue_10.java rename to graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_10.java index 17fb0172..37f20777 100644 --- a/graphwalker-cli/src/test/java/org/graphwalker/bugs/Issue_10.java +++ b/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_10.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.bugs; +package org.graphwalker.cli.bugs; import java.io.IOException; import java.io.OutputStream; @@ -55,10 +55,10 @@ import java.util.regex.Pattern; import org.apache.log4j.Logger; -import org.graphwalker.CLI; -import org.graphwalker.CLITest; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.Util; +import org.graphwalker.cli.CLI; +import org.graphwalker.cli.CLITest; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.Util; import junit.framework.TestCase; diff --git a/graphwalker-cli/src/test/java/org/graphwalker/bugs/Issue_9.java b/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_9.java similarity index 95% rename from graphwalker-cli/src/test/java/org/graphwalker/bugs/Issue_9.java rename to graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_9.java index b5c47b2e..b5eceb42 100644 --- a/graphwalker-cli/src/test/java/org/graphwalker/bugs/Issue_9.java +++ b/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_9.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.bugs; +package org.graphwalker.cli.bugs; import java.io.IOException; import java.io.OutputStream; @@ -55,10 +55,10 @@ import java.util.regex.Pattern; import org.apache.log4j.Logger; -import org.graphwalker.CLI; -import org.graphwalker.CLITest; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.Util; +import org.graphwalker.cli.CLI; +import org.graphwalker.cli.CLITest; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.Util; import junit.framework.TestCase; diff --git a/graphwalker-cli/src/test/resources/graphml/UC01.graphml b/graphwalker-cli/src/test/resources/graphml/UC01.graphml new file mode 100644 index 00000000..96f6d8f6 --- /dev/null +++ b/graphwalker-cli/src/test/resources/graphml/UC01.graphml @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + v_BrowserStarted + + + + + + + + + + + + + v_BaseURL +REQTAG=UC01 2.2.1 + + + + + + + + + + + + + v_SearchResult +REQTAG=UC01 2.2.2 + + + + + + + + + + + + + v_BrowserStopped + + + + + + + + + + + + + v_BookInformation +REQTAG=UC01 2.2.3 + + + + + + + + + + + + + v_OtherBoughtBooks + + + + + + + + + + + + + v_ShoppingCart +REQTAG=UC01 2.3 + + + + + + + + + + + + + e_init / num_of_books = 0; MAX_BOOKS = 5; + + + + + + + + + + + + e_EnterBaseURL + + + + + + + + + + + + e_SearchBook + + + + + + + + + + + + e_StartBrowser + + + + + + + + + + + + e_ClickBook + + + + + + + + + + + + + + + e_AddBookToCart [num_of_books<=MAX_BOOKS] / num_of_books++; + + + + + + + + + + + + + + + + + e_ShoppingCart + + + + + + + + + + + + + + + e_ShoppingCart + + + + + + + + + + + + + + + + + e_ShoppingCart + + + + + + + + + + + + + + + + + e_SearchBook + + + + + + + + + + + + + + + + + e_SearchBook + + + + + + + + + + + + + + + + + e_SearchBook + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/graphml/methods/ExtendedMain.graphml b/graphwalker-cli/src/test/resources/graphml/methods/ExtendedMain.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/methods/ExtendedMain.graphml rename to graphwalker-cli/src/test/resources/graphml/methods/ExtendedMain.graphml diff --git a/graphwalker-core/src/test/resources/graphml/methods/Main.graphml b/graphwalker-cli/src/test/resources/graphml/methods/Main.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/methods/Main.graphml rename to graphwalker-cli/src/test/resources/graphml/methods/Main.graphml diff --git a/graphwalker-core/src/test/resources/graphml/misc/missing_inedges.graphml b/graphwalker-cli/src/test/resources/graphml/misc/missing_inedges.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/misc/missing_inedges.graphml rename to graphwalker-cli/src/test/resources/graphml/misc/missing_inedges.graphml diff --git a/graphwalker-core/src/test/resources/graphml/misc/no_missing_inedges.graphml b/graphwalker-cli/src/test/resources/graphml/misc/no_missing_inedges.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/misc/no_missing_inedges.graphml rename to graphwalker-cli/src/test/resources/graphml/misc/no_missing_inedges.graphml diff --git a/graphwalker-cli/src/test/resources/graphml/reqtags/ExtendedMain.graphml b/graphwalker-cli/src/test/resources/graphml/reqtags/ExtendedMain.graphml new file mode 100644 index 00000000..687b8720 --- /dev/null +++ b/graphwalker-cli/src/test/resources/graphml/reqtags/ExtendedMain.graphml @@ -0,0 +1,416 @@ + + + + + + + + + + + + + + + Start + + + + + + + + + + + + v_KeePassNotRunning + + + + + + + + + + + + v_MainWindowEmpty +REQTAG=req 79 + + + + + + + + + + + + v_EnterMasterCompositeMasterKey + + + + + + + + + + + + v_InvalidKey + + + + + + + + + + + + v_MainWindow_DB_Loaded +REQTAG=req 55, req 78 + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + e_Initialize / incorrect=0; databaseChanged=false + + + + + + + + + + + + + + + + + e_Start + + + + + + + + + + + + + + + e_StartWithDatabase +REQTAG=req1 + + + + + + + + + + + + + + + e_EnterInvalidKey/incorrect=incorrect+1 + + + + + + + + + + + + + + + + + e_CloseDialog[incorrect<3] + + + + + + + + + + + + + + + + + e_CloseDialog[incorrect==3]/incorrect=0 + + + + + + + + + + + + + + + e_EnterCorrectKey/incorrect=0 +REQTAG=req2, req 23 + + + + + + + + + + + + + + + + + e_CloseApp[databaseChanged==false] + + + + + + + + + + + + + + + + + e_CloseApp + + + + + + + + + + + + + + + e_CloseApp[databaseChanged==true&&incorrect==0] + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + + + e_CloseDB[databaseChanged==true] + + + + + + + + + + + + + + + e_CloseDB[databaseChanged==false] + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + + e_ChangeDatabase/databaseChanged=true + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/graphml/test24/AddressBook.graphml b/graphwalker-cli/src/test/resources/graphml/test24/AddressBook.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/AddressBook.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/AddressBook.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/AddressBookContact.graphml b/graphwalker-cli/src/test/resources/graphml/test24/AddressBookContact.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/AddressBookContact.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/AddressBookContact.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/AddressBookReadOnly.graphml b/graphwalker-cli/src/test/resources/graphml/test24/AddressBookReadOnly.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/AddressBookReadOnly.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/AddressBookReadOnly.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/Alarm.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Alarm.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/Alarm.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/Alarm.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/AlarmEdit.graphml b/graphwalker-cli/src/test/resources/graphml/test24/AlarmEdit.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/AlarmEdit.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/AlarmEdit.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/Audio.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Audio.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/Audio.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/Audio.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/Calculator.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Calculator.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/Calculator.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/Calculator.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/Calendar.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Calendar.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/Calendar.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/Calendar.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/CalendarAppointment.graphml b/graphwalker-cli/src/test/resources/graphml/test24/CalendarAppointment.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/CalendarAppointment.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/CalendarAppointment.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/CallHistory.graphml b/graphwalker-cli/src/test/resources/graphml/test24/CallHistory.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/CallHistory.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/CallHistory.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/Camera.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Camera.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/Camera.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/Camera.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/ContactFavorites.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ContactFavorites.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/ContactFavorites.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/ContactFavorites.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/Contacts.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Contacts.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/Contacts.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/Contacts.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/ContactsReadOnly.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ContactsReadOnly.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/ContactsReadOnly.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/ContactsReadOnly.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/Date.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Date.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/Date.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/Date.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/DefaultValues.graphml b/graphwalker-cli/src/test/resources/graphml/test24/DefaultValues.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/DefaultValues.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/DefaultValues.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/DeleteItems.graphml b/graphwalker-cli/src/test/resources/graphml/test24/DeleteItems.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/DeleteItems.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/DeleteItems.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/GlobalSettings.graphml b/graphwalker-cli/src/test/resources/graphml/test24/GlobalSettings.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/GlobalSettings.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/GlobalSettings.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/ImageViewer.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ImageViewer.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/ImageViewer.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/ImageViewer.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/KeyboardNumeric.graphml b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardNumeric.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/KeyboardNumeric.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/KeyboardNumeric.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/KeyboardText.graphml b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardText.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/KeyboardText.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/KeyboardText.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/Main.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Main.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/Main.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/Main.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/MakeCall.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MakeCall.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/MakeCall.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/MakeCall.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/MediaPlayer.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MediaPlayer.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/MediaPlayer.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/MediaPlayer.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/MessagingCompose.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MessagingCompose.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/MessagingCompose.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/MessagingCompose.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/MessagingDrafts.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MessagingDrafts.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/MessagingDrafts.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/MessagingDrafts.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/MessagingInbox.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MessagingInbox.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/MessagingInbox.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/MessagingInbox.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/MessagingSent.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MessagingSent.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/MessagingSent.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/MessagingSent.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/NeoBrowser.graphml b/graphwalker-cli/src/test/resources/graphml/test24/NeoBrowser.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/NeoBrowser.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/NeoBrowser.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/Notes.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Notes.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/Notes.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/Notes.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/NumberToDial.graphml b/graphwalker-cli/src/test/resources/graphml/test24/NumberToDial.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/NumberToDial.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/NumberToDial.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/RunningApplications.graphml b/graphwalker-cli/src/test/resources/graphml/test24/RunningApplications.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/RunningApplications.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/RunningApplications.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/SendMessage.graphml b/graphwalker-cli/src/test/resources/graphml/test24/SendMessage.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/SendMessage.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/SendMessage.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/SendPictureAsMMS.graphml b/graphwalker-cli/src/test/resources/graphml/test24/SendPictureAsMMS.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/SendPictureAsMMS.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/SendPictureAsMMS.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/SendVCard.graphml b/graphwalker-cli/src/test/resources/graphml/test24/SendVCard.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/SendVCard.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/SendVCard.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/SysFiles.graphml b/graphwalker-cli/src/test/resources/graphml/test24/SysFiles.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/SysFiles.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/SysFiles.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/Tetris.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Tetris.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/Tetris.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/Tetris.graphml diff --git a/graphwalker-core/src/test/resources/graphml/test24/Time.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Time.graphml similarity index 100% rename from graphwalker-core/src/test/resources/graphml/test24/Time.graphml rename to graphwalker-cli/src/test/resources/graphml/test24/Time.graphml diff --git a/graphwalker-core/src/test/resources/lib/small_jar.jar b/graphwalker-cli/src/test/resources/lib/small_jar.jar similarity index 100% rename from graphwalker-core/src/test/resources/lib/small_jar.jar rename to graphwalker-cli/src/test/resources/lib/small_jar.jar diff --git a/graphwalker-core/src/test/resources/templates/junit.template b/graphwalker-cli/src/test/resources/templates/junit.template similarity index 100% rename from graphwalker-core/src/test/resources/templates/junit.template rename to graphwalker-cli/src/test/resources/templates/junit.template diff --git a/graphwalker-core/src/test/resources/templates/perl.template b/graphwalker-cli/src/test/resources/templates/perl.template similarity index 100% rename from graphwalker-core/src/test/resources/templates/perl.template rename to graphwalker-cli/src/test/resources/templates/perl.template diff --git a/graphwalker-core/src/test/resources/xml/ReachedVertex.xml b/graphwalker-cli/src/test/resources/xml/ReachedVertex.xml similarity index 100% rename from graphwalker-core/src/test/resources/xml/ReachedVertex.xml rename to graphwalker-cli/src/test/resources/xml/ReachedVertex.xml diff --git a/graphwalker-core/src/test/resources/xml/javaExecutor.xml b/graphwalker-cli/src/test/resources/xml/javaExecutor.xml similarity index 94% rename from graphwalker-core/src/test/resources/xml/javaExecutor.xml rename to graphwalker-cli/src/test/resources/xml/javaExecutor.xml index 2560a82a..5ef8bc44 100644 --- a/graphwalker-core/src/test/resources/xml/javaExecutor.xml +++ b/graphwalker-cli/src/test/resources/xml/javaExecutor.xml @@ -24,11 +24,11 @@ THE SOFTWARE. #L% --> - - - - - - - - + + + + + + + + diff --git a/graphwalker-core/src/test/java/org/graphwalker/mbt_init.xml b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init6.xml similarity index 84% rename from graphwalker-core/src/test/java/org/graphwalker/mbt_init.xml rename to graphwalker-cli/src/test/resources/xml/reqtags/mbt_init6.xml index aebe7dab..d8835294 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/mbt_init.xml +++ b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init6.xml @@ -25,10 +25,8 @@ #L% --> - + - - - - + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init8.xml b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init8.xml similarity index 100% rename from graphwalker-core/src/test/resources/xml/reqtags/mbt_init8.xml rename to graphwalker-cli/src/test/resources/xml/reqtags/mbt_init8.xml diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init9.xml b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init9.xml similarity index 100% rename from graphwalker-core/src/test/resources/xml/reqtags/mbt_init9.xml rename to graphwalker-cli/src/test/resources/xml/reqtags/mbt_init9.xml diff --git a/graphwalker-core/src/main/java/org/graphwalker/Application.java b/graphwalker-core/src/main/java/org/graphwalker/core/Application.java similarity index 97% rename from graphwalker-core/src/main/java/org/graphwalker/Application.java rename to graphwalker-core/src/main/java/org/graphwalker/core/Application.java index e1a39115..43b2bbcb 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/Application.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Application.java @@ -23,7 +23,7 @@ * THE SOFTWARE. * #L% */ -package org.graphwalker; +package org.graphwalker.core; public interface Application { Status getStatus(); diff --git a/graphwalker-core/src/main/java/org/graphwalker/ClassPathHack.java b/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java similarity index 98% rename from graphwalker-core/src/main/java/org/graphwalker/ClassPathHack.java rename to graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java index 29f6834d..dd713c6b 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/ClassPathHack.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java @@ -23,7 +23,7 @@ * THE SOFTWARE. * #L% */ -package org.graphwalker; +package org.graphwalker.core; import java.io.File; import java.io.IOException; diff --git a/graphwalker-core/src/main/java/org/graphwalker/EventDrivenModels.java b/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java similarity index 99% rename from graphwalker-core/src/main/java/org/graphwalker/EventDrivenModels.java rename to graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java index 0d68427f..1fed1aab 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/EventDrivenModels.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.core; import java.util.Stack; import java.util.Vector; diff --git a/graphwalker-core/src/test/java/org/graphwalker/ExtendedMain.java b/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java similarity index 95% rename from graphwalker-core/src/test/java/org/graphwalker/ExtendedMain.java rename to graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java index 03919a05..e4a698fa 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/ExtendedMain.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -49,7 +49,7 @@ /** * */ -package org.graphwalker; +package org.graphwalker.core; /** * @author Johan Tejle diff --git a/graphwalker-core/src/main/java/org/graphwalker/Keywords.java b/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java similarity index 98% rename from graphwalker-core/src/main/java/org/graphwalker/Keywords.java rename to graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java index f1b40df2..620a3612 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/Keywords.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java @@ -46,13 +46,13 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.core; import java.util.Vector; -import org.graphwalker.exceptions.GeneratorException; -import org.graphwalker.exceptions.StopConditionException; -import org.graphwalker.multipleModels.ModelHandler; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.exceptions.StopConditionException; +import org.graphwalker.core.multipleModels.ModelHandler; /** * Handles the common constants for the org.graphwalker package. This includes @@ -312,7 +312,7 @@ public static boolean isKeyWord(final String wordToCheck) { return Keywords.reservedKeyWords.contains(wordToCheck.toUpperCase()); } - static class StopCondition { + public static class StopCondition { private String name; private String description; private Integer id; @@ -412,7 +412,7 @@ static public int getStopCondition(final String stopCondition) throws StopCondit return -1; } - static class Generator { + public static class Generator { private String name; private String description; private Integer id; diff --git a/graphwalker-core/src/main/java/org/graphwalker/Model.java b/graphwalker-core/src/main/java/org/graphwalker/core/Model.java similarity index 98% rename from graphwalker-core/src/main/java/org/graphwalker/Model.java rename to graphwalker-core/src/main/java/org/graphwalker/core/Model.java index 4ef9c908..4eb5f4e1 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/Model.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Model.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.core; import java.util.Observable; import java.util.Observer; diff --git a/graphwalker-core/src/main/java/org/graphwalker/ModelBasedTesting.java b/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java similarity index 95% rename from graphwalker-core/src/main/java/org/graphwalker/ModelBasedTesting.java rename to graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java index c341b4eb..34d31631 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/ModelBasedTesting.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.core; import java.io.IOException; import java.io.InputStream; @@ -61,28 +61,28 @@ import java.util.regex.Pattern; import org.apache.log4j.Logger; -import org.graphwalker.conditions.TimeDuration; -import org.graphwalker.events.MbtEvent; -import org.graphwalker.exceptions.FoundNoEdgeException; -import org.graphwalker.exceptions.GeneratorException; -import org.graphwalker.exceptions.GuiStoppedExecution; -import org.graphwalker.exceptions.InvalidDataException; -import org.graphwalker.generators.CodeGenerator; -import org.graphwalker.generators.NonOptimizedShortestPath; -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.graph.AbstractElement; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; -import org.graphwalker.io.AbstractModelHandler; -import org.graphwalker.io.GraphML; -import org.graphwalker.machines.ExtendedFiniteStateMachine; -import org.graphwalker.machines.FiniteStateMachine; -import org.graphwalker.multipleModels.ModelHandler; -import org.graphwalker.statistics.EdgeCoverageStatistics; -import org.graphwalker.statistics.EdgeSequenceCoverageStatistics; -import org.graphwalker.statistics.RequirementCoverageStatistics; -import org.graphwalker.statistics.VertexCoverageStatistics; +import org.graphwalker.core.conditions.TimeDuration; +import org.graphwalker.core.events.MbtEvent; +import org.graphwalker.core.exceptions.FoundNoEdgeException; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.exceptions.GuiStoppedExecution; +import org.graphwalker.core.exceptions.InvalidDataException; +import org.graphwalker.core.generators.CodeGenerator; +import org.graphwalker.core.generators.NonOptimizedShortestPath; +import org.graphwalker.core.generators.PathGenerator; +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.io.AbstractModelHandler; +import org.graphwalker.core.io.GraphML; +import org.graphwalker.core.machines.ExtendedFiniteStateMachine; +import org.graphwalker.core.machines.FiniteStateMachine; +import org.graphwalker.core.multipleModels.ModelHandler; +import org.graphwalker.core.statistics.EdgeCoverageStatistics; +import org.graphwalker.core.statistics.EdgeSequenceCoverageStatistics; +import org.graphwalker.core.statistics.RequirementCoverageStatistics; +import org.graphwalker.core.statistics.VertexCoverageStatistics; /** * The object handles the test case generation, both online and offline. @@ -392,7 +392,7 @@ public void populateMachineRequirementHashTable() { getMachine().populateReqHashMap(); } - protected void enableJsScriptEngine(boolean enableJs) { + public void enableJsScriptEngine(boolean enableJs) { if (enableJs) useJsScriptEngine = true; else @@ -539,7 +539,7 @@ public void readGraph(String graphmlFileName) { } } - protected void writeModel(PrintStream ps, boolean printIndex) { + public void writeModel(PrintStream ps, boolean printIndex) { this.modelHandler.save(ps, printIndex); } @@ -621,7 +621,7 @@ public void setTemplate(String templateFile) throws IOException { } } - protected void interractivePath() throws InterruptedException { + public void interractivePath() throws InterruptedException { interractivePath(System.in); } @@ -692,7 +692,7 @@ private String getRequirement(AbstractElement element) { return ""; } - protected void logExecution(AbstractElement element, String additionalInfo) { + public void logExecution(AbstractElement element, String additionalInfo) { String req = " " + getRequirement(element); if (element instanceof Edge) { logger.info(getMachine().getLastEdge() + req + additionalInfo); @@ -753,7 +753,7 @@ public void executePath(Object objInstance) throws InterruptedException { executePath(null, objInstance); } - protected void executePath(String strClassName) throws InterruptedException { + public void executePath(String strClassName) throws InterruptedException { if (getJavaExecutorClass() == null) { setJavaExecutorClass(strClassName); } @@ -787,7 +787,7 @@ protected void executePath(String strClassName) throws InterruptedException { executePath(clsClass, null); } - protected void executePath(Class clsClass, Object objInstance) throws InterruptedException { + public void executePath(Class clsClass, Object objInstance) throws InterruptedException { try { thisThread = Thread.currentThread(); stopFlag = thisThread; @@ -1002,11 +1002,11 @@ private void executeMethod(Class clsClass, Object objInstance, String strMeth } } - protected void writePath() throws InterruptedException { + public void writePath() throws InterruptedException { writePath(System.out); } - protected void writePath(Vector testSequence) throws InterruptedException { + public void writePath(Vector testSequence) throws InterruptedException { if (this.machine == null) { getMachine(); } @@ -1040,7 +1040,7 @@ private String parseManualInstructions(String manualInstructions) { return parsedStr; } - protected void writePath(PrintStream out) throws InterruptedException { + public void writePath(PrintStream out) throws InterruptedException { if (this.machine == null) { getMachine(); } diff --git a/graphwalker-core/src/main/java/org/graphwalker/MultipleModels.java b/graphwalker-core/src/main/java/org/graphwalker/core/MultipleModels.java similarity index 96% rename from graphwalker-core/src/main/java/org/graphwalker/MultipleModels.java rename to graphwalker-core/src/main/java/org/graphwalker/core/MultipleModels.java index 4362ba8c..2d2ee3df 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/MultipleModels.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/MultipleModels.java @@ -1,29 +1,29 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ -package org.graphwalker; +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker.core; import java.util.HashMap; import java.util.Iterator; diff --git a/graphwalker-core/src/main/java/org/graphwalker/StatisticsManager.java b/graphwalker-core/src/main/java/org/graphwalker/core/StatisticsManager.java similarity index 94% rename from graphwalker-core/src/main/java/org/graphwalker/StatisticsManager.java rename to graphwalker-core/src/main/java/org/graphwalker/core/StatisticsManager.java index 70da6c11..c7b0abca 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/StatisticsManager.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/StatisticsManager.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,11 +46,11 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.core; import org.apache.log4j.Logger; -import org.graphwalker.graph.AbstractElement; -import org.graphwalker.statistics.*; +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.statistics.*; import org.jdom.Document; import org.jdom.Element; import org.jdom.output.XMLOutputter; @@ -147,7 +147,7 @@ public void setReportTemplate(InputStream inputStream) { } } - protected void writeFullReport(String fileName) { + public void writeFullReport(String fileName) { try { writeFullReport(new PrintStream(new File(fileName))); } catch (FileNotFoundException e) { diff --git a/graphwalker-core/src/main/java/org/graphwalker/Status.java b/graphwalker-core/src/main/java/org/graphwalker/core/Status.java similarity index 99% rename from graphwalker-core/src/main/java/org/graphwalker/Status.java rename to graphwalker-core/src/main/java/org/graphwalker/core/Status.java index 3168bdd7..159e6dfe 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/Status.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Status.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.core; import org.apache.log4j.Logger; diff --git a/graphwalker-core/src/main/java/org/graphwalker/Util.java b/graphwalker-core/src/main/java/org/graphwalker/core/Util.java similarity index 94% rename from graphwalker-core/src/main/java/org/graphwalker/Util.java rename to graphwalker-core/src/main/java/org/graphwalker/core/Util.java index 4cfd3115..1fbf5772 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/Util.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Util.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.core; import java.io.*; import java.net.InetAddress; @@ -65,35 +65,35 @@ import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.log4j.Logger; import org.apache.log4j.PropertyConfigurator; -import org.graphwalker.conditions.AlternativeCondition; -import org.graphwalker.conditions.CombinationalCondition; -import org.graphwalker.conditions.EdgeCoverage; -import org.graphwalker.conditions.NeverCondition; -import org.graphwalker.conditions.ReachedEdge; -import org.graphwalker.conditions.ReachedRequirement; -import org.graphwalker.conditions.ReachedVertex; -import org.graphwalker.conditions.RequirementCoverage; -import org.graphwalker.conditions.StopCondition; -import org.graphwalker.conditions.TestCaseLength; -import org.graphwalker.conditions.TimeDuration; -import org.graphwalker.conditions.VertexCoverage; -import org.graphwalker.exceptions.GeneratorException; -import org.graphwalker.exceptions.StopConditionException; -import org.graphwalker.generators.A_StarPathGenerator; -import org.graphwalker.generators.AllPathPermutationsGenerator; -import org.graphwalker.generators.CodeGenerator; -import org.graphwalker.generators.CombinedPathGenerator; -import org.graphwalker.generators.ListGenerator; -import org.graphwalker.generators.NonOptimizedShortestPath; -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.generators.RandomPathGenerator; -import org.graphwalker.generators.RequirementsGenerator; -import org.graphwalker.graph.AbstractElement; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; -import org.graphwalker.io.PrintHTMLTestSequence; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.conditions.AlternativeCondition; +import org.graphwalker.core.conditions.CombinationalCondition; +import org.graphwalker.core.conditions.EdgeCoverage; +import org.graphwalker.core.conditions.NeverCondition; +import org.graphwalker.core.conditions.ReachedEdge; +import org.graphwalker.core.conditions.ReachedRequirement; +import org.graphwalker.core.conditions.ReachedVertex; +import org.graphwalker.core.conditions.RequirementCoverage; +import org.graphwalker.core.conditions.StopCondition; +import org.graphwalker.core.conditions.TestCaseLength; +import org.graphwalker.core.conditions.TimeDuration; +import org.graphwalker.core.conditions.VertexCoverage; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.exceptions.StopConditionException; +import org.graphwalker.core.generators.A_StarPathGenerator; +import org.graphwalker.core.generators.AllPathPermutationsGenerator; +import org.graphwalker.core.generators.CodeGenerator; +import org.graphwalker.core.generators.CombinedPathGenerator; +import org.graphwalker.core.generators.ListGenerator; +import org.graphwalker.core.generators.NonOptimizedShortestPath; +import org.graphwalker.core.generators.PathGenerator; +import org.graphwalker.core.generators.RandomPathGenerator; +import org.graphwalker.core.generators.RequirementsGenerator; +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.io.PrintHTMLTestSequence; +import org.graphwalker.core.machines.FiniteStateMachine; import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; @@ -308,7 +308,7 @@ public static StopCondition getCondition(final FiniteStateMachine machine, final return condition; } - protected static PathGenerator getGenerator(final int generatorType) throws GeneratorException { + public static PathGenerator getGenerator(final int generatorType) throws GeneratorException { PathGenerator generator = null; switch (generatorType) { @@ -383,7 +383,7 @@ public static ModelBasedTesting loadMbtAsWSFromXml(final File file) throws StopC * @throws JDOMException * @throws InterruptedException */ - protected static ModelBasedTesting loadMbtFromXml(final File file, final boolean dryRun) throws StopConditionException, + public static ModelBasedTesting loadMbtFromXml(final File file, final boolean dryRun) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { return loadXml(file, false, dryRun, false); } @@ -931,7 +931,7 @@ private static StopCondition getCondition(final FiniteStateMachine machine, fina return stopCondition; } - protected static String readFile(final File file) throws IOException { + public static String readFile(final File file) throws IOException { StringBuilder stringBuilder = new StringBuilder(); FileReader reader = null; try { @@ -951,7 +951,7 @@ protected static String readFile(final File file) throws IOException { return stringBuilder.toString(); } - protected static char getInput() { + public static char getInput() { char c = 0; try { while (c != '0' && c != '1' && c != '2') { @@ -982,7 +982,7 @@ public static Object[] shuffle(final Object[] array) { return array; } - protected static InetAddress getInternetAddr(final String nic) { + public static InetAddress getInternetAddr(final String nic) { // Find the real network interface NetworkInterface iface = null; InetAddress ia = null; @@ -1078,7 +1078,7 @@ public static void logStackTraceToError(final Exception e) { Util.logger.error(sw.toString()); } - protected static void logStackTraceToError(final Throwable t) { + public static void logStackTraceToError(final Throwable t) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); t.printStackTrace(pw); diff --git a/graphwalker-core/src/main/java/org/graphwalker/conditions/AlternativeCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java similarity index 94% rename from graphwalker-core/src/main/java/org/graphwalker/conditions/AlternativeCondition.java rename to graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java index eb7f5844..7db4c9e7 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/conditions/AlternativeCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,12 +46,12 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; import java.util.Iterator; import java.util.Vector; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.machines.FiniteStateMachine; public class AlternativeCondition extends StopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/conditions/CombinationalCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java similarity index 94% rename from graphwalker-core/src/main/java/org/graphwalker/conditions/CombinationalCondition.java rename to graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java index 8db1a550..fc3067c9 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/conditions/CombinationalCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,12 +46,12 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; import java.util.Iterator; import java.util.Vector; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.machines.FiniteStateMachine; public class CombinationalCondition extends StopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/conditions/EdgeCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java similarity index 93% rename from graphwalker-core/src/main/java/org/graphwalker/conditions/EdgeCoverage.java rename to graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java index efe1f357..ded9c921 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/conditions/EdgeCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,11 +46,11 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; import org.apache.log4j.Logger; -import org.graphwalker.Util; -import org.graphwalker.exceptions.StopConditionException; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.StopConditionException; public class EdgeCoverage extends StopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/conditions/NeverCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java similarity index 95% rename from graphwalker-core/src/main/java/org/graphwalker/conditions/NeverCondition.java rename to graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java index 649be094..b2377757 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/conditions/NeverCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; public class NeverCondition extends StopCondition { public NeverCondition() { diff --git a/graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedEdge.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java similarity index 94% rename from graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedEdge.java rename to graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java index 327765b5..8592c487 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedEdge.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,12 +46,12 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; import java.util.ArrayList; -import org.graphwalker.graph.Edge; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.machines.FiniteStateMachine; public class ReachedEdge extends StopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedRequirement.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java similarity index 96% rename from graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedRequirement.java rename to graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java index f349fa5e..f28a6e80 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedRequirement.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; import java.util.Arrays; import java.util.Collection; diff --git a/graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedVertex.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java similarity index 92% rename from graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedVertex.java rename to graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java index fa53dec9..c25a173d 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/conditions/ReachedVertex.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,17 +46,17 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; import java.util.ArrayList; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.log4j.Logger; -import org.graphwalker.Util; -import org.graphwalker.graph.Vertex; -import org.graphwalker.machines.ExtendedFiniteStateMachine; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.Util; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.machines.ExtendedFiniteStateMachine; +import org.graphwalker.core.machines.FiniteStateMachine; public class ReachedVertex extends StopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/conditions/RequirementCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java similarity index 95% rename from graphwalker-core/src/main/java/org/graphwalker/conditions/RequirementCoverage.java rename to graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java index 9b307283..59c03f76 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/conditions/RequirementCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,9 +46,9 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; -import org.graphwalker.Util; +import org.graphwalker.core.Util; public class RequirementCoverage extends StopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/conditions/StopCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java similarity index 94% rename from graphwalker-core/src/main/java/org/graphwalker/conditions/StopCondition.java rename to graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java index e8cdd012..f1ff014f 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/conditions/StopCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,9 +46,9 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.machines.FiniteStateMachine; public abstract class StopCondition { protected FiniteStateMachine machine; diff --git a/graphwalker-core/src/main/java/org/graphwalker/conditions/TestCaseLength.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java similarity index 96% rename from graphwalker-core/src/main/java/org/graphwalker/conditions/TestCaseLength.java rename to graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java index b54bdba7..3c390632 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/conditions/TestCaseLength.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; public class TestCaseLength extends StopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/conditions/TimeDuration.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java similarity index 95% rename from graphwalker-core/src/main/java/org/graphwalker/conditions/TimeDuration.java rename to graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java index 003b2801..965185ec 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/conditions/TimeDuration.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; /** * Stops test execution after a certain amount of time has passed. diff --git a/graphwalker-core/src/main/java/org/graphwalker/conditions/VertexCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java similarity index 94% rename from graphwalker-core/src/main/java/org/graphwalker/conditions/VertexCoverage.java rename to graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java index e59f5d04..d87ccc14 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/conditions/VertexCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,9 +46,9 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; -import org.graphwalker.exceptions.StopConditionException; +import org.graphwalker.core.exceptions.StopConditionException; public class VertexCoverage extends StopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/events/AppEvent.java b/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java similarity index 98% rename from graphwalker-core/src/main/java/org/graphwalker/events/AppEvent.java rename to graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java index a0663b4f..525c9020 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/events/AppEvent.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.events; +package org.graphwalker.core.events; public interface AppEvent { diff --git a/graphwalker-core/src/main/java/org/graphwalker/events/MbtEvent.java b/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java similarity index 98% rename from graphwalker-core/src/main/java/org/graphwalker/events/MbtEvent.java rename to graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java index 54b02198..8c791073 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/events/MbtEvent.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.events; +package org.graphwalker.core.events; public interface MbtEvent { diff --git a/graphwalker-core/src/main/java/org/graphwalker/exceptions/FoundNoEdgeException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java similarity index 96% rename from graphwalker-core/src/main/java/org/graphwalker/exceptions/FoundNoEdgeException.java rename to graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java index f27619a7..be3fbe13 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/exceptions/FoundNoEdgeException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.exceptions; +package org.graphwalker.core.exceptions; /** * This exception is thrown during test sequence generation, when no out edge is diff --git a/graphwalker-core/src/main/java/org/graphwalker/exceptions/GeneratorException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java similarity index 98% rename from graphwalker-core/src/main/java/org/graphwalker/exceptions/GeneratorException.java rename to graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java index 69b0c2ac..788f6367 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/exceptions/GeneratorException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.exceptions; +package org.graphwalker.core.exceptions; public class GeneratorException extends Exception { private static final long serialVersionUID = -6355062559015580205L; diff --git a/graphwalker-core/src/main/java/org/graphwalker/exceptions/GuiStoppedExecution.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java similarity index 98% rename from graphwalker-core/src/main/java/org/graphwalker/exceptions/GuiStoppedExecution.java rename to graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java index 63f3ee05..058f01b0 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/exceptions/GuiStoppedExecution.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.exceptions; +package org.graphwalker.core.exceptions; /** * This exception indicats to MBT that GUI wants to stop execution of MBT diff --git a/graphwalker-core/src/main/java/org/graphwalker/exceptions/InvalidDataException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java similarity index 98% rename from graphwalker-core/src/main/java/org/graphwalker/exceptions/InvalidDataException.java rename to graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java index f0215b3e..78d75459 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/exceptions/InvalidDataException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.exceptions; +package org.graphwalker.core.exceptions; /** * This exception should be used whenever data extraction from the data space diff --git a/graphwalker-core/src/main/java/org/graphwalker/exceptions/StopConditionException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java similarity index 98% rename from graphwalker-core/src/main/java/org/graphwalker/exceptions/StopConditionException.java rename to graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java index 8e0dda1c..8f81e0ba 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/exceptions/StopConditionException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.exceptions; +package org.graphwalker.core.exceptions; /** * This exception should be used whenever there is something wrong with the stop diff --git a/graphwalker-core/src/main/java/org/graphwalker/filters/AccessableEdgeFilter.java b/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java similarity index 93% rename from graphwalker-core/src/main/java/org/graphwalker/filters/AccessableEdgeFilter.java rename to graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java index bad68567..e4493a58 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/filters/AccessableEdgeFilter.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,12 +46,12 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.filters; +package org.graphwalker.core.filters; import javax.script.ScriptEngine; import javax.script.ScriptException; -import org.graphwalker.graph.Edge; +import org.graphwalker.core.graph.Edge; import bsh.EvalError; import bsh.Interpreter; @@ -73,7 +73,7 @@ public AccessableEdgeFilter(Interpreter beanShellEngine) { this.beanShellEngine = beanShellEngine; } - public boolean acceptEdge(org.graphwalker.graph.Graph graph, Edge edge) { + public boolean acceptEdge(org.graphwalker.core.graph.Graph graph, Edge edge) { if (edge.getGuardKey().isEmpty()) { return true; } diff --git a/graphwalker-core/src/main/java/org/graphwalker/generators/A_StarPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java similarity index 93% rename from graphwalker-core/src/main/java/org/graphwalker/generators/A_StarPathGenerator.java rename to graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java index 3bc40299..b6527c03 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/generators/A_StarPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.generators; +package org.graphwalker.core.generators; import java.util.Comparator; import java.util.PriorityQueue; @@ -54,13 +54,12 @@ import java.util.Stack; import java.util.Vector; -import org.graphwalker.Util; -import org.graphwalker.conditions.StopCondition; -import org.graphwalker.exceptions.FoundNoEdgeException; -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Vertex; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.Util; +import org.graphwalker.core.conditions.StopCondition; +import org.graphwalker.core.exceptions.FoundNoEdgeException; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.machines.FiniteStateMachine; public class A_StarPathGenerator extends PathGenerator { diff --git a/graphwalker-core/src/main/java/org/graphwalker/generators/AllPathPermutationsGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java similarity index 94% rename from graphwalker-core/src/main/java/org/graphwalker/generators/AllPathPermutationsGenerator.java rename to graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java index d56ed75e..9b3f785b 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/generators/AllPathPermutationsGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.generators; +package org.graphwalker.core.generators; import java.util.ArrayList; import java.util.HashMap; @@ -56,10 +56,10 @@ import java.util.Set; import org.apache.log4j.Logger; -import org.graphwalker.Util; -import org.graphwalker.conditions.StopCondition; -import org.graphwalker.exceptions.FoundNoEdgeException; -import org.graphwalker.graph.Edge; +import org.graphwalker.core.Util; +import org.graphwalker.core.conditions.StopCondition; +import org.graphwalker.core.exceptions.FoundNoEdgeException; +import org.graphwalker.core.graph.Edge; /** * The generator generates paths through the model in a way that makes sure all diff --git a/graphwalker-core/src/main/java/org/graphwalker/generators/CodeGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java similarity index 95% rename from graphwalker-core/src/main/java/org/graphwalker/generators/CodeGenerator.java rename to graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java index d5ff9a91..f0ba6547 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/generators/CodeGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,9 +46,9 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.generators; +package org.graphwalker.core.generators; -import org.graphwalker.conditions.StopCondition; +import org.graphwalker.core.conditions.StopCondition; /** * Will generate code using a template. The code generated will contain all diff --git a/graphwalker-core/src/main/java/org/graphwalker/generators/CombinedPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java similarity index 93% rename from graphwalker-core/src/main/java/org/graphwalker/generators/CombinedPathGenerator.java rename to graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java index 556c3983..9169dfbc 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/generators/CombinedPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,13 +46,13 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.generators; +package org.graphwalker.core.generators; import java.util.Vector; import org.apache.log4j.Logger; -import org.graphwalker.conditions.StopCondition; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.conditions.StopCondition; +import org.graphwalker.core.machines.FiniteStateMachine; public class CombinedPathGenerator extends PathGenerator { diff --git a/graphwalker-core/src/main/java/org/graphwalker/generators/ListGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java similarity index 91% rename from graphwalker-core/src/main/java/org/graphwalker/generators/ListGenerator.java rename to graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java index ebd66083..c6364b08 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/generators/ListGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,17 +46,17 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.generators; +package org.graphwalker.core.generators; import java.util.Comparator; import java.util.Stack; import java.util.TreeSet; import java.util.Vector; -import org.graphwalker.Keywords; -import org.graphwalker.conditions.StopCondition; -import org.graphwalker.graph.AbstractElement; -import org.graphwalker.graph.Edge; +import org.graphwalker.core.Keywords; +import org.graphwalker.core.conditions.StopCondition; +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Edge; public class ListGenerator extends PathGenerator { diff --git a/graphwalker-core/src/main/java/org/graphwalker/generators/NonOptimizedShortestPath.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java similarity index 96% rename from graphwalker-core/src/main/java/org/graphwalker/generators/NonOptimizedShortestPath.java rename to graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java index f2805006..92265b13 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/generators/NonOptimizedShortestPath.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java @@ -46,16 +46,16 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.generators; +package org.graphwalker.core.generators; import java.util.List; import java.util.Vector; import org.apache.log4j.Logger; -import org.graphwalker.Util; -import org.graphwalker.conditions.StopCondition; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Vertex; +import org.graphwalker.core.Util; +import org.graphwalker.core.conditions.StopCondition; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Vertex; import edu.uci.ics.jung.algorithms.shortestpath.DijkstraShortestPath; diff --git a/graphwalker-core/src/main/java/org/graphwalker/generators/PathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java similarity index 91% rename from graphwalker-core/src/main/java/org/graphwalker/generators/PathGenerator.java rename to graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java index eac0c78f..0cdcf686 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/generators/PathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,14 +46,14 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.generators; +package org.graphwalker.core.generators; import java.util.Set; -import org.graphwalker.conditions.StopCondition; -import org.graphwalker.exceptions.FoundNoEdgeException; -import org.graphwalker.graph.Edge; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.conditions.StopCondition; +import org.graphwalker.core.exceptions.FoundNoEdgeException; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.machines.FiniteStateMachine; public abstract class PathGenerator { private FiniteStateMachine machine; diff --git a/graphwalker-core/src/main/java/org/graphwalker/generators/RandomPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java similarity index 92% rename from graphwalker-core/src/main/java/org/graphwalker/generators/RandomPathGenerator.java rename to graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java index a5a4ea3a..c0643187 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/generators/RandomPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,15 +46,15 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.generators; +package org.graphwalker.core.generators; import java.util.*; import org.apache.log4j.Logger; -import org.graphwalker.Util; -import org.graphwalker.conditions.StopCondition; -import org.graphwalker.exceptions.FoundNoEdgeException; -import org.graphwalker.graph.Edge; +import org.graphwalker.core.Util; +import org.graphwalker.core.conditions.StopCondition; +import org.graphwalker.core.exceptions.FoundNoEdgeException; +import org.graphwalker.core.graph.Edge; public class RandomPathGenerator extends PathGenerator { diff --git a/graphwalker-core/src/main/java/org/graphwalker/generators/RequirementsGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java similarity index 96% rename from graphwalker-core/src/main/java/org/graphwalker/generators/RequirementsGenerator.java rename to graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java index eb12e3cb..acb769de 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/generators/RequirementsGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.generators; +package org.graphwalker.core.generators; import java.util.Comparator; import java.util.Iterator; @@ -54,8 +54,8 @@ import java.util.TreeSet; import java.util.Vector; -import org.graphwalker.conditions.StopCondition; -import org.graphwalker.graph.AbstractElement; +import org.graphwalker.core.conditions.StopCondition; +import org.graphwalker.core.graph.AbstractElement; public class RequirementsGenerator extends PathGenerator { diff --git a/graphwalker-core/src/main/java/org/graphwalker/graph/AbstractElement.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java similarity index 99% rename from graphwalker-core/src/main/java/org/graphwalker/graph/AbstractElement.java rename to graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java index f3277136..d13328c4 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/graph/AbstractElement.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java @@ -46,14 +46,14 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.graph; +package org.graphwalker.core.graph; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.log4j.Logger; -import org.graphwalker.Keywords; -import org.graphwalker.Util; +import org.graphwalker.core.Keywords; +import org.graphwalker.core.Util; public class AbstractElement { diff --git a/graphwalker-core/src/main/java/org/graphwalker/graph/Edge.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java similarity index 98% rename from graphwalker-core/src/main/java/org/graphwalker/graph/Edge.java rename to graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java index 99ddfe87..c1579a52 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/graph/Edge.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java @@ -46,12 +46,12 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.graph; +package org.graphwalker.core.graph; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.graphwalker.Keywords; +import org.graphwalker.core.Keywords; public class Edge extends AbstractElement { diff --git a/graphwalker-core/src/main/java/org/graphwalker/graph/Graph.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java similarity index 98% rename from graphwalker-core/src/main/java/org/graphwalker/graph/Graph.java rename to graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java index a831c8d8..fccf0810 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/graph/Graph.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java @@ -46,12 +46,12 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.graph; +package org.graphwalker.core.graph; import edu.uci.ics.jung.graph.SparseMultigraph; import edu.uci.ics.jung.graph.util.EdgeType; import org.apache.log4j.Logger; -import org.graphwalker.Util; +import org.graphwalker.core.Util; public class Graph extends SparseMultigraph { diff --git a/graphwalker-core/src/main/java/org/graphwalker/graph/Vertex.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java similarity index 98% rename from graphwalker-core/src/main/java/org/graphwalker/graph/Vertex.java rename to graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java index 88754722..6b7c1058 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/graph/Vertex.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.graph; +package org.graphwalker.core.graph; import java.awt.Color; import java.awt.geom.Point2D; @@ -54,8 +54,8 @@ import java.util.regex.Pattern; import org.apache.log4j.Logger; -import org.graphwalker.Keywords; -import org.graphwalker.Util; +import org.graphwalker.core.Keywords; +import org.graphwalker.core.Util; public class Vertex extends AbstractElement { diff --git a/graphwalker-core/src/main/java/org/graphwalker/io/AbstractModelHandler.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java similarity index 94% rename from graphwalker-core/src/main/java/org/graphwalker/io/AbstractModelHandler.java rename to graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java index 4dc44cac..4e464928 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/io/AbstractModelHandler.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,11 +46,11 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.io; +package org.graphwalker.core.io; import java.io.PrintStream; -import org.graphwalker.graph.Graph; +import org.graphwalker.core.graph.Graph; public abstract class AbstractModelHandler { diff --git a/graphwalker-core/src/main/java/org/graphwalker/io/GraphML.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java similarity index 99% rename from graphwalker-core/src/main/java/org/graphwalker/io/GraphML.java rename to graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java index b605b94f..604cbfd7 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/io/GraphML.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.io; +package org.graphwalker.core.io; import java.awt.Color; import java.awt.geom.Point2D; @@ -59,12 +59,12 @@ import java.util.Vector; import org.apache.log4j.Logger; -import org.graphwalker.Keywords; -import org.graphwalker.Util; -import org.graphwalker.graph.AbstractElement; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; +import org.graphwalker.core.Keywords; +import org.graphwalker.core.Util; +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; import org.jdom.Document; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; @@ -121,7 +121,7 @@ public GraphML() { * Reads one single graph, or a folder containing several graphs to be merged * into one graph. * - * @see org.graphwalker.io.AbstractModelHandler#load(java.lang.String) + * @see org.graphwalker.core.io.AbstractModelHandler#load(java.lang.String) * @param fileOrfolder * The gramphml file or folder. */ diff --git a/graphwalker-core/src/main/java/org/graphwalker/io/ParseLog.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java similarity index 98% rename from graphwalker-core/src/main/java/org/graphwalker/io/ParseLog.java rename to graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java index d4386858..35998b45 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/io/ParseLog.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java @@ -46,9 +46,9 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.io; +package org.graphwalker.core.io; -import org.graphwalker.Util; +import org.graphwalker.core.Util; import java.io.BufferedReader; import java.io.File; diff --git a/graphwalker-core/src/main/java/org/graphwalker/io/PrintHTMLTestSequence.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java similarity index 99% rename from graphwalker-core/src/main/java/org/graphwalker/io/PrintHTMLTestSequence.java rename to graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java index d1fb226c..73e117c2 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/io/PrintHTMLTestSequence.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.io; +package org.graphwalker.core.io; import java.io.PrintStream; import java.util.Vector; diff --git a/graphwalker-core/src/main/java/org/graphwalker/machines/ExtendedFiniteStateMachine.java b/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java similarity index 94% rename from graphwalker-core/src/main/java/org/graphwalker/machines/ExtendedFiniteStateMachine.java rename to graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java index 7d3421a1..a0731ef3 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/machines/ExtendedFiniteStateMachine.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.machines; +package org.graphwalker.core.machines; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -69,11 +69,11 @@ import javax.script.ScriptException; import org.apache.log4j.Logger; -import org.graphwalker.Util; -import org.graphwalker.exceptions.FoundNoEdgeException; -import org.graphwalker.exceptions.InvalidDataException; -import org.graphwalker.filters.AccessableEdgeFilter; -import org.graphwalker.graph.Edge; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.FoundNoEdgeException; +import org.graphwalker.core.exceptions.InvalidDataException; +import org.graphwalker.core.filters.AccessableEdgeFilter; +import org.graphwalker.core.graph.Edge; import bsh.EvalError; import bsh.Interpreter; diff --git a/graphwalker-core/src/main/java/org/graphwalker/machines/FiniteStateMachine.java b/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java similarity index 94% rename from graphwalker-core/src/main/java/org/graphwalker/machines/FiniteStateMachine.java rename to graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java index ffe8ed78..be2f3d86 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/machines/FiniteStateMachine.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.machines; +package org.graphwalker.core.machines; import java.util.Collection; import java.util.Collections; @@ -60,13 +60,13 @@ import java.util.Vector; import org.apache.log4j.Logger; -import org.graphwalker.Keywords; -import org.graphwalker.Util; -import org.graphwalker.exceptions.FoundNoEdgeException; -import org.graphwalker.graph.AbstractElement; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; +import org.graphwalker.core.Keywords; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.FoundNoEdgeException; +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; /** * @author Johan Tejle diff --git a/graphwalker-core/src/main/java/org/graphwalker/multipleModels/ModelAPI.java b/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelAPI.java similarity index 89% rename from graphwalker-core/src/main/java/org/graphwalker/multipleModels/ModelAPI.java rename to graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelAPI.java index e89292ec..92c70670 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/multipleModels/ModelAPI.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelAPI.java @@ -1,32 +1,32 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ -package org.graphwalker.multipleModels; +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker.core.multipleModels; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.generators.PathGenerator; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.generators.PathGenerator; /** * @author krikar Any test should extend this class. diff --git a/graphwalker-core/src/main/java/org/graphwalker/multipleModels/ModelHandler.java b/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelHandler.java similarity index 97% rename from graphwalker-core/src/main/java/org/graphwalker/multipleModels/ModelHandler.java rename to graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelHandler.java index 3d942d07..998fadd0 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/multipleModels/ModelHandler.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelHandler.java @@ -46,18 +46,18 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package org.graphwalker.multipleModels; +package org.graphwalker.core.multipleModels; import java.util.ArrayList; import java.util.Random; import org.apache.log4j.Logger; -import org.graphwalker.Keywords; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.Util; -import org.graphwalker.conditions.NeverCondition; -import org.graphwalker.generators.RandomPathGenerator; -import org.graphwalker.graph.Graph; +import org.graphwalker.core.Keywords; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.Util; +import org.graphwalker.core.conditions.NeverCondition; +import org.graphwalker.core.generators.RandomPathGenerator; +import org.graphwalker.core.graph.Graph; /** * The ModelHandler handles multiple models. The basic workflow using this class diff --git a/graphwalker-core/src/main/java/org/graphwalker/statistics/EdgeCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java similarity index 92% rename from graphwalker-core/src/main/java/org/graphwalker/statistics/EdgeCoverageStatistics.java rename to graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java index ba75dbc2..ea0fa860 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/statistics/EdgeCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,13 +46,13 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.statistics; +package org.graphwalker.core.statistics; import java.util.HashSet; -import org.graphwalker.graph.AbstractElement; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; /** * @author Johan Tejle diff --git a/graphwalker-core/src/main/java/org/graphwalker/statistics/EdgeSequenceCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java similarity index 93% rename from graphwalker-core/src/main/java/org/graphwalker/statistics/EdgeSequenceCoverageStatistics.java rename to graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java index acaa6faa..d250d2d3 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/statistics/EdgeSequenceCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,14 +46,14 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.statistics; +package org.graphwalker.core.statistics; import java.util.HashSet; import java.util.Stack; -import org.graphwalker.graph.AbstractElement; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; /** * @author Johan Tejle diff --git a/graphwalker-core/src/main/java/org/graphwalker/statistics/RequirementCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java similarity index 93% rename from graphwalker-core/src/main/java/org/graphwalker/statistics/RequirementCoverageStatistics.java rename to graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java index 9080e0ce..31741bbf 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/statistics/RequirementCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,14 +46,14 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.statistics; +package org.graphwalker.core.statistics; import java.util.Collections; import java.util.HashSet; import java.util.Vector; -import org.graphwalker.graph.AbstractElement; -import org.graphwalker.graph.Graph; +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Graph; /** * @author Johan Tejle diff --git a/graphwalker-core/src/main/java/org/graphwalker/statistics/Statistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java similarity index 94% rename from graphwalker-core/src/main/java/org/graphwalker/statistics/Statistics.java rename to graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java index 1cb4c452..ff3766db 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/statistics/Statistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,9 +46,9 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.statistics; +package org.graphwalker.core.statistics; -import org.graphwalker.graph.AbstractElement; +import org.graphwalker.core.graph.AbstractElement; /** * @author Johan Tejle diff --git a/graphwalker-core/src/main/java/org/graphwalker/statistics/VertexCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java similarity index 92% rename from graphwalker-core/src/main/java/org/graphwalker/statistics/VertexCoverageStatistics.java rename to graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java index 5e7d9b2c..84351807 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/statistics/VertexCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,13 +46,13 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.statistics; +package org.graphwalker.core.statistics; import java.util.HashSet; -import org.graphwalker.graph.AbstractElement; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; /** * @author Johan Tejle diff --git a/graphwalker-core/src/test/java/org/graphwalker/ExtendedFiniteStateMachineTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/ExtendedFiniteStateMachineTest.java similarity index 92% rename from graphwalker-core/src/test/java/org/graphwalker/ExtendedFiniteStateMachineTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/ExtendedFiniteStateMachineTest.java index 063f512c..6df2338e 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/ExtendedFiniteStateMachineTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/ExtendedFiniteStateMachineTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,13 +46,13 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.core; -import org.graphwalker.Util; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; -import org.graphwalker.machines.ExtendedFiniteStateMachine; +import org.graphwalker.core.Util; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.machines.ExtendedFiniteStateMachine; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/FiniteStateMachineTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/FiniteStateMachineTest.java similarity index 92% rename from graphwalker-core/src/test/java/org/graphwalker/FiniteStateMachineTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/FiniteStateMachineTest.java index 125dc6db..28ec611a 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/FiniteStateMachineTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/FiniteStateMachineTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,13 +46,13 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.core; -import org.graphwalker.Util; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.Util; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.machines.FiniteStateMachine; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/KeywordsTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/KeywordsTest.java similarity index 96% rename from graphwalker-core/src/test/java/org/graphwalker/KeywordsTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/KeywordsTest.java index a8fff176..3d01830b 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/KeywordsTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/KeywordsTest.java @@ -46,11 +46,11 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.core; -import org.graphwalker.Keywords; -import org.graphwalker.exceptions.GeneratorException; -import org.graphwalker.exceptions.StopConditionException; +import org.graphwalker.core.Keywords; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.exceptions.StopConditionException; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/ModelBasedTestingTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/ModelBasedTestingTest.java similarity index 96% rename from graphwalker-core/src/test/java/org/graphwalker/ModelBasedTestingTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/ModelBasedTestingTest.java index 22f75c82..b37e4ee9 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/ModelBasedTestingTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/ModelBasedTestingTest.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.core; import java.awt.GraphicsEnvironment; import java.io.ByteArrayOutputStream; @@ -57,13 +57,13 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.graphwalker.Keywords; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.Util; -import org.graphwalker.exceptions.GeneratorException; -import org.graphwalker.exceptions.InvalidDataException; -import org.graphwalker.exceptions.StopConditionException; -import org.graphwalker.generators.NonOptimizedShortestPath; +import org.graphwalker.core.Keywords; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.exceptions.InvalidDataException; +import org.graphwalker.core.exceptions.StopConditionException; +import org.graphwalker.core.generators.NonOptimizedShortestPath; import org.jdom.JDOMException; import junit.framework.TestCase; @@ -239,7 +239,7 @@ public void testNewState() throws StopConditionException, InterruptedException { mbt.enableExtended(false); mbt.setWeighted(false); NonOptimizedShortestPath generator = new NonOptimizedShortestPath(Util.getCondition(mbt.getMachine(), Keywords.CONDITION_EDGE_COVERAGE, - "100")); + "100")); mbt.setGenerator(generator); String[] pair = mbt.getNextStep(); diff --git a/graphwalker-core/src/test/java/org/graphwalker/MultipleModelsTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/MultipleModelsTest.java similarity index 94% rename from graphwalker-core/src/test/java/org/graphwalker/MultipleModelsTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/MultipleModelsTest.java index 080381af..ec8dff36 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/MultipleModelsTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/MultipleModelsTest.java @@ -1,29 +1,29 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ -package org.graphwalker; +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker.core; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -38,11 +38,11 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.MultipleModels; -import org.graphwalker.Util; -import org.graphwalker.exceptions.GeneratorException; -import org.graphwalker.exceptions.StopConditionException; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.MultipleModels; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.exceptions.StopConditionException; import org.jdom.JDOMException; import org.junit.Test; diff --git a/graphwalker-core/src/test/java/org/graphwalker/RequirementVariableTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/RequirementVariableTest.java similarity index 92% rename from graphwalker-core/src/test/java/org/graphwalker/RequirementVariableTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/RequirementVariableTest.java index 091cbcad..775e8b8e 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/RequirementVariableTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/RequirementVariableTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,15 +46,16 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.core; -import org.graphwalker.Util; -import org.graphwalker.conditions.TestCaseLength; -import org.graphwalker.generators.RandomPathGenerator; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.Util; +import org.graphwalker.core.conditions.TestCaseLength; +import org.graphwalker.core.generators.RandomPathGenerator; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.machines.FiniteStateMachine; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/StatisticsManagerTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/StatisticsManagerTest.java similarity index 95% rename from graphwalker-core/src/test/java/org/graphwalker/StatisticsManagerTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/StatisticsManagerTest.java index bd237ab4..9be54a32 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/StatisticsManagerTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/StatisticsManagerTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,20 +46,20 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.core; import java.io.ByteArrayOutputStream; import java.io.PrintStream; -import org.graphwalker.StatisticsManager; -import org.graphwalker.Util; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; -import org.graphwalker.statistics.EdgeCoverageStatistics; -import org.graphwalker.statistics.EdgeSequenceCoverageStatistics; -import org.graphwalker.statistics.RequirementCoverageStatistics; -import org.graphwalker.statistics.VertexCoverageStatistics; +import org.graphwalker.core.StatisticsManager; +import org.graphwalker.core.Util; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.statistics.EdgeCoverageStatistics; +import org.graphwalker.core.statistics.EdgeSequenceCoverageStatistics; +import org.graphwalker.core.statistics.RequirementCoverageStatistics; +import org.graphwalker.core.statistics.VertexCoverageStatistics; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/UtilTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/UtilTest.java similarity index 95% rename from graphwalker-core/src/test/java/org/graphwalker/UtilTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/UtilTest.java index b16addbf..21937c2c 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/UtilTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/UtilTest.java @@ -46,13 +46,12 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.core; import org.apache.log4j.Logger; -import org.graphwalker.Util; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/conditions/AlternativeConditionTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/AlternativeConditionTest.java similarity index 94% rename from graphwalker-core/src/test/java/org/graphwalker/conditions/AlternativeConditionTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/conditions/AlternativeConditionTest.java index 4cc06620..a32a145e 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/conditions/AlternativeConditionTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/AlternativeConditionTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,10 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; - -import org.graphwalker.conditions.AlternativeCondition; -import org.graphwalker.conditions.NeverCondition; +package org.graphwalker.core.conditions; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/conditions/CombinationalConditionTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/CombinationalConditionTest.java similarity index 93% rename from graphwalker-core/src/test/java/org/graphwalker/conditions/CombinationalConditionTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/conditions/CombinationalConditionTest.java index 6c0a4914..357ef2b2 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/conditions/CombinationalConditionTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/CombinationalConditionTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,10 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; - -import org.graphwalker.conditions.CombinationalCondition; -import org.graphwalker.conditions.NeverCondition; +package org.graphwalker.core.conditions; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/conditions/EdgeCoverageTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/EdgeCoverageTest.java similarity index 88% rename from graphwalker-core/src/test/java/org/graphwalker/conditions/EdgeCoverageTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/conditions/EdgeCoverageTest.java index faa52eb0..39f9f5a2 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/conditions/EdgeCoverageTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/EdgeCoverageTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,17 +46,16 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.Util; -import org.graphwalker.conditions.EdgeCoverage; -import org.graphwalker.exceptions.GeneratorException; -import org.graphwalker.exceptions.StopConditionException; -import org.graphwalker.generators.RandomPathGenerator; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.exceptions.StopConditionException; +import org.graphwalker.core.generators.RandomPathGenerator; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedEdgeTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedEdgeTest.java similarity index 89% rename from graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedEdgeTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedEdgeTest.java index faef8852..671ef705 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedEdgeTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedEdgeTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,16 +46,15 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.Util; -import org.graphwalker.conditions.ReachedEdge; -import org.graphwalker.exceptions.GeneratorException; -import org.graphwalker.generators.RandomPathGenerator; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.generators.RandomPathGenerator; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedRequirementTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedRequirementTest.java similarity index 90% rename from graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedRequirementTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedRequirementTest.java index d78f769b..9e894945 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedRequirementTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedRequirementTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,16 +46,15 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.Util; -import org.graphwalker.conditions.ReachedRequirement; -import org.graphwalker.exceptions.GeneratorException; -import org.graphwalker.generators.RandomPathGenerator; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.generators.RandomPathGenerator; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedStateTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedStateTest.java similarity index 89% rename from graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedStateTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedStateTest.java index f79a2c01..88774505 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/conditions/ReachedStateTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedStateTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,16 +46,15 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.Util; -import org.graphwalker.conditions.ReachedVertex; -import org.graphwalker.exceptions.GeneratorException; -import org.graphwalker.generators.RandomPathGenerator; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.generators.RandomPathGenerator; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/conditions/RequirementCoverageTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/RequirementCoverageTest.java similarity index 90% rename from graphwalker-core/src/test/java/org/graphwalker/conditions/RequirementCoverageTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/conditions/RequirementCoverageTest.java index aacffcaf..9e26d1bf 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/conditions/RequirementCoverageTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/RequirementCoverageTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,16 +46,15 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.Util; -import org.graphwalker.conditions.RequirementCoverage; -import org.graphwalker.exceptions.GeneratorException; -import org.graphwalker.generators.RandomPathGenerator; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.generators.RandomPathGenerator; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/conditions/StateCoverageTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/StateCoverageTest.java similarity index 88% rename from graphwalker-core/src/test/java/org/graphwalker/conditions/StateCoverageTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/conditions/StateCoverageTest.java index 465d62d7..c8db4949 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/conditions/StateCoverageTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/StateCoverageTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,17 +46,16 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.Util; -import org.graphwalker.conditions.VertexCoverage; -import org.graphwalker.exceptions.GeneratorException; -import org.graphwalker.exceptions.StopConditionException; -import org.graphwalker.generators.RandomPathGenerator; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.exceptions.StopConditionException; +import org.graphwalker.core.generators.RandomPathGenerator; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/conditions/TestCaseLengthTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TestCaseLengthTest.java similarity index 89% rename from graphwalker-core/src/test/java/org/graphwalker/conditions/TestCaseLengthTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/conditions/TestCaseLengthTest.java index f0cd4fcc..3d11151b 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/conditions/TestCaseLengthTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TestCaseLengthTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,16 +46,15 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.Util; -import org.graphwalker.conditions.TestCaseLength; -import org.graphwalker.exceptions.GeneratorException; -import org.graphwalker.generators.RandomPathGenerator; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.generators.RandomPathGenerator; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/conditions/TimeDurationTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TimeDurationTest.java similarity index 90% rename from graphwalker-core/src/test/java/org/graphwalker/conditions/TimeDurationTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/conditions/TimeDurationTest.java index 8e8a891b..4d0f4b42 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/conditions/TimeDurationTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TimeDurationTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,17 +46,16 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.conditions; +package org.graphwalker.core.conditions; -import org.graphwalker.Keywords; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.Util; -import org.graphwalker.conditions.TimeDuration; -import org.graphwalker.exceptions.GeneratorException; -import org.graphwalker.generators.RandomPathGenerator; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; +import org.graphwalker.core.Keywords; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.generators.RandomPathGenerator; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/filters/AccessableEdgeFilterTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/filters/AccessableEdgeFilterTest.java similarity index 93% rename from graphwalker-core/src/test/java/org/graphwalker/filters/AccessableEdgeFilterTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/filters/AccessableEdgeFilterTest.java index 7586474b..cbfe4273 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/filters/AccessableEdgeFilterTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/filters/AccessableEdgeFilterTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,12 +46,11 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.filters; +package org.graphwalker.core.filters; -import org.graphwalker.filters.AccessableEdgeFilter; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; import bsh.EvalError; import bsh.Interpreter; diff --git a/graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMBeanShellTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMBeanShellTest.java similarity index 90% rename from graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMBeanShellTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMBeanShellTest.java index 1f0a6863..c4ea98a3 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMBeanShellTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMBeanShellTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,17 +46,15 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.generators; +package org.graphwalker.core.generators; -import org.graphwalker.Util; -import org.graphwalker.conditions.ReachedEdge; -import org.graphwalker.conditions.ReachedVertex; -import org.graphwalker.generators.A_StarPathGenerator; -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; -import org.graphwalker.machines.ExtendedFiniteStateMachine; +import org.graphwalker.core.Util; +import org.graphwalker.core.conditions.ReachedEdge; +import org.graphwalker.core.conditions.ReachedVertex; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.machines.ExtendedFiniteStateMachine; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMJavaScriptTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMJavaScriptTest.java similarity index 90% rename from graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMJavaScriptTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMJavaScriptTest.java index 626577c8..3d3784ca 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorEFSMJavaScriptTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMJavaScriptTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,17 +46,15 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.generators; +package org.graphwalker.core.generators; -import org.graphwalker.Util; -import org.graphwalker.conditions.ReachedEdge; -import org.graphwalker.conditions.ReachedVertex; -import org.graphwalker.generators.A_StarPathGenerator; -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; -import org.graphwalker.machines.ExtendedFiniteStateMachine; +import org.graphwalker.core.Util; +import org.graphwalker.core.conditions.ReachedEdge; +import org.graphwalker.core.conditions.ReachedVertex; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.machines.ExtendedFiniteStateMachine; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorFSMTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorFSMTest.java similarity index 89% rename from graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorFSMTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorFSMTest.java index 70b90bd1..e308ece3 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/generators/A_StarPathGeneratorFSMTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorFSMTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,17 +46,15 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.generators; +package org.graphwalker.core.generators; -import org.graphwalker.Util; -import org.graphwalker.conditions.ReachedEdge; -import org.graphwalker.conditions.ReachedVertex; -import org.graphwalker.generators.A_StarPathGenerator; -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.Util; +import org.graphwalker.core.conditions.ReachedEdge; +import org.graphwalker.core.conditions.ReachedVertex; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.machines.FiniteStateMachine; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/generators/AllPathPermutationsGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/AllPathPermutationsGeneratorTest.java similarity index 85% rename from graphwalker-core/src/test/java/org/graphwalker/generators/AllPathPermutationsGeneratorTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/generators/AllPathPermutationsGeneratorTest.java index 040e7c4b..91559833 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/generators/AllPathPermutationsGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/AllPathPermutationsGeneratorTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,26 +46,22 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.generators; +package org.graphwalker.core.generators; import junit.framework.TestCase; import org.apache.log4j.Logger; -import org.graphwalker.Util; -import org.graphwalker.conditions.TestCaseLength; -import org.graphwalker.exceptions.StopConditionException; -import org.graphwalker.io.GraphML; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.Util; +import org.graphwalker.core.conditions.TestCaseLength; +import org.graphwalker.core.exceptions.StopConditionException; +import org.graphwalker.core.io.GraphML; +import org.graphwalker.core.machines.FiniteStateMachine; +import org.junit.Assert; -public class AllPathPermutationsGeneratorTest extends TestCase { +public class AllPathPermutationsGeneratorTest { //extends TestCase { private final Logger logger = Util.setupLogger(AllPathPermutationsGeneratorTest.class); - @Override - protected void setUp() throws Exception { - super.setUp(); - } - public void test_AllPathPermutationsGeneratior() throws StopConditionException, InterruptedException { logger.info("TEST: test_AllPathPermutationsGeneration"); logger.info("======================================================================="); @@ -85,7 +81,7 @@ public void test_AllPathPermutationsGeneratior() throws StopConditionException, logger.debug("call( " + stepPair[0] + " ) then verify( " + stepPair[1] + " ) --> Edge coverage @ " + ec + "%"); } - assertEquals(3, ((AllPathPermutationsGenerator) pathGenerator).getDepth()); + Assert.assertEquals(3, ((AllPathPermutationsGenerator) pathGenerator).getDepth()); logger.debug("=============================="); } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/generators/CodeGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/CodeGeneratorTest.java similarity index 91% rename from graphwalker-core/src/test/java/org/graphwalker/generators/CodeGeneratorTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/generators/CodeGeneratorTest.java index 2d80a087..949e14fe 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/generators/CodeGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/CodeGeneratorTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,15 +46,14 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.generators; +package org.graphwalker.core.generators; import org.apache.log4j.Logger; -import org.graphwalker.Util; -import org.graphwalker.generators.CodeGenerator; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.Util; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.machines.FiniteStateMachine; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/generators/CombinedPathGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/CombinedPathGeneratorTest.java similarity index 89% rename from graphwalker-core/src/test/java/org/graphwalker/generators/CombinedPathGeneratorTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/generators/CombinedPathGeneratorTest.java index ead04bab..03c2019a 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/generators/CombinedPathGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/CombinedPathGeneratorTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -49,15 +49,12 @@ /** * */ -package org.graphwalker.generators; +package org.graphwalker.core.generators; -import org.graphwalker.Util; -import org.graphwalker.generators.CodeGenerator; -import org.graphwalker.generators.CombinedPathGenerator; -import org.graphwalker.generators.ListGenerator; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.Util; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.machines.FiniteStateMachine; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/generators/ListGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/ListGeneratorTest.java similarity index 90% rename from graphwalker-core/src/test/java/org/graphwalker/generators/ListGeneratorTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/generators/ListGeneratorTest.java index 93efffdc..70329827 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/generators/ListGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/ListGeneratorTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,15 +46,14 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.generators; +package org.graphwalker.core.generators; import org.apache.log4j.Logger; -import org.graphwalker.Util; -import org.graphwalker.generators.ListGenerator; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.Util; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.machines.FiniteStateMachine; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/generators/RandomPathGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/RandomPathGeneratorTest.java similarity index 90% rename from graphwalker-core/src/test/java/org/graphwalker/generators/RandomPathGeneratorTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/generators/RandomPathGeneratorTest.java index cc83598e..6e8e296f 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/generators/RandomPathGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/RandomPathGeneratorTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ //This file is part of the GraphWalker java package //The MIT License // @@ -46,16 +46,14 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.generators; +package org.graphwalker.core.generators; import org.apache.log4j.Logger; -import org.graphwalker.Util; -import org.graphwalker.conditions.EdgeCoverage; -import org.graphwalker.exceptions.StopConditionException; -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.generators.RandomPathGenerator; -import org.graphwalker.io.GraphML; -import org.graphwalker.machines.FiniteStateMachine; +import org.graphwalker.core.Util; +import org.graphwalker.core.conditions.EdgeCoverage; +import org.graphwalker.core.exceptions.StopConditionException; +import org.graphwalker.core.io.GraphML; +import org.graphwalker.core.machines.FiniteStateMachine; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/io/GraphMLTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/io/GraphMLTest.java similarity index 98% rename from graphwalker-core/src/test/java/org/graphwalker/io/GraphMLTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/io/GraphMLTest.java index c5370bf4..87772192 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/io/GraphMLTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/io/GraphMLTest.java @@ -46,13 +46,12 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker.io; +package org.graphwalker.core.io; -import org.graphwalker.ModelBasedTesting; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; -import org.graphwalker.io.GraphML; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; import junit.framework.TestCase; diff --git a/graphwalker-core/src/test/java/org/graphwalker/multiple/ModelHandlerTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/ModelHandlerTest.java similarity index 94% rename from graphwalker-core/src/test/java/org/graphwalker/multiple/ModelHandlerTest.java rename to graphwalker-core/src/test/java/org/graphwalker/core/multiple/ModelHandlerTest.java index f5b1b708..fd485186 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/multiple/ModelHandlerTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/ModelHandlerTest.java @@ -23,20 +23,20 @@ * THE SOFTWARE. * #L% */ -package org.graphwalker.multiple; +package org.graphwalker.core.multiple; import org.apache.log4j.Logger; -import org.graphwalker.Util; +import org.graphwalker.core.Util; import org.junit.Ignore; import org.junit.Test; import static org.junit.Assert.*; -import org.graphwalker.conditions.EdgeCoverage; -import org.graphwalker.conditions.NeverCondition; -import org.graphwalker.conditions.ReachedVertex; -import org.graphwalker.generators.RandomPathGenerator; -import org.graphwalker.multipleModels.ModelAPI; -import org.graphwalker.multipleModels.ModelHandler; +import org.graphwalker.core.conditions.EdgeCoverage; +import org.graphwalker.core.conditions.NeverCondition; +import org.graphwalker.core.conditions.ReachedVertex; +import org.graphwalker.core.generators.RandomPathGenerator; +import org.graphwalker.core.multipleModels.ModelAPI; +import org.graphwalker.core.multipleModels.ModelHandler; public class ModelHandlerTest { diff --git a/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_A1_API.java b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_A1_API.java similarity index 91% rename from graphwalker-core/src/test/java/org/graphwalker/multiple/Model_A1_API.java rename to graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_A1_API.java index dd279eb4..83a42dad 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_A1_API.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_A1_API.java @@ -23,10 +23,10 @@ * THE SOFTWARE. * #L% */ -package org.graphwalker.multiple; +package org.graphwalker.core.multiple; -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.multipleModels.ModelAPI; +import org.graphwalker.core.generators.PathGenerator; +import org.graphwalker.core.multipleModels.ModelAPI; /** * Hello world! diff --git a/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_A_API.java b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_A_API.java similarity index 92% rename from graphwalker-core/src/test/java/org/graphwalker/multiple/Model_A_API.java rename to graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_A_API.java index cbb26cef..dbdc6b23 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_A_API.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_A_API.java @@ -23,10 +23,10 @@ * THE SOFTWARE. * #L% */ -package org.graphwalker.multiple; +package org.graphwalker.core.multiple; -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.multipleModels.ModelAPI; +import org.graphwalker.core.generators.PathGenerator; +import org.graphwalker.core.multipleModels.ModelAPI; /** * Hello world! diff --git a/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_B1_API.java b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_B1_API.java similarity index 91% rename from graphwalker-core/src/test/java/org/graphwalker/multiple/Model_B1_API.java rename to graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_B1_API.java index 28ee0efd..1b5b8579 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_B1_API.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_B1_API.java @@ -23,10 +23,10 @@ * THE SOFTWARE. * #L% */ -package org.graphwalker.multiple; +package org.graphwalker.core.multiple; -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.multipleModels.ModelAPI; +import org.graphwalker.core.generators.PathGenerator; +import org.graphwalker.core.multipleModels.ModelAPI; /** * Hello world! diff --git a/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_B_API.java b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_B_API.java similarity index 91% rename from graphwalker-core/src/test/java/org/graphwalker/multiple/Model_B_API.java rename to graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_B_API.java index 776a4d1d..80c55962 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_B_API.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_B_API.java @@ -23,10 +23,10 @@ * THE SOFTWARE. * #L% */ -package org.graphwalker.multiple; +package org.graphwalker.core.multiple; -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.multipleModels.ModelAPI; +import org.graphwalker.core.generators.PathGenerator; +import org.graphwalker.core.multipleModels.ModelAPI; /** * Hello world! diff --git a/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_C_API.java b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_C_API.java similarity index 91% rename from graphwalker-core/src/test/java/org/graphwalker/multiple/Model_C_API.java rename to graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_C_API.java index 51fb868a..6112549a 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/multiple/Model_C_API.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_C_API.java @@ -23,10 +23,10 @@ * THE SOFTWARE. * #L% */ -package org.graphwalker.multiple; +package org.graphwalker.core.multiple; -import org.graphwalker.generators.PathGenerator; -import org.graphwalker.multipleModels.ModelAPI; +import org.graphwalker.core.generators.PathGenerator; +import org.graphwalker.core.multipleModels.ModelAPI; /** * Hello world! diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml index d2c4ab92..8743b0cf 100644 --- a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml @@ -27,7 +27,7 @@ - + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml index 1e75b023..688da140 100644 --- a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml @@ -27,7 +27,7 @@ - + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml index dce2c684..302312d9 100644 --- a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml @@ -27,7 +27,7 @@ - + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml index 2ec5035d..8b8bc0cc 100644 --- a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml @@ -27,7 +27,7 @@ - + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml index c414df40..ab4f103c 100644 --- a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml @@ -27,7 +27,7 @@ - + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml index c1928fec..6b23f747 100644 --- a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml @@ -27,7 +27,7 @@ - + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init5.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init5.xml index ce0e71c1..72056084 100644 --- a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init5.xml +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init5.xml @@ -24,11 +24,11 @@ THE SOFTWARE. #L% --> - - - - - - - - + + + + + + + + diff --git a/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java b/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java index a3684301..e6e1ecef 100644 --- a/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java +++ b/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java @@ -97,17 +97,21 @@ import org.apache.commons.collections15.Transformer; import org.apache.log4j.Logger; -import org.graphwalker.*; -import org.graphwalker.events.AppEvent; -import org.graphwalker.events.MbtEvent; -import org.graphwalker.exceptions.GeneratorException; -import org.graphwalker.exceptions.GuiStoppedExecution; -import org.graphwalker.exceptions.StopConditionException; -import org.graphwalker.graph.AbstractElement; -import org.graphwalker.graph.Edge; -import org.graphwalker.graph.Graph; -import org.graphwalker.graph.Vertex; -import org.graphwalker.io.ParseLog; +import org.graphwalker.core.Application; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.Status; +import org.graphwalker.core.Util; +import org.graphwalker.core.events.AppEvent; +import org.graphwalker.core.events.MbtEvent; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.exceptions.GuiStoppedExecution; +import org.graphwalker.core.exceptions.StopConditionException; +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.io.ParseLog; +import org.graphwalker.webservice.SoapServices; import org.jdom.JDOMException; import edu.uci.ics.jung.algorithms.layout.CircleLayout; diff --git a/graphwalker-standalone/pom.xml b/graphwalker-standalone/pom.xml index 73e23c61..4058e533 100644 --- a/graphwalker-standalone/pom.xml +++ b/graphwalker-standalone/pom.xml @@ -52,7 +52,7 @@ - org.graphwalker.CLI + org.graphwalker.cli.CLI diff --git a/graphwalker-webservice/pom.xml b/graphwalker-webservice/pom.xml index f4a9b568..d6bab747 100644 --- a/graphwalker-webservice/pom.xml +++ b/graphwalker-webservice/pom.xml @@ -37,7 +37,7 @@ wsgen - org.graphwalker.SoapServices + org.graphwalker.webservice.SoapServices diff --git a/graphwalker-webservice/src/main/java/org/graphwalker/SoapServices.java b/graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServices.java similarity index 97% rename from graphwalker-webservice/src/main/java/org/graphwalker/SoapServices.java rename to graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServices.java index 48611fd5..d6c6ece8 100644 --- a/graphwalker-webservice/src/main/java/org/graphwalker/SoapServices.java +++ b/graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServices.java @@ -46,7 +46,7 @@ //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //THE SOFTWARE. -package org.graphwalker; +package org.graphwalker.webservice; import java.io.File; import java.util.Arrays; @@ -55,7 +55,9 @@ import javax.jws.WebService; import org.apache.log4j.Logger; -import org.graphwalker.exceptions.InvalidDataException; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.InvalidDataException; @WebService public class SoapServices { diff --git a/graphwalker-webservice/src/test/java/org/graphwalker/SoapServiceTest.java b/graphwalker-webservice/src/test/java/org/graphwalker/webservice/SoapServiceTest.java similarity index 91% rename from graphwalker-webservice/src/test/java/org/graphwalker/SoapServiceTest.java rename to graphwalker-webservice/src/test/java/org/graphwalker/webservice/SoapServiceTest.java index a2e5bf5c..12451e3b 100644 --- a/graphwalker-webservice/src/test/java/org/graphwalker/SoapServiceTest.java +++ b/graphwalker-webservice/src/test/java/org/graphwalker/webservice/SoapServiceTest.java @@ -23,8 +23,10 @@ * THE SOFTWARE. * #L% */ -package org.graphwalker; +package org.graphwalker.webservice; +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.webservice.SoapServices; import org.junit.Test; public class SoapServiceTest { From a883255d5f4a61a28839e81305a8964e21a214cb Mon Sep 17 00:00:00 2001 From: Nils Olsson Date: Fri, 21 Oct 2011 11:46:17 +0200 Subject: [PATCH 005/371] Added interface for stop conditions and removed old license headers, license headers is now handled by a maven plugin --- .../main/java/org/graphwalker/cli/CLI.java | 22 ---------- .../java/org/graphwalker/cli/CLITest.java | 22 ---------- .../org/graphwalker/cli/bugs/Issue_10.java | 22 ---------- .../org/graphwalker/cli/bugs/Issue_9.java | 22 ---------- .../graphwalker/core/EventDrivenModels.java | 22 ---------- .../org/graphwalker/core/ExtendedMain.java | 22 ---------- .../java/org/graphwalker/core/Keywords.java | 22 ---------- .../main/java/org/graphwalker/core/Model.java | 22 ---------- .../graphwalker/core/ModelBasedTesting.java | 22 ---------- .../graphwalker/core/StatisticsManager.java | 22 ---------- .../java/org/graphwalker/core/Status.java | 22 ---------- .../main/java/org/graphwalker/core/Util.java | 22 ---------- .../conditions/AbstractStopCondition.java | 41 +++++++++++++++++++ .../core/conditions/AlternativeCondition.java | 24 +---------- .../conditions/CombinationalCondition.java | 24 +---------- .../core/conditions/EdgeCoverage.java | 32 +++------------ .../core/conditions/NeverCondition.java | 25 +---------- .../core/conditions/ReachedEdge.java | 24 +---------- .../core/conditions/ReachedRequirement.java | 28 ++----------- .../core/conditions/ReachedVertex.java | 24 +---------- .../core/conditions/RequirementCoverage.java | 28 ++----------- .../core/conditions/StopCondition.java | 38 +++-------------- .../core/conditions/TestCaseLength.java | 28 ++----------- .../core/conditions/TimeDuration.java | 24 +---------- .../core/conditions/VertexCoverage.java | 32 +++------------ .../org/graphwalker/core/events/AppEvent.java | 22 ---------- .../org/graphwalker/core/events/MbtEvent.java | 22 ---------- .../core/exceptions/FoundNoEdgeException.java | 22 ---------- .../core/exceptions/GeneratorException.java | 22 ---------- .../core/exceptions/GuiStoppedExecution.java | 22 ---------- .../core/exceptions/InvalidDataException.java | 22 ---------- .../exceptions/StopConditionException.java | 22 ---------- .../core/filters/AccessableEdgeFilter.java | 22 ---------- .../core/generators/A_StarPathGenerator.java | 22 ---------- .../AllPathPermutationsGenerator.java | 22 ---------- .../core/generators/CodeGenerator.java | 22 ---------- .../generators/CombinedPathGenerator.java | 22 ---------- .../core/generators/ListGenerator.java | 22 ---------- .../generators/NonOptimizedShortestPath.java | 22 ---------- .../core/generators/PathGenerator.java | 22 ---------- .../core/generators/RandomPathGenerator.java | 22 ---------- .../generators/RequirementsGenerator.java | 22 ---------- .../core/graph/AbstractElement.java | 22 ---------- .../java/org/graphwalker/core/graph/Edge.java | 22 ---------- .../org/graphwalker/core/graph/Graph.java | 22 ---------- .../org/graphwalker/core/graph/Vertex.java | 22 ---------- .../core/io/AbstractModelHandler.java | 22 ---------- .../java/org/graphwalker/core/io/GraphML.java | 22 ---------- .../org/graphwalker/core/io/ParseLog.java | 22 ---------- .../core/io/PrintHTMLTestSequence.java | 22 ---------- .../machines/ExtendedFiniteStateMachine.java | 22 ---------- .../core/machines/FiniteStateMachine.java | 22 ---------- .../statistics/EdgeCoverageStatistics.java | 22 ---------- .../EdgeSequenceCoverageStatistics.java | 22 ---------- .../RequirementCoverageStatistics.java | 22 ---------- .../core/statistics/Statistics.java | 22 ---------- .../statistics/VertexCoverageStatistics.java | 22 ---------- .../core/ExtendedFiniteStateMachineTest.java | 22 ---------- .../core/FiniteStateMachineTest.java | 22 ---------- .../org/graphwalker/core/KeywordsTest.java | 22 ---------- .../core/ModelBasedTestingTest.java | 22 ---------- .../core/RequirementVariableTest.java | 22 ---------- .../core/StatisticsManagerTest.java | 22 ---------- .../java/org/graphwalker/core/UtilTest.java | 22 ---------- .../conditions/AlternativeConditionTest.java | 22 ---------- .../CombinationalConditionTest.java | 22 ---------- .../core/conditions/EdgeCoverageTest.java | 22 ---------- .../core/conditions/ReachedEdgeTest.java | 22 ---------- .../conditions/ReachedRequirementTest.java | 22 ---------- .../core/conditions/ReachedStateTest.java | 22 ---------- .../conditions/RequirementCoverageTest.java | 22 ---------- .../core/conditions/StateCoverageTest.java | 22 ---------- .../core/conditions/TestCaseLengthTest.java | 22 ---------- .../core/conditions/TimeDurationTest.java | 22 ---------- .../filters/AccessableEdgeFilterTest.java | 22 ---------- .../A_StarPathGeneratorEFSMBeanShellTest.java | 22 ---------- ...A_StarPathGeneratorEFSMJavaScriptTest.java | 22 ---------- .../A_StarPathGeneratorFSMTest.java | 22 ---------- .../AllPathPermutationsGeneratorTest.java | 22 ---------- .../core/generators/CodeGeneratorTest.java | 22 ---------- .../generators/CombinedPathGeneratorTest.java | 22 ---------- .../core/generators/ListGeneratorTest.java | 22 ---------- .../generators/RandomPathGeneratorTest.java | 22 ---------- .../org/graphwalker/core/io/GraphMLTest.java | 22 ---------- .../main/java/org/graphwalker/gui/App.java | 22 ---------- .../java/org/graphwalker/gui/StatusBar.java | 22 ---------- .../graphwalker/webservice/SoapServices.java | 22 ---------- 87 files changed, 73 insertions(+), 1927 deletions(-) create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/conditions/AbstractStopCondition.java diff --git a/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java b/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java index 0b30a3c5..2e8625fa 100644 --- a/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java +++ b/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.cli; diff --git a/graphwalker-cli/src/test/java/org/graphwalker/cli/CLITest.java b/graphwalker-cli/src/test/java/org/graphwalker/cli/CLITest.java index 8e87090a..2feb81a0 100644 --- a/graphwalker-cli/src/test/java/org/graphwalker/cli/CLITest.java +++ b/graphwalker-cli/src/test/java/org/graphwalker/cli/CLITest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.cli; diff --git a/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_10.java b/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_10.java index 37f20777..b0371e21 100644 --- a/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_10.java +++ b/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_10.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.cli.bugs; diff --git a/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_9.java b/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_9.java index b5eceb42..904d1341 100644 --- a/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_9.java +++ b/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_9.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.cli.bugs; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java b/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java index 1fed1aab..b49eb5e8 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java b/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java index e4a698fa..d3cd3d88 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. /** * diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java b/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java index 620a3612..d82a62bd 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Model.java b/graphwalker-core/src/main/java/org/graphwalker/core/Model.java index 4eb5f4e1..32011aec 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Model.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Model.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java b/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java index 34d31631..4419b780 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/StatisticsManager.java b/graphwalker-core/src/main/java/org/graphwalker/core/StatisticsManager.java index c7b0abca..9572af1a 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/StatisticsManager.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/StatisticsManager.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Status.java b/graphwalker-core/src/main/java/org/graphwalker/core/Status.java index 159e6dfe..c4f71f12 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Status.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Status.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Util.java b/graphwalker-core/src/main/java/org/graphwalker/core/Util.java index 1fbf5772..b339caba 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Util.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Util.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AbstractStopCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AbstractStopCondition.java new file mode 100644 index 00000000..c1c56130 --- /dev/null +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AbstractStopCondition.java @@ -0,0 +1,41 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker.core.conditions; + +import org.graphwalker.core.machines.FiniteStateMachine; + +public abstract class AbstractStopCondition implements StopCondition { + + private FiniteStateMachine machine; + + public FiniteStateMachine getMachine() { + return machine; + } + + public void setMachine(FiniteStateMachine machine) { + this.machine = machine; + } +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java index 7db4c9e7..76577ad4 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; @@ -53,7 +31,7 @@ import org.graphwalker.core.machines.FiniteStateMachine; -public class AlternativeCondition extends StopCondition { +public class AlternativeCondition extends AbstractStopCondition { private Vector conditions; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java index fc3067c9..4e2a8200 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; @@ -53,7 +31,7 @@ import org.graphwalker.core.machines.FiniteStateMachine; -public class CombinationalCondition extends StopCondition { +public class CombinationalCondition extends AbstractStopCondition { private Vector conditions; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java index ded9c921..bde28e97 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; @@ -52,7 +30,7 @@ import org.graphwalker.core.Util; import org.graphwalker.core.exceptions.StopConditionException; -public class EdgeCoverage extends StopCondition { +public class EdgeCoverage extends AbstractStopCondition { private double limit; static Logger logger = Util.setupLogger(EdgeCoverage.class); @@ -69,16 +47,16 @@ public EdgeCoverage(double limit) throws StopConditionException { @Override public boolean isFulfilled() { - double edges = machine.getAllEdges().size(); - double covered = machine.getNumOfCoveredEdges(); + double edges = getMachine().getAllEdges().size(); + double covered = getMachine().getNumOfCoveredEdges(); logger.debug("Edges/covered (limit): " + edges + "/" + covered + " (" + limit + ")"); return (covered / edges) >= limit; } @Override public double getFulfilment() { - double edges = machine.getAllEdges().size(); - double covered = machine.getNumOfCoveredEdges(); + double edges = getMachine().getAllEdges().size(); + double covered = getMachine().getNumOfCoveredEdges(); return (covered / edges) / limit; } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java index b2377757..eb35a2ba 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java @@ -23,32 +23,11 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; -public class NeverCondition extends StopCondition { +public class NeverCondition extends AbstractStopCondition { + public NeverCondition() { } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java index 8592c487..3078f746 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; @@ -53,7 +31,7 @@ import org.graphwalker.core.graph.Edge; import org.graphwalker.core.machines.FiniteStateMachine; -public class ReachedEdge extends StopCondition { +public class ReachedEdge extends AbstractStopCondition { private ArrayList allEdges; private Edge endEdge; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java index f28a6e80..9d04f268 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; @@ -52,7 +30,7 @@ import java.util.Collection; import java.util.HashSet; -public class ReachedRequirement extends StopCondition { +public class ReachedRequirement extends AbstractStopCondition { private Collection requirements; @@ -66,12 +44,12 @@ public ReachedRequirement(String requirements) { @Override public boolean isFulfilled() { - return machine.getCoveredRequirements().containsAll(requirements); + return getMachine().getCoveredRequirements().containsAll(requirements); } @Override public double getFulfilment() { - Collection covered = machine.getCoveredRequirements(); + Collection covered = getMachine().getCoveredRequirements(); covered.retainAll(requirements); return covered.size() / (double) requirements.size(); } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java index c25a173d..065fc3d1 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; @@ -58,7 +36,7 @@ import org.graphwalker.core.machines.ExtendedFiniteStateMachine; import org.graphwalker.core.machines.FiniteStateMachine; -public class ReachedVertex extends StopCondition { +public class ReachedVertex extends AbstractStopCondition { private static Logger logger = Util.setupLogger(ReachedVertex.class); private ArrayList allVertices; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java index 59c03f76..7f25c9dc 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java @@ -23,34 +23,12 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; import org.graphwalker.core.Util; -public class RequirementCoverage extends StopCondition { +public class RequirementCoverage extends AbstractStopCondition { private double limit; @@ -65,7 +43,7 @@ public RequirementCoverage(double limit) { @Override public boolean isFulfilled() { - int stats[] = machine.getStatistics(); + int stats[] = getMachine().getStatistics(); double requirements = stats[5]; double covered = stats[6]; return (covered / requirements) >= limit; @@ -73,7 +51,7 @@ public boolean isFulfilled() { @Override public double getFulfilment() { - int stats[] = machine.getStatistics(); + int stats[] = getMachine().getStatistics(); double requirements = stats[5]; double covered = stats[6]; return (covered / requirements) / limit; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java index f1ff014f..a83d66c9 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java @@ -23,51 +23,25 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; import org.graphwalker.core.machines.FiniteStateMachine; -public abstract class StopCondition { - protected FiniteStateMachine machine; +public interface StopCondition { - public FiniteStateMachine getMachine() { - return machine; - } - public void setMachine(FiniteStateMachine machine) { - this.machine = machine; - } + FiniteStateMachine getMachine(); + + void setMachine(FiniteStateMachine machine); /** * @return true if the condition is fulfilled */ - public abstract boolean isFulfilled(); + boolean isFulfilled(); /** * @return the condition fulfilment */ - public abstract double getFulfilment(); + double getFulfilment(); } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java index 3c390632..b4158636 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java @@ -23,38 +23,16 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; -public class TestCaseLength extends StopCondition { +public class TestCaseLength extends AbstractStopCondition { private int numberOfEdges; @Override public boolean isFulfilled() { - return machine.getNumberOfEdgesTravesed() >= numberOfEdges; + return getMachine().getNumberOfEdgesTravesed() >= numberOfEdges; } public TestCaseLength(int numberOfEdges) { @@ -63,7 +41,7 @@ public TestCaseLength(int numberOfEdges) { @Override public double getFulfilment() { - return machine.getNumberOfEdgesTravesed() / (double) numberOfEdges; + return getMachine().getNumberOfEdgesTravesed() / (double) numberOfEdges; } @Override diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java index 965185ec..0a6cb0e7 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; @@ -54,7 +32,7 @@ * @author Johan Tejle * */ -public class TimeDuration extends StopCondition { +public class TimeDuration extends AbstractStopCondition { private double duration; private double start_time; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java index d87ccc14..ee61aaf3 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java @@ -23,34 +23,12 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; import org.graphwalker.core.exceptions.StopConditionException; -public class VertexCoverage extends StopCondition { +public class VertexCoverage extends AbstractStopCondition { private double limit; @@ -67,15 +45,15 @@ public VertexCoverage(double limit) throws StopConditionException { @Override public boolean isFulfilled() { - double vertices = machine.getAllVertices().size(); - double covered = machine.getNumOfCoveredVertices(); + double vertices = getMachine().getAllVertices().size(); + double covered = getMachine().getNumOfCoveredVertices(); return (covered / vertices) >= limit; } @Override public double getFulfilment() { - double vertices = machine.getAllVertices().size(); - double covered = machine.getNumOfCoveredVertices(); + double vertices = getMachine().getAllVertices().size(); + double covered = getMachine().getNumOfCoveredVertices(); return (covered / vertices) / limit; } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java b/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java index 525c9020..20281be5 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.events; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java b/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java index 8c791073..ddda3daf 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.events; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java index be3fbe13..259f09a1 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.exceptions; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java index 788f6367..31faa05e 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.exceptions; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java index 058f01b0..1850dc63 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.exceptions; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java index 78d75459..88e96266 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.exceptions; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java index 8f81e0ba..e4b4c68c 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.exceptions; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java b/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java index e4493a58..23ddb540 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.filters; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java index b6527c03..91f4b501 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.generators; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java index 9b3f785b..bef495e6 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.generators; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java index f0ba6547..8edf8e98 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.generators; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java index 9169dfbc..4d246f56 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.generators; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java index c6364b08..2bc69b32 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.generators; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java index 92265b13..f8a6e19c 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.generators; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java index 0cdcf686..c0279a8f 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.generators; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java index c0643187..98376121 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.generators; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java index acb769de..58c0213c 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.generators; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java index d13328c4..95ad663c 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.graph; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java index c1579a52..a710acbb 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.graph; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java index fccf0810..339fc71c 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.graph; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java index 6b7c1058..50dbba16 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.graph; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java index 4e464928..f936be92 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.io; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java index 604cbfd7..d4cd81e1 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.io; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java index 35998b45..8af3cbb8 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.io; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java index 73e117c2..fcbe1fa0 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.io; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java b/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java index a0731ef3..f8b31b1e 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.machines; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java b/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java index be2f3d86..d6a32d11 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.machines; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java index ea0fa860..c390ee90 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.statistics; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java index d250d2d3..541d7daf 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.statistics; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java index 31741bbf..8ad1ac16 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.statistics; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java index ff3766db..55d32a5c 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.statistics; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java index 84351807..fa91fd99 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.statistics; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/ExtendedFiniteStateMachineTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/ExtendedFiniteStateMachineTest.java index 6df2338e..2a04f220 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/ExtendedFiniteStateMachineTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/ExtendedFiniteStateMachineTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/FiniteStateMachineTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/FiniteStateMachineTest.java index 28ec611a..71bb9520 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/FiniteStateMachineTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/FiniteStateMachineTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/KeywordsTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/KeywordsTest.java index 3d01830b..e0cf3aa4 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/KeywordsTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/KeywordsTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/ModelBasedTestingTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/ModelBasedTestingTest.java index b37e4ee9..8ba08c3c 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/ModelBasedTestingTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/ModelBasedTestingTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/RequirementVariableTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/RequirementVariableTest.java index 775e8b8e..c9d95018 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/RequirementVariableTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/RequirementVariableTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/StatisticsManagerTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/StatisticsManagerTest.java index 9be54a32..b28ecc4d 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/StatisticsManagerTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/StatisticsManagerTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/UtilTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/UtilTest.java index 21937c2c..9242c9f0 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/UtilTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/UtilTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/AlternativeConditionTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/AlternativeConditionTest.java index a32a145e..3c24ab57 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/AlternativeConditionTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/AlternativeConditionTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/CombinationalConditionTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/CombinationalConditionTest.java index 357ef2b2..0f99c2c1 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/CombinationalConditionTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/CombinationalConditionTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/EdgeCoverageTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/EdgeCoverageTest.java index 39f9f5a2..3f9ca11b 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/EdgeCoverageTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/EdgeCoverageTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedEdgeTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedEdgeTest.java index 671ef705..40733314 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedEdgeTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedEdgeTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedRequirementTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedRequirementTest.java index 9e894945..8d9efa38 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedRequirementTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedRequirementTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedStateTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedStateTest.java index 88774505..e9100280 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedStateTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedStateTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/RequirementCoverageTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/RequirementCoverageTest.java index 9e26d1bf..4dfe1aa6 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/RequirementCoverageTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/RequirementCoverageTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/StateCoverageTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/StateCoverageTest.java index c8db4949..b81cef4c 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/StateCoverageTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/StateCoverageTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TestCaseLengthTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TestCaseLengthTest.java index 3d11151b..3bc8597f 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TestCaseLengthTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TestCaseLengthTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TimeDurationTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TimeDurationTest.java index 4d0f4b42..64c9bf9b 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TimeDurationTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TimeDurationTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.conditions; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/filters/AccessableEdgeFilterTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/filters/AccessableEdgeFilterTest.java index cbfe4273..09b04e8b 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/filters/AccessableEdgeFilterTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/filters/AccessableEdgeFilterTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.filters; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMBeanShellTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMBeanShellTest.java index c4ea98a3..72ea504b 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMBeanShellTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMBeanShellTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.generators; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMJavaScriptTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMJavaScriptTest.java index 3d3784ca..110c290a 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMJavaScriptTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMJavaScriptTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.generators; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorFSMTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorFSMTest.java index e308ece3..117b21ce 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorFSMTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorFSMTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.generators; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/AllPathPermutationsGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/AllPathPermutationsGeneratorTest.java index 91559833..d1263875 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/AllPathPermutationsGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/AllPathPermutationsGeneratorTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.generators; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/CodeGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/CodeGeneratorTest.java index 949e14fe..59027684 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/CodeGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/CodeGeneratorTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.generators; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/CombinedPathGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/CombinedPathGeneratorTest.java index 03c2019a..8eff9bb9 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/CombinedPathGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/CombinedPathGeneratorTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. /** * diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/ListGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/ListGeneratorTest.java index 70329827..118683b1 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/ListGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/ListGeneratorTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.generators; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/RandomPathGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/RandomPathGeneratorTest.java index 6e8e296f..15a7d749 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/RandomPathGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/RandomPathGeneratorTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.generators; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/io/GraphMLTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/io/GraphMLTest.java index 87772192..bf595403 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/io/GraphMLTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/io/GraphMLTest.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.core.io; diff --git a/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java b/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java index e6e1ecef..847b5c57 100644 --- a/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java +++ b/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.gui; diff --git a/graphwalker-gui/src/main/java/org/graphwalker/gui/StatusBar.java b/graphwalker-gui/src/main/java/org/graphwalker/gui/StatusBar.java index 72c008ce..f7d5082b 100644 --- a/graphwalker-gui/src/main/java/org/graphwalker/gui/StatusBar.java +++ b/graphwalker-gui/src/main/java/org/graphwalker/gui/StatusBar.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.gui; diff --git a/graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServices.java b/graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServices.java index d6c6ece8..f298b88c 100644 --- a/graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServices.java +++ b/graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServices.java @@ -23,28 +23,6 @@ * THE SOFTWARE. * #L% */ -//This file is part of the GraphWalker java package -//The MIT License -// -//Copyright (c) 2010 graphwalker.org -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. package org.graphwalker.webservice; From 600acdee61de13ef065622a3957926b399794a40 Mon Sep 17 00:00:00 2001 From: Nils Olsson Date: Fri, 21 Oct 2011 13:13:40 +0200 Subject: [PATCH 006/371] Added interface for generators --- graphwalker-cli/pom.xml | 8 +- .../main/java/org/graphwalker/cli/CLI.java | 1952 +++++----- .../java/org/graphwalker/cli/CLITest.java | 813 ++-- .../org/graphwalker/cli/bugs/Issue_10.java | 137 +- .../org/graphwalker/cli/bugs/Issue_9.java | 139 +- .../src/test/resources/graphml/UC01.graphml | 679 ++-- .../graphml/methods/ExtendedMain.graphml | 941 +++-- .../resources/graphml/methods/Main.graphml | 959 +++-- .../graphml/misc/missing_inedges.graphml | 904 +++-- .../graphml/misc/no_missing_inedges.graphml | 928 +++-- .../graphml/reqtags/ExtendedMain.graphml | 949 +++-- .../graphml/test24/AddressBook.graphml | 3382 ++++++++++------- .../graphml/test24/AddressBookContact.graphml | 1371 ++++--- .../test24/AddressBookReadOnly.graphml | 519 +-- .../resources/graphml/test24/Alarm.graphml | 1899 +++++---- .../graphml/test24/AlarmEdit.graphml | 1656 ++++---- .../resources/graphml/test24/Audio.graphml | 952 +++-- .../graphml/test24/Calculator.graphml | 534 +-- .../resources/graphml/test24/Calendar.graphml | 1757 +++++---- .../test24/CalendarAppointment.graphml | 2223 ++++++----- .../graphml/test24/Calendar_ToolsMenu.graphml | 622 +-- .../graphml/test24/CallHistory.graphml | 707 ++-- .../resources/graphml/test24/Camera.graphml | 2017 +++++----- .../graphml/test24/ContactFavorites.graphml | 1316 ++++--- .../test24/ContactFavoritesReadOnly.graphml | 186 +- .../test24/ContactTapToSelectNumber.graphml | 1113 +++--- .../resources/graphml/test24/Contacts.graphml | 518 +-- .../graphml/test24/ContactsReadOnly.graphml | 438 ++- .../resources/graphml/test24/Date.graphml | 250 +- .../graphml/test24/DefaultValues.graphml | 588 +-- .../graphml/test24/DeleteItems.graphml | 584 +-- .../graphml/test24/GlobalSettings.graphml | 1090 +++--- .../graphml/test24/ImageViewer.graphml | 287 +- .../graphml/test24/KeyboardNumeric.graphml | 577 +-- .../graphml/test24/KeyboardText.graphml | 847 +++-- .../graphml/test24/KeyboardToolsMenu.graphml | 1752 +++++---- .../resources/graphml/test24/Main.graphml | 2089 +++++----- .../resources/graphml/test24/MakeCall.graphml | 324 +- .../graphml/test24/MediaPlayer.graphml | 1975 +++++----- .../graphml/test24/MessagingCompose.graphml | 1076 +++--- .../graphml/test24/MessagingDrafts.graphml | 304 +- .../graphml/test24/MessagingInbox.graphml | 535 +-- .../graphml/test24/MessagingSent.graphml | 304 +- .../graphml/test24/NeoBrowser.graphml | 2192 ++++++----- .../resources/graphml/test24/Notes.graphml | 1020 ++--- .../graphml/test24/NumberToDial.graphml | 479 ++- .../test24/RunningApplications.graphml | 549 +-- .../graphml/test24/SendMessage.graphml | 520 +-- .../graphml/test24/SendPictureAsMMS.graphml | 1021 ++--- .../graphml/test24/SendVCard.graphml | 1343 ++++--- .../resources/graphml/test24/SysFiles.graphml | 218 +- .../resources/graphml/test24/Tetris.graphml | 318 +- .../resources/graphml/test24/Time.graphml | 218 +- .../src/test/resources/xml/ReachedVertex.xml | 8 +- .../src/test/resources/xml/javaExecutor.xml | 6 +- .../test/resources/xml/reqtags/mbt_init6.xml | 12 +- .../test/resources/xml/reqtags/mbt_init8.xml | 30 +- .../test/resources/xml/reqtags/mbt_init9.xml | 30 +- graphwalker-core/pom.xml | 74 +- .../org/graphwalker/core/Application.java | 4 + .../org/graphwalker/core/ClassPathHack.java | 36 +- .../graphwalker/core/EventDrivenModels.java | 240 +- .../org/graphwalker/core/ExtendedMain.java | 253 +- .../java/org/graphwalker/core/Keywords.java | 912 ++--- .../main/java/org/graphwalker/core/Model.java | 22 +- .../graphwalker/core/ModelBasedTesting.java | 2315 ++++++----- .../org/graphwalker/core/MultipleModels.java | 412 +- .../graphwalker/core/StatisticsManager.java | 198 +- .../java/org/graphwalker/core/Status.java | 272 +- .../main/java/org/graphwalker/core/Util.java | 2055 +++++----- .../conditions/AbstractStopCondition.java | 14 +- .../core/conditions/AlternativeCondition.java | 94 +- .../conditions/CombinationalCondition.java | 90 +- .../core/conditions/EdgeCoverage.java | 54 +- .../core/conditions/NeverCondition.java | 28 +- .../core/conditions/ReachedEdge.java | 162 +- .../core/conditions/ReachedRequirement.java | 50 +- .../core/conditions/ReachedVertex.java | 198 +- .../core/conditions/RequirementCoverage.java | 52 +- .../core/conditions/StopCondition.java | 20 +- .../core/conditions/TestCaseLength.java | 40 +- .../core/conditions/TimeDuration.java | 45 +- .../core/conditions/VertexCoverage.java | 52 +- .../org/graphwalker/core/events/AppEvent.java | 2 +- .../org/graphwalker/core/events/MbtEvent.java | 2 +- .../core/exceptions/FoundNoEdgeException.java | 15 +- .../core/exceptions/GeneratorException.java | 8 +- .../core/exceptions/GuiStoppedExecution.java | 3 +- .../core/exceptions/InvalidDataException.java | 16 +- .../exceptions/StopConditionException.java | 15 +- .../core/filters/AccessableEdgeFilter.java | 74 +- .../core/generators/A_StarPathGenerator.java | 382 +- .../generators/AbstractPathGenerator.java | 105 + .../AllPathPermutationsGenerator.java | 309 +- .../core/generators/CodeGenerator.java | 68 +- .../generators/CombinedPathGenerator.java | 168 +- .../core/generators/ListGenerator.java | 96 +- .../generators/NonOptimizedShortestPath.java | 205 +- .../core/generators/PathGenerator.java | 79 +- .../core/generators/RandomPathGenerator.java | 177 +- .../generators/RequirementsGenerator.java | 108 +- .../core/graph/AbstractElement.java | 727 ++-- .../java/org/graphwalker/core/graph/Edge.java | 292 +- .../org/graphwalker/core/graph/Graph.java | 106 +- .../org/graphwalker/core/graph/Vertex.java | 286 +- .../core/io/AbstractModelHandler.java | 22 +- .../java/org/graphwalker/core/io/GraphML.java | 2060 +++++----- .../org/graphwalker/core/io/ParseLog.java | 70 +- .../core/io/PrintHTMLTestSequence.java | 102 +- .../machines/ExtendedFiniteStateMachine.java | 648 ++-- .../core/machines/FiniteStateMachine.java | 1282 ++++--- .../core/multipleModels/ModelAPI.java | 28 +- .../core/multipleModels/ModelHandler.java | 696 ++-- .../statistics/EdgeCoverageStatistics.java | 84 +- .../EdgeSequenceCoverageStatistics.java | 202 +- .../RequirementCoverageStatistics.java | 112 +- .../core/statistics/Statistics.java | 7 +- .../statistics/VertexCoverageStatistics.java | 86 +- .../core/ExtendedFiniteStateMachineTest.java | 90 +- .../core/FiniteStateMachineTest.java | 92 +- .../org/graphwalker/core/KeywordsTest.java | 106 +- .../core/ModelBasedTestingTest.java | 443 ++- .../graphwalker/core/MultipleModelsTest.java | 768 ++-- .../core/RequirementVariableTest.java | 399 +- .../core/StatisticsManagerTest.java | 330 +- .../java/org/graphwalker/core/UtilTest.java | 87 +- .../conditions/AlternativeConditionTest.java | 42 +- .../CombinationalConditionTest.java | 34 +- .../core/conditions/EdgeCoverageTest.java | 93 +- .../core/conditions/ReachedEdgeTest.java | 103 +- .../conditions/ReachedRequirementTest.java | 111 +- .../core/conditions/ReachedStateTest.java | 103 +- .../conditions/RequirementCoverageTest.java | 133 +- .../core/conditions/StateCoverageTest.java | 101 +- .../core/conditions/TestCaseLengthTest.java | 103 +- .../core/conditions/TimeDurationTest.java | 125 +- .../filters/AccessableEdgeFilterTest.java | 242 +- .../A_StarPathGeneratorEFSMBeanShellTest.java | 161 +- ...A_StarPathGeneratorEFSMJavaScriptTest.java | 161 +- .../A_StarPathGeneratorFSMTest.java | 119 +- .../AllPathPermutationsGeneratorTest.java | 40 +- .../core/generators/CodeGeneratorTest.java | 133 +- .../generators/CombinedPathGeneratorTest.java | 82 +- .../core/generators/ListGeneratorTest.java | 57 +- .../generators/RandomPathGeneratorTest.java | 85 +- .../org/graphwalker/core/io/GraphMLTest.java | 809 ++-- .../core/multiple/ModelHandlerTest.java | 250 +- .../core/multiple/Model_A1_API.java | 31 +- .../core/multiple/Model_A_API.java | 47 +- .../core/multiple/Model_B1_API.java | 35 +- .../core/multiple/Model_B_API.java | 27 +- .../core/multiple/Model_C_API.java | 27 +- .../src/test/resources/xml/bugs/Issue_10.xml | 8 +- .../src/test/resources/xml/bugs/Issue_9.xml | 8 +- .../src/test/resources/xml/multipleA.xml | 16 +- .../src/test/resources/xml/multipleB.xml | 16 +- ...aphwalker.EventDrivenModels.eventModel.xml | 8 +- ...walker.EventDrivenModels.load2Models.1.xml | 8 +- ...walker.EventDrivenModels.load2Models.2.xml | 8 +- ...alker.EventDrivenModels.switchModels.A.xml | 8 +- ...alker.EventDrivenModels.switchModels.B.xml | 8 +- ...alker.EventDrivenModels.switchModels.C.xml | 8 +- .../src/test/resources/xml/reqCoverage.xml | 8 +- .../test/resources/xml/reqtags/mbt_init.xml | 16 +- .../test/resources/xml/reqtags/mbt_init10.xml | 22 +- .../test/resources/xml/reqtags/mbt_init11.xml | 16 +- .../test/resources/xml/reqtags/mbt_init2.xml | 28 +- .../test/resources/xml/reqtags/mbt_init3.xml | 40 +- .../test/resources/xml/reqtags/mbt_init4.xml | 104 +- .../test/resources/xml/reqtags/mbt_init5.xml | 6 +- .../test/resources/xml/reqtags/mbt_init6.xml | 12 +- .../test/resources/xml/reqtags/mbt_init7.xml | 12 +- .../src/test/resources/xml/switch/A.xml | 16 +- .../src/test/resources/xml/switch/B.xml | 16 +- .../src/test/resources/xml/switch/C.xml | 16 +- 175 files changed, 39309 insertions(+), 33167 deletions(-) create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/generators/AbstractPathGenerator.java diff --git a/graphwalker-cli/pom.xml b/graphwalker-cli/pom.xml index b4215c80..7db2f93d 100644 --- a/graphwalker-cli/pom.xml +++ b/graphwalker-cli/pom.xml @@ -15,10 +15,10 @@ GraphWalker CLI - - org.graphwalker - graphwalker-core - + + org.graphwalker + graphwalker-core + org.graphwalker graphwalker-webservice diff --git a/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java b/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java index 2e8625fa..88de21bc 100644 --- a/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java +++ b/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java @@ -26,1031 +26,1016 @@ package org.graphwalker.cli; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.PrintStream; -import java.net.InetAddress; -import java.util.Iterator; -import java.util.Map.Entry; -import java.util.Timer; -import java.util.TimerTask; -import java.util.Vector; - -import javax.xml.ws.Endpoint; - -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.CommandLineParser; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.MissingArgumentException; -import org.apache.commons.cli.MissingOptionException; -import org.apache.commons.cli.OptionBuilder; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.PosixParser; -import org.apache.commons.cli.UnrecognizedOptionException; +import org.apache.commons.cli.*; import org.apache.log4j.Logger; import org.graphwalker.core.Keywords; import org.graphwalker.core.Keywords.Generator; import org.graphwalker.core.Keywords.StopCondition; import org.graphwalker.core.ModelBasedTesting; -import org.graphwalker.webservice.SoapServices; import org.graphwalker.core.Util; import org.graphwalker.core.conditions.AlternativeCondition; import org.graphwalker.core.exceptions.GeneratorException; import org.graphwalker.core.exceptions.StopConditionException; import org.graphwalker.core.io.PrintHTMLTestSequence; +import org.graphwalker.webservice.SoapServices; import org.jdom.JDOMException; +import javax.xml.ws.Endpoint; +import java.io.*; +import java.net.InetAddress; +import java.util.Iterator; +import java.util.Map.Entry; +import java.util.Timer; +import java.util.TimerTask; +import java.util.Vector; + /** * Command Line Interface object, to the org.graphwalker package. The object * provides a way of working with MBT using a Windows DOS, or a console window * in *nix system. The CLI works like the cvs or the subversion command svn. The * syntax is:
- * + *

*

  * java -jar graphwalker.jar COMMAND 
  * 
- * + *

* Where graphwalker.jar is the whole package org.graphwalker using * org.graphwalker.CLI as the main class
*
* Example: Print help for graphwalker.jar
- * + *

*

  * java -jar graphwalker.jar help
  * 
- * + *

*
* Example: Merge graphml files and save the merged result.
- * + *

*

  * java -jar graphwalker.jar merge -f folder
  * 
- * + *

*
* Example: Generate offline test sequence, using random walk
- * + *

*

  * java -jar graphwalker.jar offline -f folder -g RANDOM -s EDGE_COVERAGE:30
  * 
- * + *

*
* Example: Generate online test sequence, using shortest walk
- * + *

*

  * java -jar graphwalker.jar online -f folder -g A_STAR -s EDGE_COVERAGE:100
  * 
- * + *

*
* Example: Print all names of edges and vertices (Sorted, and * unique)
- * + *

*

  * java -jar graphwalker.jar methods -f folder
  * 
- * + *

*
* Example: When you need to define more complex abstract test * cases working with the CLI can sometimes be a burden. For this reason we have * added a easier way to structure the abstract test cases, using XML.
- * + *

*

  * java -jar graphwalker.jar xml -f testcase.xml
  * 
- * + *

*
- * */ public class CLI { - public static class VerboseStatisticsLogger extends Thread { - private ModelBasedTesting mbt = null; - - private VerboseStatisticsLogger(ModelBasedTesting modelBasedTesting) { - this.mbt = modelBasedTesting; - } - - @Override - public void run() { - logger.info(mbt.getStatisticsVerbose()); - } - } - - private static Logger logger = Util.setupLogger(CLI.class); - private ModelBasedTesting mbt = null; - private Timer timer = null; - private Options opt = new Options(); - private static Endpoint endpoint = null; - - public CLI() { - mbt = new ModelBasedTesting(); - } - - private ModelBasedTesting getMbt() { - return mbt; - } - - /** - * @param mbt - * the ModelBasedTesting to set - */ - private void setMbt(ModelBasedTesting mbt) { - this.mbt = mbt; - } - - public static void main(String[] args) { - CLI cli = new CLI(); - Thread shutDownThread = new CLI.VerboseStatisticsLogger(cli.getMbt()); - try { - Runtime.getRuntime().addShutdownHook(shutDownThread); - } catch (IllegalArgumentException e) { - logger.debug("Could not register ShutdownHook for statistics logger, it has already been registered"); - } - try { - cli.run(args); - endpoint = cli.GetEndpoint(); - } catch (Exception e) { - Util.logStackTraceToError(e); - } - } - - private void run(String[] args) { - if (args.length < 1) { - System.err.println("Type 'java -jar graphwalker.jar help' for usage."); - return; - } else { - if (args[0].equals("help")) { - if (args.length == 1) { - printGeneralHelpText(); - } else { - printHelpText(args[1]); - } - return; - } else if (args[0].equalsIgnoreCase("requirements")) { - buildRequirementsCLI(); - } else if (args[0].equalsIgnoreCase("online")) { - buildOnlineCLI(); - } else if (args[0].equalsIgnoreCase("offline")) { - buildOfflineCLI(); - } else if (args[0].equalsIgnoreCase("methods")) { - buildMethodsCLI(); - } else if (args[0].equalsIgnoreCase("merge")) { - buildMergeCLI(); - } else if (args[0].equalsIgnoreCase("source")) { - buildSourceCLI(); - } else if (args[0].equalsIgnoreCase("manual")) { - buildManualCLI(); - } else if (args[0].equalsIgnoreCase("xml")) { - buildXmlCLI(); - } else if (args[0].equalsIgnoreCase("soap")) { - buildSoapCLI(); - } else if (args[0].equalsIgnoreCase("gui")) { - buildGuiCLI(); - } else if (args[0].equalsIgnoreCase("log")) { - buildLogCLI(); - } else if (args[0].equals("-v") || args[0].equals("--version")) { - printVersionInformation(); - return; - } else if (args[0].equals("-h") || args[0].equals("--help")) { - printGeneralHelpText(); - return; - } else { - System.err.println("Unkown command: " + args[0]); - System.err.println("Type 'java -jar graphwalker.jar help' for usage."); - return; - } - } - - try { - timer = new Timer(); - CommandLineParser parser = new PosixParser(); - CommandLine cl = parser.parse(opt, args); - - /** - * Command: requirements - */ - if (args[0].equalsIgnoreCase("requirements")) { - RunCommandRequirements(cl); - } - /** - * Command: online - */ - if (args[0].equalsIgnoreCase("online")) { - RunCommandOnline(cl); - } - /** - * Command: offline - */ - else if (args[0].equalsIgnoreCase("offline")) { - RunCommandOffline(cl); - } - /** - * Command: methods - */ - else if (args[0].equalsIgnoreCase("methods")) { - RunCommandMethods(cl); - } - /** - * Command: merge - */ - else if (args[0].equalsIgnoreCase("merge")) { - RunCommandMerge(cl); - } - /** - * Command: source - */ - else if (args[0].equalsIgnoreCase("source")) { - RunCommandSource(cl); - } - /** - * Command: xml - */ - else if (args[0].equalsIgnoreCase("xml")) { - RunCommandXml(cl); - } - /** - * Command: soap - */ - else if (args[0].equalsIgnoreCase("soap")) { - RunCommandSoap(cl); - } - /** - * Command: gui - */ - //else if (args[0].equalsIgnoreCase("gui")) { - // RunCommandGui(cl); - //} - /** - * Command: log - */ - //else if (args[0].equalsIgnoreCase("log")) { - // RunCommandLog(cl); - //} - /** - * Command: manual - */ - else if (args[0].equalsIgnoreCase("manual")) { - RunCommandManual(cl); - } - } catch (ArrayIndexOutOfBoundsException e) { - logger.warn(e.getMessage()); - System.err.println("The arguments for either the generator, or the stop-condition, is incorrect."); - System.err.println("Example: java -jar graphwalker.jar offline -f ../demo/model/UC01.graphml -s EDGE_COVERAGE:100 -g A_STAR"); - System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); - } catch (MissingOptionException e) { - logger.warn(e.getMessage()); - System.err.println("Mandatory option(s) are missing."); - System.err.println(e.getMessage()); - System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); - } catch (MissingArgumentException e) { - logger.warn(e.getMessage()); - System.err.println("Argument is required to the option."); - System.err.println(e.getMessage()); - System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); - } catch (UnrecognizedOptionException e) { - logger.warn(e.getMessage()); - System.err.println(e.getMessage()); - System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); - } catch (StopConditionException e) { - logger.warn(e.getMessage()); - System.err.println(e.getMessage()); - System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); - } catch (GeneratorException e) { - logger.warn(e.getMessage()); - System.err.println(e.getMessage()); - System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); - } catch (JDOMException e) { - logger.warn(e.getMessage()); - System.err.println("Can not access file: " + e.getMessage()); - System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); - } catch (FileNotFoundException e) { - logger.warn(e.getMessage()); - System.err.println("Can not access file: " + e.getMessage()); - System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); - } catch (IOException e) { - logger.warn(e.getMessage()); - System.err.println(e.getMessage()); - System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); - } catch (Exception e) { - Util.logStackTraceToError(e); - System.err.println(e.getMessage()); - System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); - } finally { - timer.cancel(); - } - } - - private void printGeneralHelpText() { - System.out.println("usage: 'java -jar graphwalker.jar [OPTION] [ARGUMENT]'\n"); - System.out.println("Type 'java -jar graphwalker.jar help ' to get specific help about a command."); - System.out.println("Valid commands are:"); - System.out.println(" gui"); - System.out.println(" help"); - System.out.println(" manual"); - System.out.println(" merge"); - System.out.println(" methods"); - System.out.println(" offline"); - System.out.println(" online"); - System.out.println(" requirements"); - System.out.println(" soap"); - System.out.println(" source"); - System.out.println(" log"); - System.out.println(" xml\n"); - System.out.println("Type 'java -jar graphwalker.jar -v (--version)' for version information."); - } - - private void printHelpText(String helpSection) { - String header = ""; - if (helpSection.equalsIgnoreCase("online")) { - buildOnlineCLI(); - header = "Run the test online.\n" + "MBT will return a test sequence, one line at a time to standard output, " - + "it will wait until a line is fed back via standard input. The data fed back can be:\n" - + " '0' which means, continue the test as normal\n" + " '2' will end the test normally\n" - + "anything else will abort the execution.\n"; - } else if (helpSection.equalsIgnoreCase("requirements")) { - buildRequirementsCLI(); - header = "Print a list of requiremnts found in the model.\n"; - } else if (helpSection.equalsIgnoreCase("offline")) { - buildOfflineCLI(); - header = "Generate a test sequence offline. The sequence is printed to the standard output\n"; - } else if (helpSection.equalsIgnoreCase("manual")) { - buildManualCLI(); - header = "Generate a test sequence (offline). The output will be a HTML formatted test case document\n"; - } else if (helpSection.equalsIgnoreCase("methods")) { - buildMethodsCLI(); - header = "Generate all methods, or tests existing in the model.\n" - + "MBT will parse the graph(s), and return all methods (or tests) that" - + " exists in the graph(s). The list will onyl print out a unique name once." + " The list is printed to stdout.\n"; - } else if (helpSection.equalsIgnoreCase("merge")) { - buildMergeCLI(); - header = "Merge several graphml files into one single graphml file.\n" - + "The files to be merged, shall all exist in a single folder.\n"; - } else if (helpSection.equalsIgnoreCase("source")) { - buildSourceCLI(); - header = "Generate code from a template.\n" - + "Will generate code using a template. The code generated will contain all lables/names " - + "defined by the vertices and edges. This enables the user to write templates for a " - + "multitude of scripting or programming languages. " + "The result will be printed to stdout. " - + "There is 1 variable in the template, that will be replaced: {LABEL} ->Will be replace " - + "by the actual name of the edge or vertex."; - } else if (helpSection.equalsIgnoreCase("xml")) { - buildXmlCLI(); - header = "Setup mbt engine from xml.\n" + "Will setup and execute an engine based on xml specified criterias."; - } else if (helpSection.equalsIgnoreCase("soap")) { - buildSoapCLI(); - header = "Run MBT as a Web Services (SOAP) server.\n" - + "To see the services, see the WSDL file at: http://localhost:8080/mbt-services?WSDL"; - } else if (helpSection.equalsIgnoreCase("gui")) { - buildGuiCLI(); - header = "Run MBT in a GUI mode.\n" + "Also an mbt xml file can be supplied."; - } else if (helpSection.equalsIgnoreCase("log")) { - buildLogCLI(); - header = "This will start MBT's GUI, and load a model and it's log file.\n" - + "MBT parses the log file and shows the user how it traversed the model." - + " This is usefull when the user whishes to debug a session, and analyze the test."; - } else { - System.err.println("Type 'java -jar graphwalker.jar help' for usage."); - return; - } - - HelpFormatter f = new HelpFormatter(); - f.printHelp(100, "java -jar graphwalker.jar " + helpSection.toLowerCase(), header, opt, "", true); - } - - @SuppressWarnings("static-access") - private void buildRequirementsCLI() { - opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") - .withDescription("The file (or folder) containing graphml formatted files.").hasArg().withLongOpt("input_graphml").create("f")); - } - - private String generateListOfValidStopConditions() { - StringBuilder stringBuilder = new StringBuilder(); - for (StopCondition sc : Keywords.getStopConditions()) { - stringBuilder.append(sc.getDescription()); - stringBuilder.append(System.getProperty("line.separator")); - } - return stringBuilder.toString(); - } - - private String generateListOfValidGenerators() { - StringBuilder stringBuilder = new StringBuilder(); - for (Generator g : Keywords.getGenerators()) { - if (g.isPublished()) { - stringBuilder.append(g.getDescription()); - stringBuilder.append(System.getProperty("line.separator")); - } - } - return stringBuilder.toString(); - } - - @SuppressWarnings("static-access") - private void buildOnlineCLI() { - opt.addOption("a", "statistics", false, "Prints the statistics of the test, at the end of the run."); - opt.addOption("x", "extended", false, "Use an extended finite state machine to handle the model."); - opt.addOption("j", false, "Enable JavaScript engine"); - opt.addOption(OptionBuilder - .isRequired() - .withArgName("stop-condition") - .withDescription( - "Defines the stop condition(s).\nHalts the generation after the specified stop-conditon(s) has been met. " - + "At least 1 condition must be given. If more than 1 is given, the condition that meets " - + "it's stop-condition first, will cause the generation to halt. " - + "To separate multiple conditions, the separator pipe-character | is used. " - + "A list of valid stop-conditions are:\n -------------------\n" + generateListOfValidStopConditions() - + " -------------------\nFor more extensive examples, " + "see http://mbt.tigris.org/wiki/All_about_stop_conditions") - .hasArg().create("s")); - opt.addOption(OptionBuilder - .isRequired() - .withArgName("generator") - .withDescription( - "The generator to be used when traversing the model. At least 1 generator must be given. " - + "To separate multiple generators, the separator pipe-character | is used. " - + "A list of valid generators are:\n -------------------\n" + generateListOfValidGenerators() - + " -------------------\nFor more extensive examples, " + "see http://mbt.tigris.org/wiki/All_about_generators").hasArg() - .create("g")); - opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") - .withDescription("The file (or folder) containing graphml formatted files.").hasArg().withLongOpt("input_graphml").create("f")); - opt.addOption(OptionBuilder - .withArgName("seconds") - .withDescription( - "Prints the test coverage of the graph during execution every . The printout goes to the log file defined in " - + "mbt.properties, and only, if at least INFO level is set in " + "that same file.").hasArg().withLongOpt("log-coverage") - .create("o")); - opt.addOption("c", "class_name", true, "Optional class name to use for test execution."); - opt.addOption("t", "report-template", true, "Optional report template to use. (Also requires option -r) (To be better documented)"); - opt.addOption("r", "report-output", true, - "Optional report filename to save report to. (Also requires option -t) (To be better documented)"); - opt.addOption("w", "weighted", false, "Use weighted values if they exist in the model, and the generator is RANDOM."); - opt.addOption("d", "dry-run", false, "Will execute a dry-run of the model. Dialog will pop up for every edge and vertex."); - } - - /** - * Build the command offline command line parser - */ - @SuppressWarnings("static-access") - private void buildOfflineCLI() { - opt.addOption("a", false, "Prints the statistics of the test, at the end of the run."); - opt.addOption("x", false, "Use an extended finite state machine to handle the model."); - opt.addOption("j", false, "Enable JavaScript engine"); - opt.addOption(OptionBuilder - .isRequired() - .withArgName("stop-condition") - .withDescription( - "Defines the stop condition(s).\nHalts the generation after the specified stop-conditon(s) has been met. " - + "At least 1 condition must be given. If more than 1 is given, the condition that meets " - + "it's stop-condition first, will cause the generation to halt. " - + "To separate multiple conditions, the separator pipe-character | is used. " - + "A list of valid stop-conditions are:\n -------------------\n" + generateListOfValidStopConditions() - + " -------------------\nFor more extensive examples, " + "see http://mbt.tigris.org/wiki/All_about_stop_conditions") - .hasArg().create("s")); - opt.addOption(OptionBuilder - .isRequired() - .withArgName("generator") - .withDescription( - "The generator to be used when traversing the model. At least 1 generator must be given. " - + "To separate multiple generators, the separator pipe-character | is used. " - + "A list of valid generators are:\n -------------------\n" + generateListOfValidGenerators() - + " -------------------\nFor more extensive examples, " + "see http://mbt.tigris.org/wiki/All_about_generators").hasArg() - .create("g")); - opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") - .withDescription("The file (or folder) containing graphml formatted files.").hasArg().create("f")); - opt.addOption(OptionBuilder - .withArgName("seconds") - .withDescription( - "Prints the test coverage of the graph during execution every . The printout goes to the log file defined in " - + "mbt.properties, and only, if at least INFO level is set in " + "that same file.").hasArg().create("o")); - opt.addOption("t", "report-template", true, "Optional report template to use. (Also requires option -r) (To be better documented)"); - opt.addOption("r", "report-output", true, - "Optional report filename to save report to. (Also requires option -t) (To be better documented)"); - opt.addOption("w", "weighted", false, "Use weighted values if they exist in the model, and the generator is RANDOM."); - } - - /** - * Build the command manual command line parser - */ - @SuppressWarnings("static-access") - private void buildManualCLI() { - opt.addOption("x", false, "Use an extended finite state machine to handle the model."); - opt.addOption("j", false, "Enable JavaScript engine"); - opt.addOption(OptionBuilder - .isRequired() - .withArgName("stop-condition") - .withDescription( - "Defines the stop condition(s).\nHalts the generation after the specified stop-conditon(s) has been met. " - + "At least 1 condition must be given. If more than 1 is given, the condition that meets " - + "it's stop-condition first, will cause the generation to halt. " - + "To separate multiple conditions, the separator pipe-character | is used. " - + "A list of valid stop-conditions are:\n -------------------\n" + generateListOfValidStopConditions() - + " -------------------\nFor more extensive examples, " + "see http://mbt.tigris.org/wiki/All_about_stop_conditions") - .hasArg().create("s")); - opt.addOption(OptionBuilder - .isRequired() - .withArgName("generator") - .withDescription( - "The generator to be used when traversing the model. At least 1 generator must be given. " - + "To separate multiple generators, the separator pipe-character | is used. " - + "A list of valid generators are:\n -------------------\n" + generateListOfValidGenerators() - + " -------------------\nFor more extensive examples, " + "see http://mbt.tigris.org/wiki/All_about_generators").hasArg() - .create("g")); - opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") - .withDescription("The file (or folder) containing graphml formatted files.").hasArg().create("f")); - opt.addOption("w", "weighted", false, "Use weighted values if they exist in the model, and the generator is RANDOM."); - } - - @SuppressWarnings("static-access") - private void buildMethodsCLI() { - opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") - .withDescription("The file (or folder) containing graphml formatted files.").hasArg().withLongOpt("input_graphml").create("f")); - } - - /** - * Build the command merge command line parser - */ - @SuppressWarnings("static-access") - private void buildMergeCLI() { - opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") - .withDescription("The file (or folder) containing graphml formatted files.").hasArg().withLongOpt("input_graphml").create("f")); - opt.addOption("i", "index", true, "Print out the INDEX value when merging models. Default is true"); - } - - /** - * Build the command source command line parser - */ - @SuppressWarnings("static-access") - private void buildSourceCLI() { - opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") - .withDescription("The file (or folder) containing graphml formatted files.").hasArg().withLongOpt("input_graphml").create("f")); - opt.addOption(OptionBuilder.isRequired().withArgName("file").withDescription("The template file").hasArg().withLongOpt("template") - .create("t")); - } - - /** - * Build the command xml command line parser - */ - @SuppressWarnings("static-access") - private void buildXmlCLI() { - opt.addOption("a", false, "Prints the statistics of the test, at the end of the run."); - opt.addOption(OptionBuilder.isRequired().withArgName("file").withDescription("The xml file containing the mbt settings.").hasArg() - .create("f")); - opt.addOption(OptionBuilder - .withArgName("seconds") - .withDescription( - "Prints the test coverage of the graph during execution every . The printout goes to the log file defined in " - + "mbt.properties, and only, if at least INFO level is set in " + "that same file.").hasArg().create("o")); - opt.addOption("d", "dry-run", false, "Will execute a dry-run of the model. Dialog will pop up for every edge and vertex."); - } - - /** - * Build the command soap command line parser - */ - @SuppressWarnings("static-access") - private void buildSoapCLI() { - opt.addOption(OptionBuilder.withArgName("file").withDescription("The xml file containing the mbt model and settings.").hasArg() - .create("f")); - opt.addOption(OptionBuilder.withArgName("interface") - .withDescription("The network interface to which mbt should bind to. " + "If not given, the default is 0.0.0.0").hasArg() - .create("i")); - opt.addOption(OptionBuilder.withArgName("port") - .withDescription("The port to which mbt should listen to. " + "If not given, the default is 9090").hasArg().create("p")); - } - - /** - * Build the command gui command line parser - */ - @SuppressWarnings("static-access") - private void buildGuiCLI() { - opt.addOption(OptionBuilder.withArgName("file").withDescription("The xml file containing the mbt settings.").hasArg().create("f")); - } - - /** - * Build the command log command line parser - */ - @SuppressWarnings("static-access") - private void buildLogCLI() { - opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") - .withDescription("The file (or folder) containing graphml formatted files.").hasArg().withLongOpt("input_graphml").create("f")); - opt.addOption(OptionBuilder.withArgName("log").withDescription("The log file from a previuos run.").hasArg().create("l")); - } - - /** - * Print version information - */ - private void printVersionInformation() { - System.out.println("org.graphwalker version " + mbt.getVersionString() + "\n"); - System.out.println("org.graphwalker is open source software licensed under MIT licens"); - System.out.println("The software (and it's source) can be downloaded from http://graphwalker.org"); - System.out - .println("For a complete list of this package software dependencies, see http://graphwalker.org:8080/job/graphwalker/site/dependencies.html"); - } - - /** - * Run the offline command - * - * @param cl - * @throws StopConditionException - * @throws GeneratorException - * @throws InterruptedException - * @throws FileNotFoundException - */ - private void RunCommandOffline(CommandLine cl) throws StopConditionException, GeneratorException, InterruptedException, - FileNotFoundException { - /** - * Get the model from the graphml file (or folder) - */ - if (helpNeeded("offline", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") - || helpNeeded("offline", !cl.hasOption("s"), "A stop condition must be supplied, See option -s") - || helpNeeded("offline", cl.hasOption("t") && !cl.hasOption("r"), - "A report output file must be set, See -t, when using a report template") - || helpNeeded("offline", !cl.hasOption("t") && cl.hasOption("r"), - "A report template must be set, See -r, when using a report output file") - || helpNeeded("offline", !cl.hasOption("g"), "Missing the generator, See option -g")) - return; - - getMbt().readGraph(cl.getOptionValue("f")); - getMbt().enableJsScriptEngine(cl.hasOption("j")); - getMbt().enableExtended(cl.hasOption("x")); - getMbt().setWeighted(cl.hasOption("w")); - - /* - * Set the stop-conditions(s) - */ - AlternativeCondition alternativeCondition = new AlternativeCondition(); - String[] stopConditions = cl.getOptionValue("s").split("\\|"); - for (String stopCondition : stopConditions) { - String[] sc = stopCondition.trim().split(":"); - alternativeCondition.add(Util.getCondition(null, Keywords.getStopCondition(sc[0].trim()) // Stop - // condition - , (sc.length == 1 ? "" : sc[1].trim()))); // Optional condition - // parameter - } - - /* - * Set the generators(s) - */ - String[] generators = cl.getOptionValue("g").split("\\|"); - for (String genrator : generators) { - getMbt().setGenerator(Keywords.getGenerator(genrator.trim())); - } - getMbt().getGenerator().setStopCondition(alternativeCondition); - - if (cl.hasOption("o")) { - long seconds = Integer.valueOf(cl.getOptionValue("o")).longValue(); - - logger.info("Append coverage to log every: " + seconds + " seconds"); - - TimerTask logTask; - if (cl.hasOption("t") && cl.hasOption("r")) { - getMbt().setUseStatisticsManager(true); - getMbt().getStatisticsManager().setReportTemplate(new FileInputStream(new File(cl.getOptionValue('t')))); - final String reportName = cl.getOptionValue('r'); - logTask = new TimerTask() { - @Override - public void run() { - try { - getMbt().getStatisticsManager().writeFullReport(new PrintStream(reportName)); - } catch (FileNotFoundException e) { - throw new RuntimeException("Could not open or write report file '" + reportName + "'", e); - } - } - }; - } else { - logTask = new TimerTask() { - @Override - public void run() { - logger.info(getMbt().getStatisticsCompact()); - } - }; - } - timer = new Timer(); - timer.schedule(logTask, 500, seconds * 1000); - } - - getMbt().writePath(); - - if (cl.hasOption("a")) { - writeStatisticsVerbose(System.out); - } - if (cl.hasOption("o")) { - logger.info(mbt.getStatisticsCompact()); - } - if (cl.hasOption("t") && cl.hasOption("r")) { - getMbt().getStatisticsManager().setReportTemplate(new FileInputStream(new File(cl.getOptionValue('t')))); - getMbt().getStatisticsManager().writeFullReport(cl.getOptionValue('r')); - } - - } - - /** - * Run the manual command - * - * @param cl - * @throws StopConditionException - * @throws GeneratorException - * @throws InterruptedException - */ - private void RunCommandManual(CommandLine cl) throws StopConditionException, GeneratorException, InterruptedException { - /** - * Get the model from the graphml file (or folder) - */ - if (helpNeeded("manual", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") - || helpNeeded("manual", !cl.hasOption("s"), "A stop condition must be supplied, See option -s") - || helpNeeded("manual", !cl.hasOption("g"), "Missing the generator, See option -g")) - return; - - getMbt().setManualTestSequence(true); - getMbt().readGraph(cl.getOptionValue("f")); - getMbt().enableJsScriptEngine(cl.hasOption("j")); - getMbt().enableExtended(cl.hasOption("x")); - getMbt().setWeighted(cl.hasOption("w")); - - /* - * Set the stop-conditions(s) - */ - AlternativeCondition alternativeCondition = new AlternativeCondition(); - String[] stopConditions = cl.getOptionValue("s").split("\\|"); - for (String stopCondition : stopConditions) { - String[] sc = stopCondition.trim().split(":"); - alternativeCondition.add(Util.getCondition(null, Keywords.getStopCondition(sc[0].trim()) // Stop - // condition - , (sc.length == 1 ? "" : sc[1].trim()))); // Optional condition - // parameter - } - - /* - * Set the generators(s) - */ - String[] generators = cl.getOptionValue("g").split("\\|"); - for (String genrator : generators) { - getMbt().setGenerator(Keywords.getGenerator(genrator.trim())); - } - getMbt().getGenerator().setStopCondition(alternativeCondition); - - Vector testSequence = new Vector(); - getMbt().writePath(testSequence); - - new PrintHTMLTestSequence(testSequence, System.out); - } - - /** - * Run the online command - * - * @param cl - * @throws StopConditionException - * @throws GeneratorException - * @throws InterruptedException - * @throws FileNotFoundException - */ - private void RunCommandOnline(CommandLine cl) throws StopConditionException, GeneratorException, InterruptedException, - FileNotFoundException { - /** - * Get the model from the graphml file (or folder) - */ - if (helpNeeded("online", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") - || helpNeeded("online", !cl.hasOption("s"), "A stop condition must be supplied, See option -s") - || helpNeeded("online", cl.hasOption("t") && !cl.hasOption("r"), - "A report output file must be set, See -t, when using a report template") - || helpNeeded("online", !cl.hasOption("t") && cl.hasOption("r"), - "A report template must be set, See -r, when using a report output file") - || helpNeeded("online", !cl.hasOption("g"), "Missing the generator, See option -g")) - return; - - getMbt().readGraph(cl.getOptionValue("f")); - getMbt().enableJsScriptEngine(cl.hasOption("j")); - getMbt().enableExtended(cl.hasOption("x")); - getMbt().setWeighted(cl.hasOption("w")); - - /* - * Set the stop-conditions(s) - */ - AlternativeCondition alternativeCondition = new AlternativeCondition(); - String[] stopConditions = cl.getOptionValue("s").split("\\|"); - for (String stopCondition : stopConditions) { - String[] sc = stopCondition.trim().split(":"); - alternativeCondition.add(Util.getCondition(null, Keywords.getStopCondition(sc[0].trim()) // Stop - // condition - , (sc.length == 1 ? "" : sc[1].trim()))); // Optional condition - // parameter - } - - /* - * Set the generators(s) - */ - String[] genrators = cl.getOptionValue("g").split("\\|"); - for (String genrator : genrators) { - getMbt().setGenerator(Keywords.getGenerator(genrator.trim())); - } - getMbt().getGenerator().setStopCondition(alternativeCondition); - - /** - * Set dry-run - */ - getMbt().setDryRun(cl.hasOption("d")); - - if (cl.hasOption("o")) { - long seconds = Integer.valueOf(cl.getOptionValue("o")).longValue(); - - logger.info("Append coverage to log every: " + seconds + " seconds"); - - TimerTask logTask; - if (cl.hasOption("t") && cl.hasOption("r")) { - getMbt().setUseStatisticsManager(true); - getMbt().getStatisticsManager().setReportTemplate(new FileInputStream(new File(cl.getOptionValue('t')))); - final String reportName = cl.getOptionValue('r'); - logTask = new TimerTask() { - @Override - public void run() { - try { - getMbt().getStatisticsManager().writeFullReport(new PrintStream(reportName)); - } catch (FileNotFoundException e) { - throw new RuntimeException("Could not open or write report file '" + reportName + "'", e); - } - } - }; - } else { - logTask = new TimerTask() { - @Override - public void run() { - logger.info(getMbt().getStatisticsCompact()); - } - }; - } - timer = new Timer(); - timer.schedule(logTask, 500, seconds * 1000); - } - - if (cl.hasOption("c")) { - getMbt().executePath(cl.getOptionValue("c")); - } else if (cl.hasOption("d")) { - getMbt().executePath((String) null); - } else { - getMbt().interractivePath(); - } - - if (cl.hasOption("a")) { - writeStatisticsVerbose(System.out); - } - if (cl.hasOption("o")) { - logger.info(mbt.getStatisticsCompact()); - } - if (cl.hasOption("t") && cl.hasOption("r")) { - getMbt().getStatisticsManager().setReportTemplate(new FileInputStream(new File(cl.getOptionValue('t')))); - getMbt().getStatisticsManager().writeFullReport(cl.getOptionValue('r')); - } - - } - - private void writeStatisticsVerbose(PrintStream out) { - out.println(getMbt().getStatisticsVerbose()); - } - - /** - * Run the source command - * - * @param cl - * @throws GeneratorException - * @throws IOException - * @throws InterruptedException - */ - private void RunCommandSource(CommandLine cl) throws GeneratorException, IOException, InterruptedException { - if (helpNeeded("source", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") - || helpNeeded("source", !cl.hasOption("t"), "Missing the template file. See -t (--template)")) - return; - - getMbt().readGraph(cl.getOptionValue("f")); - getMbt().setTemplate(cl.getOptionValue("t")); - getMbt().setGenerator(Keywords.GENERATOR_STUB); - getMbt().writePath(System.out); - } - - /** - * Run the requirements command This method prints out all the Requirements - * found in the graph. - * - * @throws GeneratorException - * @throws InterruptedException - */ - private void RunCommandRequirements(CommandLine cl) throws GeneratorException, InterruptedException { - if (helpNeeded("requirements", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)")) - return; - - getMbt().readGraph(cl.getOptionValue("f")); - getMbt().getMachine().populateReqHashMap(); - - Iterator> it = getMbt().getMachine().getReqs().entrySet().iterator(); - while (it.hasNext()) { - Entry pairs = it.next(); - System.out.println(pairs.getKey()); - } - } - - /** - * Run the methods command - * - * @param cl - * @throws GeneratorException - * @throws InterruptedException - */ - private void RunCommandMethods(CommandLine cl) throws GeneratorException, InterruptedException { - if (helpNeeded("methods", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)")) - return; - - getMbt().readGraph(cl.getOptionValue("f")); - getMbt().setTemplate(new String[] { "", "{LABEL}", "" }); - getMbt().setGenerator(Keywords.GENERATOR_STUB); - getMbt().writePath(System.out); - } - - /** - * Run the merge command - * - * @param cl - */ - private void RunCommandMerge(CommandLine cl) { - if (helpNeeded("merge", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)")) - return; - - getMbt().readGraph(cl.getOptionValue("f")); - getMbt().writeModel(System.out, !cl.hasOption("i")); - } - - /** - * Run the xml command - * - * @param cl - * @throws StopConditionException - * @throws GeneratorException - * @throws IOException - * @throws JDOMException - * @throws InterruptedException - */ - private void RunCommandXml(CommandLine cl) throws StopConditionException, GeneratorException, IOException, JDOMException, - InterruptedException { - if (helpNeeded("xml", !cl.hasOption("f"), "Missing the input xml file, See option -f")) - return; - - setMbt(Util.loadMbtFromXml(Util.getFile(cl.getOptionValue("f")), cl.hasOption("d"))); - - if (cl.hasOption("a")) { - logger.info(getMbt().getStatisticsVerbose()); - writeStatisticsVerbose(System.out); - } - } - - /** - * Run the soap command - * - * @param cl - * @throws StopConditionException - * @throws GeneratorException - * @throws IOException - * @throws JDOMException - * @throws InterruptedException - */ - private void RunCommandSoap(CommandLine cl) throws StopConditionException, GeneratorException, IOException, JDOMException, - InterruptedException { - String port = null; - String nicAddr = null; - if (cl.hasOption("p")) { - port = cl.getOptionValue("p"); - } else { - port = Util.readWSPort(); - } - - if (cl.hasOption("i")) { - nicAddr = Util.getInternetAddr(cl.getOptionValue("i")).getCanonicalHostName(); - } else { - nicAddr = "0.0.0.0"; - } - - String file = cl.getOptionValue("f"); - if (file == null || file.isEmpty()) { - setMbt(new ModelBasedTesting()); - } else { - setMbt(Util.loadMbtAsWSFromXml(Util.getFile(file))); - } - - String wsURL = "http://" + nicAddr + ":" + port + "/mbt-services"; - SoapServices soapService = new SoapServices(getMbt()); - soapService.xmlFile = file; - - endpoint = Endpoint.publish(wsURL, soapService); - - if (nicAddr.equals("0.0.0.0")) { - wsURL = wsURL.replace("0.0.0.0", InetAddress.getLocalHost().getHostName()); - } - - System.out.println("Now running as a SOAP server. For the WSDL file, see: " + wsURL + "?WSDL"); - System.out.println("Press Ctrl+C to quit"); - System.out.println(""); - } - - /** - * Run the gui command - * - * @param cl - * @throws IOException - */ + public static class VerboseStatisticsLogger extends Thread { + private ModelBasedTesting mbt = null; + + private VerboseStatisticsLogger(ModelBasedTesting modelBasedTesting) { + this.mbt = modelBasedTesting; + } + + @Override + public void run() { + logger.info(mbt.getStatisticsVerbose()); + } + } + + private static Logger logger = Util.setupLogger(CLI.class); + private ModelBasedTesting mbt = null; + private Timer timer = null; + private Options opt = new Options(); + private static Endpoint endpoint = null; + + public CLI() { + mbt = new ModelBasedTesting(); + } + + private ModelBasedTesting getMbt() { + return mbt; + } + + /** + * @param mbt the ModelBasedTesting to set + */ + private void setMbt(ModelBasedTesting mbt) { + this.mbt = mbt; + } + + public static void main(String[] args) { + CLI cli = new CLI(); + Thread shutDownThread = new CLI.VerboseStatisticsLogger(cli.getMbt()); + try { + Runtime.getRuntime().addShutdownHook(shutDownThread); + } catch (IllegalArgumentException e) { + logger.debug("Could not register ShutdownHook for statistics logger, it has already been registered"); + } + try { + cli.run(args); + endpoint = cli.GetEndpoint(); + } catch (Exception e) { + Util.logStackTraceToError(e); + } + } + + private void run(String[] args) { + if (args.length < 1) { + System.err.println("Type 'java -jar graphwalker.jar help' for usage."); + return; + } else { + if (args[0].equals("help")) { + if (args.length == 1) { + printGeneralHelpText(); + } else { + printHelpText(args[1]); + } + return; + } else if (args[0].equalsIgnoreCase("requirements")) { + buildRequirementsCLI(); + } else if (args[0].equalsIgnoreCase("online")) { + buildOnlineCLI(); + } else if (args[0].equalsIgnoreCase("offline")) { + buildOfflineCLI(); + } else if (args[0].equalsIgnoreCase("methods")) { + buildMethodsCLI(); + } else if (args[0].equalsIgnoreCase("merge")) { + buildMergeCLI(); + } else if (args[0].equalsIgnoreCase("source")) { + buildSourceCLI(); + } else if (args[0].equalsIgnoreCase("manual")) { + buildManualCLI(); + } else if (args[0].equalsIgnoreCase("xml")) { + buildXmlCLI(); + } else if (args[0].equalsIgnoreCase("soap")) { + buildSoapCLI(); + } else if (args[0].equalsIgnoreCase("gui")) { + buildGuiCLI(); + } else if (args[0].equalsIgnoreCase("log")) { + buildLogCLI(); + } else if (args[0].equals("-v") || args[0].equals("--version")) { + printVersionInformation(); + return; + } else if (args[0].equals("-h") || args[0].equals("--help")) { + printGeneralHelpText(); + return; + } else { + System.err.println("Unkown command: " + args[0]); + System.err.println("Type 'java -jar graphwalker.jar help' for usage."); + return; + } + } + + try { + timer = new Timer(); + CommandLineParser parser = new PosixParser(); + CommandLine cl = parser.parse(opt, args); + + /** + * Command: requirements + */ + if (args[0].equalsIgnoreCase("requirements")) { + RunCommandRequirements(cl); + } + /** + * Command: online + */ + if (args[0].equalsIgnoreCase("online")) { + RunCommandOnline(cl); + } + /** + * Command: offline + */ + else if (args[0].equalsIgnoreCase("offline")) { + RunCommandOffline(cl); + } + /** + * Command: methods + */ + else if (args[0].equalsIgnoreCase("methods")) { + RunCommandMethods(cl); + } + /** + * Command: merge + */ + else if (args[0].equalsIgnoreCase("merge")) { + RunCommandMerge(cl); + } + /** + * Command: source + */ + else if (args[0].equalsIgnoreCase("source")) { + RunCommandSource(cl); + } + /** + * Command: xml + */ + else if (args[0].equalsIgnoreCase("xml")) { + RunCommandXml(cl); + } + /** + * Command: soap + */ + else if (args[0].equalsIgnoreCase("soap")) { + RunCommandSoap(cl); + } + /** + * Command: gui + */ + //else if (args[0].equalsIgnoreCase("gui")) { + // RunCommandGui(cl); + //} + /** + * Command: log + */ + //else if (args[0].equalsIgnoreCase("log")) { + // RunCommandLog(cl); + //} + /** + * Command: manual + */ + else if (args[0].equalsIgnoreCase("manual")) { + RunCommandManual(cl); + } + } catch (ArrayIndexOutOfBoundsException e) { + logger.warn(e.getMessage()); + System.err.println("The arguments for either the generator, or the stop-condition, is incorrect."); + System.err.println("Example: java -jar graphwalker.jar offline -f ../demo/model/UC01.graphml -s EDGE_COVERAGE:100 -g A_STAR"); + System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); + } catch (MissingOptionException e) { + logger.warn(e.getMessage()); + System.err.println("Mandatory option(s) are missing."); + System.err.println(e.getMessage()); + System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); + } catch (MissingArgumentException e) { + logger.warn(e.getMessage()); + System.err.println("Argument is required to the option."); + System.err.println(e.getMessage()); + System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); + } catch (UnrecognizedOptionException e) { + logger.warn(e.getMessage()); + System.err.println(e.getMessage()); + System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); + } catch (StopConditionException e) { + logger.warn(e.getMessage()); + System.err.println(e.getMessage()); + System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); + } catch (GeneratorException e) { + logger.warn(e.getMessage()); + System.err.println(e.getMessage()); + System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); + } catch (JDOMException e) { + logger.warn(e.getMessage()); + System.err.println("Can not access file: " + e.getMessage()); + System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); + } catch (FileNotFoundException e) { + logger.warn(e.getMessage()); + System.err.println("Can not access file: " + e.getMessage()); + System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); + } catch (IOException e) { + logger.warn(e.getMessage()); + System.err.println(e.getMessage()); + System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); + } catch (Exception e) { + Util.logStackTraceToError(e); + System.err.println(e.getMessage()); + System.err.println("Type 'java -jar graphwalker.jar help " + args[0] + "' for help."); + } finally { + timer.cancel(); + } + } + + private void printGeneralHelpText() { + System.out.println("usage: 'java -jar graphwalker.jar [OPTION] [ARGUMENT]'\n"); + System.out.println("Type 'java -jar graphwalker.jar help ' to get specific help about a command."); + System.out.println("Valid commands are:"); + System.out.println(" gui"); + System.out.println(" help"); + System.out.println(" manual"); + System.out.println(" merge"); + System.out.println(" methods"); + System.out.println(" offline"); + System.out.println(" online"); + System.out.println(" requirements"); + System.out.println(" soap"); + System.out.println(" source"); + System.out.println(" log"); + System.out.println(" xml\n"); + System.out.println("Type 'java -jar graphwalker.jar -v (--version)' for version information."); + } + + private void printHelpText(String helpSection) { + String header = ""; + if (helpSection.equalsIgnoreCase("online")) { + buildOnlineCLI(); + header = "Run the test online.\n" + "MBT will return a test sequence, one line at a time to standard output, " + + "it will wait until a line is fed back via standard input. The data fed back can be:\n" + + " '0' which means, continue the test as normal\n" + " '2' will end the test normally\n" + + "anything else will abort the execution.\n"; + } else if (helpSection.equalsIgnoreCase("requirements")) { + buildRequirementsCLI(); + header = "Print a list of requiremnts found in the model.\n"; + } else if (helpSection.equalsIgnoreCase("offline")) { + buildOfflineCLI(); + header = "Generate a test sequence offline. The sequence is printed to the standard output\n"; + } else if (helpSection.equalsIgnoreCase("manual")) { + buildManualCLI(); + header = "Generate a test sequence (offline). The output will be a HTML formatted test case document\n"; + } else if (helpSection.equalsIgnoreCase("methods")) { + buildMethodsCLI(); + header = "Generate all methods, or tests existing in the model.\n" + + "MBT will parse the graph(s), and return all methods (or tests) that" + + " exists in the graph(s). The list will onyl print out a unique name once." + " The list is printed to stdout.\n"; + } else if (helpSection.equalsIgnoreCase("merge")) { + buildMergeCLI(); + header = "Merge several graphml files into one single graphml file.\n" + + "The files to be merged, shall all exist in a single folder.\n"; + } else if (helpSection.equalsIgnoreCase("source")) { + buildSourceCLI(); + header = "Generate code from a template.\n" + + "Will generate code using a template. The code generated will contain all lables/names " + + "defined by the vertices and edges. This enables the user to write templates for a " + + "multitude of scripting or programming languages. " + "The result will be printed to stdout. " + + "There is 1 variable in the template, that will be replaced: {LABEL} ->Will be replace " + + "by the actual name of the edge or vertex."; + } else if (helpSection.equalsIgnoreCase("xml")) { + buildXmlCLI(); + header = "Setup mbt engine from xml.\n" + "Will setup and execute an engine based on xml specified criterias."; + } else if (helpSection.equalsIgnoreCase("soap")) { + buildSoapCLI(); + header = "Run MBT as a Web Services (SOAP) server.\n" + + "To see the services, see the WSDL file at: http://localhost:8080/mbt-services?WSDL"; + } else if (helpSection.equalsIgnoreCase("gui")) { + buildGuiCLI(); + header = "Run MBT in a GUI mode.\n" + "Also an mbt xml file can be supplied."; + } else if (helpSection.equalsIgnoreCase("log")) { + buildLogCLI(); + header = "This will start MBT's GUI, and load a model and it's log file.\n" + + "MBT parses the log file and shows the user how it traversed the model." + + " This is usefull when the user whishes to debug a session, and analyze the test."; + } else { + System.err.println("Type 'java -jar graphwalker.jar help' for usage."); + return; + } + + HelpFormatter f = new HelpFormatter(); + f.printHelp(100, "java -jar graphwalker.jar " + helpSection.toLowerCase(), header, opt, "", true); + } + + @SuppressWarnings("static-access") + private void buildRequirementsCLI() { + opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") + .withDescription("The file (or folder) containing graphml formatted files.").hasArg().withLongOpt("input_graphml").create("f")); + } + + private String generateListOfValidStopConditions() { + StringBuilder stringBuilder = new StringBuilder(); + for (StopCondition sc : Keywords.getStopConditions()) { + stringBuilder.append(sc.getDescription()); + stringBuilder.append(System.getProperty("line.separator")); + } + return stringBuilder.toString(); + } + + private String generateListOfValidGenerators() { + StringBuilder stringBuilder = new StringBuilder(); + for (Generator g : Keywords.getGenerators()) { + if (g.isPublished()) { + stringBuilder.append(g.getDescription()); + stringBuilder.append(System.getProperty("line.separator")); + } + } + return stringBuilder.toString(); + } + + @SuppressWarnings("static-access") + private void buildOnlineCLI() { + opt.addOption("a", "statistics", false, "Prints the statistics of the test, at the end of the run."); + opt.addOption("x", "extended", false, "Use an extended finite state machine to handle the model."); + opt.addOption("j", false, "Enable JavaScript engine"); + opt.addOption(OptionBuilder + .isRequired() + .withArgName("stop-condition") + .withDescription( + "Defines the stop condition(s).\nHalts the generation after the specified stop-conditon(s) has been met. " + + "At least 1 condition must be given. If more than 1 is given, the condition that meets " + + "it's stop-condition first, will cause the generation to halt. " + + "To separate multiple conditions, the separator pipe-character | is used. " + + "A list of valid stop-conditions are:\n -------------------\n" + generateListOfValidStopConditions() + + " -------------------\nFor more extensive examples, " + "see http://mbt.tigris.org/wiki/All_about_stop_conditions") + .hasArg().create("s")); + opt.addOption(OptionBuilder + .isRequired() + .withArgName("generator") + .withDescription( + "The generator to be used when traversing the model. At least 1 generator must be given. " + + "To separate multiple generators, the separator pipe-character | is used. " + + "A list of valid generators are:\n -------------------\n" + generateListOfValidGenerators() + + " -------------------\nFor more extensive examples, " + "see http://mbt.tigris.org/wiki/All_about_generators").hasArg() + .create("g")); + opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") + .withDescription("The file (or folder) containing graphml formatted files.").hasArg().withLongOpt("input_graphml").create("f")); + opt.addOption(OptionBuilder + .withArgName("seconds") + .withDescription( + "Prints the test coverage of the graph during execution every . The printout goes to the log file defined in " + + "mbt.properties, and only, if at least INFO level is set in " + "that same file.").hasArg().withLongOpt("log-coverage") + .create("o")); + opt.addOption("c", "class_name", true, "Optional class name to use for test execution."); + opt.addOption("t", "report-template", true, "Optional report template to use. (Also requires option -r) (To be better documented)"); + opt.addOption("r", "report-output", true, + "Optional report filename to save report to. (Also requires option -t) (To be better documented)"); + opt.addOption("w", "weighted", false, "Use weighted values if they exist in the model, and the generator is RANDOM."); + opt.addOption("d", "dry-run", false, "Will execute a dry-run of the model. Dialog will pop up for every edge and vertex."); + } + + /** + * Build the command offline command line parser + */ + @SuppressWarnings("static-access") + private void buildOfflineCLI() { + opt.addOption("a", false, "Prints the statistics of the test, at the end of the run."); + opt.addOption("x", false, "Use an extended finite state machine to handle the model."); + opt.addOption("j", false, "Enable JavaScript engine"); + opt.addOption(OptionBuilder + .isRequired() + .withArgName("stop-condition") + .withDescription( + "Defines the stop condition(s).\nHalts the generation after the specified stop-conditon(s) has been met. " + + "At least 1 condition must be given. If more than 1 is given, the condition that meets " + + "it's stop-condition first, will cause the generation to halt. " + + "To separate multiple conditions, the separator pipe-character | is used. " + + "A list of valid stop-conditions are:\n -------------------\n" + generateListOfValidStopConditions() + + " -------------------\nFor more extensive examples, " + "see http://mbt.tigris.org/wiki/All_about_stop_conditions") + .hasArg().create("s")); + opt.addOption(OptionBuilder + .isRequired() + .withArgName("generator") + .withDescription( + "The generator to be used when traversing the model. At least 1 generator must be given. " + + "To separate multiple generators, the separator pipe-character | is used. " + + "A list of valid generators are:\n -------------------\n" + generateListOfValidGenerators() + + " -------------------\nFor more extensive examples, " + "see http://mbt.tigris.org/wiki/All_about_generators").hasArg() + .create("g")); + opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") + .withDescription("The file (or folder) containing graphml formatted files.").hasArg().create("f")); + opt.addOption(OptionBuilder + .withArgName("seconds") + .withDescription( + "Prints the test coverage of the graph during execution every . The printout goes to the log file defined in " + + "mbt.properties, and only, if at least INFO level is set in " + "that same file.").hasArg().create("o")); + opt.addOption("t", "report-template", true, "Optional report template to use. (Also requires option -r) (To be better documented)"); + opt.addOption("r", "report-output", true, + "Optional report filename to save report to. (Also requires option -t) (To be better documented)"); + opt.addOption("w", "weighted", false, "Use weighted values if they exist in the model, and the generator is RANDOM."); + } + + /** + * Build the command manual command line parser + */ + @SuppressWarnings("static-access") + private void buildManualCLI() { + opt.addOption("x", false, "Use an extended finite state machine to handle the model."); + opt.addOption("j", false, "Enable JavaScript engine"); + opt.addOption(OptionBuilder + .isRequired() + .withArgName("stop-condition") + .withDescription( + "Defines the stop condition(s).\nHalts the generation after the specified stop-conditon(s) has been met. " + + "At least 1 condition must be given. If more than 1 is given, the condition that meets " + + "it's stop-condition first, will cause the generation to halt. " + + "To separate multiple conditions, the separator pipe-character | is used. " + + "A list of valid stop-conditions are:\n -------------------\n" + generateListOfValidStopConditions() + + " -------------------\nFor more extensive examples, " + "see http://mbt.tigris.org/wiki/All_about_stop_conditions") + .hasArg().create("s")); + opt.addOption(OptionBuilder + .isRequired() + .withArgName("generator") + .withDescription( + "The generator to be used when traversing the model. At least 1 generator must be given. " + + "To separate multiple generators, the separator pipe-character | is used. " + + "A list of valid generators are:\n -------------------\n" + generateListOfValidGenerators() + + " -------------------\nFor more extensive examples, " + "see http://mbt.tigris.org/wiki/All_about_generators").hasArg() + .create("g")); + opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") + .withDescription("The file (or folder) containing graphml formatted files.").hasArg().create("f")); + opt.addOption("w", "weighted", false, "Use weighted values if they exist in the model, and the generator is RANDOM."); + } + + @SuppressWarnings("static-access") + private void buildMethodsCLI() { + opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") + .withDescription("The file (or folder) containing graphml formatted files.").hasArg().withLongOpt("input_graphml").create("f")); + } + + /** + * Build the command merge command line parser + */ + @SuppressWarnings("static-access") + private void buildMergeCLI() { + opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") + .withDescription("The file (or folder) containing graphml formatted files.").hasArg().withLongOpt("input_graphml").create("f")); + opt.addOption("i", "index", true, "Print out the INDEX value when merging models. Default is true"); + } + + /** + * Build the command source command line parser + */ + @SuppressWarnings("static-access") + private void buildSourceCLI() { + opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") + .withDescription("The file (or folder) containing graphml formatted files.").hasArg().withLongOpt("input_graphml").create("f")); + opt.addOption(OptionBuilder.isRequired().withArgName("file").withDescription("The template file").hasArg().withLongOpt("template") + .create("t")); + } + + /** + * Build the command xml command line parser + */ + @SuppressWarnings("static-access") + private void buildXmlCLI() { + opt.addOption("a", false, "Prints the statistics of the test, at the end of the run."); + opt.addOption(OptionBuilder.isRequired().withArgName("file").withDescription("The xml file containing the mbt settings.").hasArg() + .create("f")); + opt.addOption(OptionBuilder + .withArgName("seconds") + .withDescription( + "Prints the test coverage of the graph during execution every . The printout goes to the log file defined in " + + "mbt.properties, and only, if at least INFO level is set in " + "that same file.").hasArg().create("o")); + opt.addOption("d", "dry-run", false, "Will execute a dry-run of the model. Dialog will pop up for every edge and vertex."); + } + + /** + * Build the command soap command line parser + */ + @SuppressWarnings("static-access") + private void buildSoapCLI() { + opt.addOption(OptionBuilder.withArgName("file").withDescription("The xml file containing the mbt model and settings.").hasArg() + .create("f")); + opt.addOption(OptionBuilder.withArgName("interface") + .withDescription("The network interface to which mbt should bind to. " + "If not given, the default is 0.0.0.0").hasArg() + .create("i")); + opt.addOption(OptionBuilder.withArgName("port") + .withDescription("The port to which mbt should listen to. " + "If not given, the default is 9090").hasArg().create("p")); + } + + /** + * Build the command gui command line parser + */ + @SuppressWarnings("static-access") + private void buildGuiCLI() { + opt.addOption(OptionBuilder.withArgName("file").withDescription("The xml file containing the mbt settings.").hasArg().create("f")); + } + + /** + * Build the command log command line parser + */ + @SuppressWarnings("static-access") + private void buildLogCLI() { + opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") + .withDescription("The file (or folder) containing graphml formatted files.").hasArg().withLongOpt("input_graphml").create("f")); + opt.addOption(OptionBuilder.withArgName("log").withDescription("The log file from a previuos run.").hasArg().create("l")); + } + + /** + * Print version information + */ + private void printVersionInformation() { + System.out.println("org.graphwalker version " + mbt.getVersionString() + "\n"); + System.out.println("org.graphwalker is open source software licensed under MIT licens"); + System.out.println("The software (and it's source) can be downloaded from http://graphwalker.org"); + System.out + .println("For a complete list of this package software dependencies, see http://graphwalker.org:8080/job/graphwalker/site/dependencies.html"); + } + + /** + * Run the offline command + * + * @param cl + * @throws StopConditionException + * @throws GeneratorException + * @throws InterruptedException + * @throws FileNotFoundException + */ + private void RunCommandOffline(CommandLine cl) throws StopConditionException, GeneratorException, InterruptedException, + FileNotFoundException { + /** + * Get the model from the graphml file (or folder) + */ + if (helpNeeded("offline", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") + || helpNeeded("offline", !cl.hasOption("s"), "A stop condition must be supplied, See option -s") + || helpNeeded("offline", cl.hasOption("t") && !cl.hasOption("r"), + "A report output file must be set, See -t, when using a report template") + || helpNeeded("offline", !cl.hasOption("t") && cl.hasOption("r"), + "A report template must be set, See -r, when using a report output file") + || helpNeeded("offline", !cl.hasOption("g"), "Missing the generator, See option -g")) + return; + + getMbt().readGraph(cl.getOptionValue("f")); + getMbt().enableJsScriptEngine(cl.hasOption("j")); + getMbt().enableExtended(cl.hasOption("x")); + getMbt().setWeighted(cl.hasOption("w")); + + /* + * Set the stop-conditions(s) + */ + AlternativeCondition alternativeCondition = new AlternativeCondition(); + String[] stopConditions = cl.getOptionValue("s").split("\\|"); + for (String stopCondition : stopConditions) { + String[] sc = stopCondition.trim().split(":"); + alternativeCondition.add(Util.getCondition(null, Keywords.getStopCondition(sc[0].trim()) // Stop + // condition + , (sc.length == 1 ? "" : sc[1].trim()))); // Optional condition + // parameter + } + + /* + * Set the generators(s) + */ + String[] generators = cl.getOptionValue("g").split("\\|"); + for (String genrator : generators) { + getMbt().setGenerator(Keywords.getGenerator(genrator.trim())); + } + getMbt().getGenerator().setStopCondition(alternativeCondition); + + if (cl.hasOption("o")) { + long seconds = Integer.valueOf(cl.getOptionValue("o")).longValue(); + + logger.info("Append coverage to log every: " + seconds + " seconds"); + + TimerTask logTask; + if (cl.hasOption("t") && cl.hasOption("r")) { + getMbt().setUseStatisticsManager(true); + getMbt().getStatisticsManager().setReportTemplate(new FileInputStream(new File(cl.getOptionValue('t')))); + final String reportName = cl.getOptionValue('r'); + logTask = new TimerTask() { + @Override + public void run() { + try { + getMbt().getStatisticsManager().writeFullReport(new PrintStream(reportName)); + } catch (FileNotFoundException e) { + throw new RuntimeException("Could not open or write report file '" + reportName + "'", e); + } + } + }; + } else { + logTask = new TimerTask() { + @Override + public void run() { + logger.info(getMbt().getStatisticsCompact()); + } + }; + } + timer = new Timer(); + timer.schedule(logTask, 500, seconds * 1000); + } + + getMbt().writePath(); + + if (cl.hasOption("a")) { + writeStatisticsVerbose(System.out); + } + if (cl.hasOption("o")) { + logger.info(mbt.getStatisticsCompact()); + } + if (cl.hasOption("t") && cl.hasOption("r")) { + getMbt().getStatisticsManager().setReportTemplate(new FileInputStream(new File(cl.getOptionValue('t')))); + getMbt().getStatisticsManager().writeFullReport(cl.getOptionValue('r')); + } + + } + + /** + * Run the manual command + * + * @param cl + * @throws StopConditionException + * @throws GeneratorException + * @throws InterruptedException + */ + private void RunCommandManual(CommandLine cl) throws StopConditionException, GeneratorException, InterruptedException { + /** + * Get the model from the graphml file (or folder) + */ + if (helpNeeded("manual", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") + || helpNeeded("manual", !cl.hasOption("s"), "A stop condition must be supplied, See option -s") + || helpNeeded("manual", !cl.hasOption("g"), "Missing the generator, See option -g")) + return; + + getMbt().setManualTestSequence(true); + getMbt().readGraph(cl.getOptionValue("f")); + getMbt().enableJsScriptEngine(cl.hasOption("j")); + getMbt().enableExtended(cl.hasOption("x")); + getMbt().setWeighted(cl.hasOption("w")); + + /* + * Set the stop-conditions(s) + */ + AlternativeCondition alternativeCondition = new AlternativeCondition(); + String[] stopConditions = cl.getOptionValue("s").split("\\|"); + for (String stopCondition : stopConditions) { + String[] sc = stopCondition.trim().split(":"); + alternativeCondition.add(Util.getCondition(null, Keywords.getStopCondition(sc[0].trim()) // Stop + // condition + , (sc.length == 1 ? "" : sc[1].trim()))); // Optional condition + // parameter + } + + /* + * Set the generators(s) + */ + String[] generators = cl.getOptionValue("g").split("\\|"); + for (String genrator : generators) { + getMbt().setGenerator(Keywords.getGenerator(genrator.trim())); + } + getMbt().getGenerator().setStopCondition(alternativeCondition); + + Vector testSequence = new Vector(); + getMbt().writePath(testSequence); + + new PrintHTMLTestSequence(testSequence, System.out); + } + + /** + * Run the online command + * + * @param cl + * @throws StopConditionException + * @throws GeneratorException + * @throws InterruptedException + * @throws FileNotFoundException + */ + private void RunCommandOnline(CommandLine cl) throws StopConditionException, GeneratorException, InterruptedException, + FileNotFoundException { + /** + * Get the model from the graphml file (or folder) + */ + if (helpNeeded("online", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") + || helpNeeded("online", !cl.hasOption("s"), "A stop condition must be supplied, See option -s") + || helpNeeded("online", cl.hasOption("t") && !cl.hasOption("r"), + "A report output file must be set, See -t, when using a report template") + || helpNeeded("online", !cl.hasOption("t") && cl.hasOption("r"), + "A report template must be set, See -r, when using a report output file") + || helpNeeded("online", !cl.hasOption("g"), "Missing the generator, See option -g")) + return; + + getMbt().readGraph(cl.getOptionValue("f")); + getMbt().enableJsScriptEngine(cl.hasOption("j")); + getMbt().enableExtended(cl.hasOption("x")); + getMbt().setWeighted(cl.hasOption("w")); + + /* + * Set the stop-conditions(s) + */ + AlternativeCondition alternativeCondition = new AlternativeCondition(); + String[] stopConditions = cl.getOptionValue("s").split("\\|"); + for (String stopCondition : stopConditions) { + String[] sc = stopCondition.trim().split(":"); + alternativeCondition.add(Util.getCondition(null, Keywords.getStopCondition(sc[0].trim()) // Stop + // condition + , (sc.length == 1 ? "" : sc[1].trim()))); // Optional condition + // parameter + } + + /* + * Set the generators(s) + */ + String[] genrators = cl.getOptionValue("g").split("\\|"); + for (String genrator : genrators) { + getMbt().setGenerator(Keywords.getGenerator(genrator.trim())); + } + getMbt().getGenerator().setStopCondition(alternativeCondition); + + /** + * Set dry-run + */ + getMbt().setDryRun(cl.hasOption("d")); + + if (cl.hasOption("o")) { + long seconds = Integer.valueOf(cl.getOptionValue("o")).longValue(); + + logger.info("Append coverage to log every: " + seconds + " seconds"); + + TimerTask logTask; + if (cl.hasOption("t") && cl.hasOption("r")) { + getMbt().setUseStatisticsManager(true); + getMbt().getStatisticsManager().setReportTemplate(new FileInputStream(new File(cl.getOptionValue('t')))); + final String reportName = cl.getOptionValue('r'); + logTask = new TimerTask() { + @Override + public void run() { + try { + getMbt().getStatisticsManager().writeFullReport(new PrintStream(reportName)); + } catch (FileNotFoundException e) { + throw new RuntimeException("Could not open or write report file '" + reportName + "'", e); + } + } + }; + } else { + logTask = new TimerTask() { + @Override + public void run() { + logger.info(getMbt().getStatisticsCompact()); + } + }; + } + timer = new Timer(); + timer.schedule(logTask, 500, seconds * 1000); + } + + if (cl.hasOption("c")) { + getMbt().executePath(cl.getOptionValue("c")); + } else if (cl.hasOption("d")) { + getMbt().executePath((String) null); + } else { + getMbt().interractivePath(); + } + + if (cl.hasOption("a")) { + writeStatisticsVerbose(System.out); + } + if (cl.hasOption("o")) { + logger.info(mbt.getStatisticsCompact()); + } + if (cl.hasOption("t") && cl.hasOption("r")) { + getMbt().getStatisticsManager().setReportTemplate(new FileInputStream(new File(cl.getOptionValue('t')))); + getMbt().getStatisticsManager().writeFullReport(cl.getOptionValue('r')); + } + + } + + private void writeStatisticsVerbose(PrintStream out) { + out.println(getMbt().getStatisticsVerbose()); + } + + /** + * Run the source command + * + * @param cl + * @throws GeneratorException + * @throws IOException + * @throws InterruptedException + */ + private void RunCommandSource(CommandLine cl) throws GeneratorException, IOException, InterruptedException { + if (helpNeeded("source", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") + || helpNeeded("source", !cl.hasOption("t"), "Missing the template file. See -t (--template)")) + return; + + getMbt().readGraph(cl.getOptionValue("f")); + getMbt().setTemplate(cl.getOptionValue("t")); + getMbt().setGenerator(Keywords.GENERATOR_STUB); + getMbt().writePath(System.out); + } + + /** + * Run the requirements command This method prints out all the Requirements + * found in the graph. + * + * @throws GeneratorException + * @throws InterruptedException + */ + private void RunCommandRequirements(CommandLine cl) throws GeneratorException, InterruptedException { + if (helpNeeded("requirements", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)")) + return; + + getMbt().readGraph(cl.getOptionValue("f")); + getMbt().getMachine().populateReqHashMap(); + + Iterator> it = getMbt().getMachine().getReqs().entrySet().iterator(); + while (it.hasNext()) { + Entry pairs = it.next(); + System.out.println(pairs.getKey()); + } + } + + /** + * Run the methods command + * + * @param cl + * @throws GeneratorException + * @throws InterruptedException + */ + private void RunCommandMethods(CommandLine cl) throws GeneratorException, InterruptedException { + if (helpNeeded("methods", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)")) + return; + + getMbt().readGraph(cl.getOptionValue("f")); + getMbt().setTemplate(new String[]{"", "{LABEL}", ""}); + getMbt().setGenerator(Keywords.GENERATOR_STUB); + getMbt().writePath(System.out); + } + + /** + * Run the merge command + * + * @param cl + */ + private void RunCommandMerge(CommandLine cl) { + if (helpNeeded("merge", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)")) + return; + + getMbt().readGraph(cl.getOptionValue("f")); + getMbt().writeModel(System.out, !cl.hasOption("i")); + } + + /** + * Run the xml command + * + * @param cl + * @throws StopConditionException + * @throws GeneratorException + * @throws IOException + * @throws JDOMException + * @throws InterruptedException + */ + private void RunCommandXml(CommandLine cl) throws StopConditionException, GeneratorException, IOException, JDOMException, + InterruptedException { + if (helpNeeded("xml", !cl.hasOption("f"), "Missing the input xml file, See option -f")) + return; + + setMbt(Util.loadMbtFromXml(Util.getFile(cl.getOptionValue("f")), cl.hasOption("d"))); + + if (cl.hasOption("a")) { + logger.info(getMbt().getStatisticsVerbose()); + writeStatisticsVerbose(System.out); + } + } + + /** + * Run the soap command + * + * @param cl + * @throws StopConditionException + * @throws GeneratorException + * @throws IOException + * @throws JDOMException + * @throws InterruptedException + */ + private void RunCommandSoap(CommandLine cl) throws StopConditionException, GeneratorException, IOException, JDOMException, + InterruptedException { + String port = null; + String nicAddr = null; + if (cl.hasOption("p")) { + port = cl.getOptionValue("p"); + } else { + port = Util.readWSPort(); + } + + if (cl.hasOption("i")) { + nicAddr = Util.getInternetAddr(cl.getOptionValue("i")).getCanonicalHostName(); + } else { + nicAddr = "0.0.0.0"; + } + + String file = cl.getOptionValue("f"); + if (file == null || file.isEmpty()) { + setMbt(new ModelBasedTesting()); + } else { + setMbt(Util.loadMbtAsWSFromXml(Util.getFile(file))); + } + + String wsURL = "http://" + nicAddr + ":" + port + "/mbt-services"; + SoapServices soapService = new SoapServices(getMbt()); + soapService.xmlFile = file; + + endpoint = Endpoint.publish(wsURL, soapService); + + if (nicAddr.equals("0.0.0.0")) { + wsURL = wsURL.replace("0.0.0.0", InetAddress.getLocalHost().getHostName()); + } + + System.out.println("Now running as a SOAP server. For the WSDL file, see: " + wsURL + "?WSDL"); + System.out.println("Press Ctrl+C to quit"); + System.out.println(""); + } + + /** + * Run the gui command + * + * @param cl + * @throws IOException + */ /* private void RunCommandGui(CommandLine cl) throws IOException { if (cl.hasOption("f")) { @@ -1060,12 +1045,13 @@ private void RunCommandGui(CommandLine cl) throws IOException { } } */ - /** - * Run the log command - * - * @param cl - * @throws IOException - */ + + /** + * Run the log command + * + * @param cl + * @throws IOException + */ /* private void RunCommandLog(CommandLine cl) throws IOException { if (helpNeeded("log", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") @@ -1075,15 +1061,15 @@ private void RunCommandLog(CommandLine cl) throws IOException { App.main(new String[] { cl.getOptionValue("f"), cl.getOptionValue("l") }); } */ - private boolean helpNeeded(String module, boolean condition, String message) { - if (condition) { - System.out.println(message); - System.out.println("Type 'java -jar graphwalker.jar help " + module + "' for help."); - } - return condition; - } - - private Endpoint GetEndpoint() { - return endpoint; - } + private boolean helpNeeded(String module, boolean condition, String message) { + if (condition) { + System.out.println(message); + System.out.println("Type 'java -jar graphwalker.jar help " + module + "' for help."); + } + return condition; + } + + private Endpoint GetEndpoint() { + return endpoint; + } } \ No newline at end of file diff --git a/graphwalker-cli/src/test/java/org/graphwalker/cli/CLITest.java b/graphwalker-cli/src/test/java/org/graphwalker/cli/CLITest.java index 2feb81a0..73081d28 100644 --- a/graphwalker-cli/src/test/java/org/graphwalker/cli/CLITest.java +++ b/graphwalker-cli/src/test/java/org/graphwalker/cli/CLITest.java @@ -26,419 +26,414 @@ package org.graphwalker.cli; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.PrintStream; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.apache.log4j.Logger; - import junit.framework.TestCase; +import org.apache.log4j.Logger; import org.graphwalker.core.ModelBasedTesting; import org.graphwalker.core.Util; +import java.io.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + public class CLITest extends TestCase { - Pattern pattern; - Matcher matcher; - StringBuffer stdOutput; - StringBuffer errOutput; - String outMsg; - String errMsg; - static Logger logger = Util.setupLogger(CLITest.class); - - @Override - protected void setUp() throws Exception { - super.setUp(); - ModelBasedTesting.getInstance().reset(); - } - - private OutputStream redirectOut() { - return new OutputStream() { - @Override - public void write(int b) throws IOException { - stdOutput.append(Character.toString((char) b)); - } - }; - } - - private OutputStream redirectErr() { - return new OutputStream() { - @Override - public void write(int b) throws IOException { - errOutput.append(Character.toString((char) b)); - } - }; - } - - private InputStream redirectIn() { - return new InputStream() { - @Override - public int read() throws IOException { - try { - Thread.sleep(300); - } catch (InterruptedException e) { - Util.logStackTraceToError(e); - } - return '0'; - } - }; - } - - private void runCommand(String args[]) { - stdOutput = new StringBuffer(); - errOutput = new StringBuffer(); - - PrintStream outStream = new PrintStream(redirectOut()); - PrintStream oldOutStream = System.out; // backup - PrintStream errStream = new PrintStream(redirectErr()); - PrintStream oldErrStream = System.err; // backup - - System.setOut(outStream); - System.setErr(errStream); - - CLI.main(args); - - System.setOut(oldOutStream); - System.setErr(oldErrStream); - - outMsg = stdOutput.toString(); - errMsg = errOutput.toString(); - logger.debug("stdout: " + outMsg); - logger.debug("stderr: " + errMsg); - } - - private void moveMbtPropertiesFile() { - File mbt_properties = new File("graphwalker.properties"); - if (mbt_properties.exists()) { - mbt_properties.renameTo(new File("graphwalker.properties.bak")); - } - assertFalse(new File("graphwalker.properties").exists()); - } - - private void restoreMbtPropertiesFile() { - File mbt_properties = new File("graphwalker.properties.bak"); - if (mbt_properties.exists()) { - mbt_properties.renameTo(new File("graphwalker.properties")); - } - assertFalse(new File("graphwalker.properties.bak").exists()); - } - - /** - * Test command: java -jar mbt.jar - */ - public void testNoArgs() { - String args[] = {}; - runCommand(args); - pattern = Pattern.compile("Type 'java -jar graphwalker.jar help' for usage.", Pattern.MULTILINE); - matcher = pattern.matcher(errMsg); - assertTrue(matcher.find()); - assertTrue("Nothing should be written to standard output: " + outMsg, outMsg.isEmpty()); - } - - /** - * Test command: java -jar mbt.jar -v - */ - public void testVersion() { - String args[] = { "-v" }; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - pattern = Pattern.compile("^org\\.graphwalker version " + ModelBasedTesting.getInstance().getVersionString(), Pattern.MULTILINE); - matcher = pattern.matcher(outMsg); - assertTrue(matcher.find()); - } - - /** - * Test command: java -jar mbt.jar - */ - public void testNoMbtPropertiesFile() { - String args[] = {}; - moveMbtPropertiesFile(); - runCommand(args); - restoreMbtPropertiesFile(); - pattern = Pattern.compile("Type 'java -jar graphwalker.jar help' for usage.", Pattern.MULTILINE); - matcher = pattern.matcher(errMsg); - assertTrue(matcher.find()); - assertTrue("Nothing should be written to standard output: " + outMsg, outMsg.isEmpty()); - } - - /** - * Test command: java -jar mbt.jar offline -f - * graphml/reqtags/ExtendedMain.graphml -g RANDOM -s TEST_LENGTH:10 - */ - public void testNoMbtPropertiesFileOffline() { - String args[] = { "offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "RANDOM", "-s", "TEST_LENGTH:10" }; - moveMbtPropertiesFile(); - runCommand(args); - restoreMbtPropertiesFile(); - System.out.println(errMsg); - assertEquals("No error messages should occur.", "", errMsg); - assertEquals(0, getNumMatches(Pattern.compile("INFO").matcher(outMsg))); - } - - /** - * Test command: java -jar mbt.jar sputnik - */ - public void testUnkownCommand() { - String args[] = { "sputnik" }; - runCommand(args); - pattern = Pattern.compile("^Unkown command: .*\\s+", Pattern.MULTILINE); - matcher = pattern.matcher(errMsg); - assertTrue(matcher.find()); - assertTrue("Nothing should be written to standard output: " + outMsg, outMsg.isEmpty()); - } - - /** - * Test command: java -jar mbt.jar offline -f - * graphml/reqtags/ExtendedMain.graphml -g A_STAR -s EDGE_COVERAGE:100 - */ - public void testOfflineA_StarEdgeCoverage() { - String args[] = { "offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "A_STAR", "-s", "EDGE_COVERAGE:100" }; - runCommand(args); - assertEquals(errMsg, "", errMsg); - assertEquals(outMsg, 0, getNumMatches(Pattern.compile("INFO").matcher(outMsg))); - } - - private int getNumMatches(Matcher m) { - int numMatches = 0; - while (m.find() == true) - numMatches++; - return numMatches; - } - - /** - * Test command: java -jar mbt.jar offline -f - * graphml/reqtags/ExtendedMain.graphml -g RANDOM -s EDGE_COVERAGE:100 - */ - public void testOfflineRandomEdgeCoverage() { - String args[] = { "offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "RANDOM", "-s", "EDGE_COVERAGE:100" }; - runCommand(args); - assertTrue("No error messgaes should occur: " + errMsg, errMsg.isEmpty()); - assertTrue("Expected at least 78 lines, got: " + outMsg.split("\r\n|\r|\n").length, outMsg.split("\r\n|\r|\n").length >= 78); - } - - /** - * Test command: java -jar mbt.jar offline -f - * graphml/reqtags/ExtendedMain.graphml -g RANDOM -s VERTEX_COVERAGE:100 - */ - public void testOfflineRandomStateCoverage() { - String args[] = { "offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "RANDOM", "-s", "VERTEX_COVERAGE:100" }; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - assertTrue("Expected at least 24 lines, got: " + outMsg.split("\r\n|\r|\n").length, outMsg.split("\r\n|\r|\n").length >= 24); - } - - /** - * Test command: java -jar mbt.jar offline -f - * graphml/reqtags/ExtendedMain.graphml -g A_STAR -s VERTEX_COVERAGE:100 - */ - public void testOfflineA_StarStateCoverage() { - String args[] = { "offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "A_STAR", "-s", "VERTEX_COVERAGE:100" }; - runCommand(args); - assertEquals("No error messages should occur.", "", errMsg); - assertTrue(outMsg, getNumMatches(Pattern.compile("INFO").matcher(outMsg)) <= 21); - } - - /** - * Test command: java -jar mbt.jar offline -f - * graphml/reqtags/ExtendedMain.graphml -g a_star -s "REACHED_REQUIREMENT:req - * 78 - */ - public void testOfflineA_StarReachedRequirement() { - String args[] = { "offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "a_star", "-s", "REACHED_REQUIREMENT:req 78" }; - runCommand(args); - assertEquals("No error messages should occur.", "", errMsg); - assertEquals(0, getNumMatches(Pattern.compile("INFO").matcher(outMsg))); - } - - /** - * Test command: java -jar mbt.jar requirements -f - * graphml/reqtags/ExtendedMain.graphml - */ - public void testListReqTags() { - String args[] = { "requirements", "-f", "graphml/reqtags/ExtendedMain.graphml"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - assertEquals(6, getNumMatches(Pattern.compile("req[ \\d]+").matcher(outMsg))); - } - - /** - * Test command: java -jar mbt.jar source -f graphml/methods/Main.graphml -t - * templates/perl.template - */ - public void testGenerateCodeFromTemplateHeaderAndFooter() { - String args[] = { "source", "-f", "graphml/methods/Main.graphml", "-t", "templates/junit.template" }; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - pattern = Pattern.compile(" implements the ", Pattern.MULTILINE); - matcher = pattern.matcher(outMsg); - assertTrue(matcher.find()); - } - - /** - * Test command: java -jar mbt.jar source -f graphml/methods/Main.graphml -t - * templates/perl.template - */ - public void testGenerateCodeFromTemplate() { - String args[] = { "source", "-f", "graphml/methods/Main.graphml", "-t", "templates/perl.template" }; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - pattern = Pattern.compile(" implements the ", Pattern.MULTILINE); - matcher = pattern.matcher(outMsg); - assertTrue(matcher.find()); - } - - /** - * Test command: java -jar mbt.jar offline -f - * graphml/misc/missing_inedges.graphml -g RANDOM -s EDGE_COVERAGE:100 - */ - public void testNoVerticesWithNoInEdges() { - String args[] = { "offline", "-f", "graphml/misc/missing_inedges.graphml", "-g", "RANDOM", "-s", "EDGE_COVERAGE:100" }; - runCommand(args); - pattern = Pattern.compile("^No in-edges! Vertex: .* is not reachable, from file: 'graphml.misc.missing_inedges.graphml'$", - Pattern.MULTILINE); - matcher = pattern.matcher(errMsg); - assertTrue(matcher.find()); - } - - /** - * Test command: java -jar mbt.jar offline -f - * graphml/misc/missing_inedges.graphml -g RANDOM -s EDGE_COVERAGE:100 - */ - public void testVertexWithNoInEdges() { - String args[] = { "offline", "-f", "graphml/misc/missing_inedges.graphml", "-g", "RANDOM", "-s", "EDGE_COVERAGE:100" }; - runCommand(args); - pattern = Pattern.compile("No in-edges! Vertex: 'v_InvalidKey', INDEX=9 is not reachable.", Pattern.MULTILINE); - matcher = pattern.matcher(errMsg); - assertTrue(matcher.find()); - } - - /** - * Test command: java -jar mbt.jar online -f graphml/methods/Main.graphml -g - * RANDOM -s TEST_DURATION:10 - */ - public void testOnlineRandom10seconds() { - String args[] = { "online", "-f", "graphml/methods/Main.graphml", "-g", "RANDOM", "-s", "TEST_DURATION:10", "-o", "1" }; - InputStream oldInputStream = System.in; // backup - System.setIn(redirectIn()); - long startTime = System.currentTimeMillis(); - runCommand(args); - long runTime = System.currentTimeMillis() - startTime; - System.setIn(oldInputStream); - assertEquals("No error messages should occur.", "", errMsg); - assertTrue((runTime - 10000) < 3000); - } - - /** - * Test command: java -jar mbt.jar methods -f graphml/methods/Main.graphml - */ - public void testCountMethods() { - String args[] = { "methods", "-f", "graphml/methods/Main.graphml"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - pattern = Pattern - .compile( - "e_Cancel\\s+e_CloseApp\\s+e_CloseDB\\s+e_CloseDialog\\s+e_EnterCorrectKey\\s+e_EnterInvalidKey\\s+e_Initialize\\s+e_No\\s+e_Start\\s+e_StartWithDatabase\\s+e_Yes\\s+v_EnterMasterCompositeMasterKey\\s+v_InvalidKey\\s+v_KeePassNotRunning\\s+v_MainWindowEmpty\\s+v_MainWindow_DB_Loaded\\s+v_SaveBeforeCloseLock", - Pattern.MULTILINE); - matcher = pattern.matcher(outMsg); - assertTrue(matcher.find()); - } - - /** - * Check for reserved keywords Test command: java -jar mbt.jar methods -f - * graphml/test24 - */ - public void testReservedKeywords() { - String args[] = { "methods", "-f", "graphml/test24" }; - runCommand(args); - pattern = Pattern.compile( - "Could not parse file: '.*graphml.test24.(Camera|Time).graphml'. Edge has a label 'BACKTRACK', which is a reserved keyword", - Pattern.MULTILINE); - matcher = pattern.matcher(errMsg); - System.out.println(errMsg); - assertTrue(matcher.find()); - } - - /** - * Check for reserved keywords Test command: java -jar mbt.jar xml -f - * xml/reqtags/mbt_init6.xml - */ - public void testXmlSetup() { - String args[] = { "xml", "-f", "xml/reqtags/mbt_init6.xml"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - assertEquals(6, getNumMatches(Pattern.compile("req[ \\d]+").matcher(outMsg))); - } - - /** - * Check that xml with java executor. Test command: java -jar mbt.jar xml -f - * xml/reqtags/mbt_init5.xml - */ - public void testXmlSetupWithJavaExecutor() { - String args[] = { "xml", "-f", "xml/javaExecutor.xml"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - assertEquals(outMsg, 76, getNumMatches(Pattern.compile("(Vertex:|Edge:)").matcher(outMsg))); - } - - /** - * Test command: java -jar mbt.jar soap -f xml/reqtags/mbt_init6.xml - */ - public void testSOAPWithXML() { - String args[] = { "soap", "-f", "xml/reqtags/mbt_init6.xml"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - assertTrue( - outMsg, - outMsg - .matches("(?s).*Now running as a SOAP server. For the WSDL file, see: http://.*:9090/mbt-services\\?WSDL\\s+Press Ctrl\\+C to quit\\s+")); - } - - /** - * Test command: java -jar mbt.jar soap - */ - public void testSOAPWithoutXML() { - String args[] = { "soap" }; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - assertEquals( - true, - outMsg - .matches("Now running as a SOAP server. For the WSDL file, see: http://.*:9090/mbt-services\\?WSDL\\s+Press Ctrl\\+C to quit\\s+")); - } - - /** - * Test command: java -jar mbt.jar soap -f xml/reqtags/mbt_init6.xml - */ - public void testSOAPWithCorrectClassPathInXML() { - String args[] = { "soap", "-f", "xml/reqtags/mbt_init8.xml"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - assertTrue( - outMsg, - outMsg - .matches("(?s).*Now running as a SOAP server. For the WSDL file, see: http://.*:9090/mbt-services\\?WSDL\\s+Press Ctrl\\+C to quit\\s+")); - } - - /** - * Test command: java -jar mbt.jar soap -f xml/reqtags/mbt_init9.xml - */ - public void testSOAPWithIncorrectClassPathInXML() { - String args[] = { "soap", "-f", "xml/reqtags/mbt_init9.xml"}; - runCommand(args); - assertTrue(errMsg, errMsg.matches("(?s).*Could not add: 'non-existing-path' to CLASSPATH.*")); - } - - /** - * Test command: java -jar mbt.jar xml -f xml/ReachedVertex.xml - */ - public void testReachedVertexXML() { - String args[] = { "xml", "-f", "xml/ReachedVertex.xml"}; - runCommand(args); - System.out.println(errMsg); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - } + Pattern pattern; + Matcher matcher; + StringBuffer stdOutput; + StringBuffer errOutput; + String outMsg; + String errMsg; + static Logger logger = Util.setupLogger(CLITest.class); + + @Override + protected void setUp() throws Exception { + super.setUp(); + ModelBasedTesting.getInstance().reset(); + } + + private OutputStream redirectOut() { + return new OutputStream() { + @Override + public void write(int b) throws IOException { + stdOutput.append(Character.toString((char) b)); + } + }; + } + + private OutputStream redirectErr() { + return new OutputStream() { + @Override + public void write(int b) throws IOException { + errOutput.append(Character.toString((char) b)); + } + }; + } + + private InputStream redirectIn() { + return new InputStream() { + @Override + public int read() throws IOException { + try { + Thread.sleep(300); + } catch (InterruptedException e) { + Util.logStackTraceToError(e); + } + return '0'; + } + }; + } + + private void runCommand(String args[]) { + stdOutput = new StringBuffer(); + errOutput = new StringBuffer(); + + PrintStream outStream = new PrintStream(redirectOut()); + PrintStream oldOutStream = System.out; // backup + PrintStream errStream = new PrintStream(redirectErr()); + PrintStream oldErrStream = System.err; // backup + + System.setOut(outStream); + System.setErr(errStream); + + CLI.main(args); + + System.setOut(oldOutStream); + System.setErr(oldErrStream); + + outMsg = stdOutput.toString(); + errMsg = errOutput.toString(); + logger.debug("stdout: " + outMsg); + logger.debug("stderr: " + errMsg); + } + + private void moveMbtPropertiesFile() { + File mbt_properties = new File("graphwalker.properties"); + if (mbt_properties.exists()) { + mbt_properties.renameTo(new File("graphwalker.properties.bak")); + } + assertFalse(new File("graphwalker.properties").exists()); + } + + private void restoreMbtPropertiesFile() { + File mbt_properties = new File("graphwalker.properties.bak"); + if (mbt_properties.exists()) { + mbt_properties.renameTo(new File("graphwalker.properties")); + } + assertFalse(new File("graphwalker.properties.bak").exists()); + } + + /** + * Test command: java -jar mbt.jar + */ + public void testNoArgs() { + String args[] = {}; + runCommand(args); + pattern = Pattern.compile("Type 'java -jar graphwalker.jar help' for usage.", Pattern.MULTILINE); + matcher = pattern.matcher(errMsg); + assertTrue(matcher.find()); + assertTrue("Nothing should be written to standard output: " + outMsg, outMsg.isEmpty()); + } + + /** + * Test command: java -jar mbt.jar -v + */ + public void testVersion() { + String args[] = {"-v"}; + runCommand(args); + assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); + pattern = Pattern.compile("^org\\.graphwalker version " + ModelBasedTesting.getInstance().getVersionString(), Pattern.MULTILINE); + matcher = pattern.matcher(outMsg); + assertTrue(matcher.find()); + } + + /** + * Test command: java -jar mbt.jar + */ + public void testNoMbtPropertiesFile() { + String args[] = {}; + moveMbtPropertiesFile(); + runCommand(args); + restoreMbtPropertiesFile(); + pattern = Pattern.compile("Type 'java -jar graphwalker.jar help' for usage.", Pattern.MULTILINE); + matcher = pattern.matcher(errMsg); + assertTrue(matcher.find()); + assertTrue("Nothing should be written to standard output: " + outMsg, outMsg.isEmpty()); + } + + /** + * Test command: java -jar mbt.jar offline -f + * graphml/reqtags/ExtendedMain.graphml -g RANDOM -s TEST_LENGTH:10 + */ + public void testNoMbtPropertiesFileOffline() { + String args[] = {"offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "RANDOM", "-s", "TEST_LENGTH:10"}; + moveMbtPropertiesFile(); + runCommand(args); + restoreMbtPropertiesFile(); + System.out.println(errMsg); + assertEquals("No error messages should occur.", "", errMsg); + assertEquals(0, getNumMatches(Pattern.compile("INFO").matcher(outMsg))); + } + + /** + * Test command: java -jar mbt.jar sputnik + */ + public void testUnkownCommand() { + String args[] = {"sputnik"}; + runCommand(args); + pattern = Pattern.compile("^Unkown command: .*\\s+", Pattern.MULTILINE); + matcher = pattern.matcher(errMsg); + assertTrue(matcher.find()); + assertTrue("Nothing should be written to standard output: " + outMsg, outMsg.isEmpty()); + } + + /** + * Test command: java -jar mbt.jar offline -f + * graphml/reqtags/ExtendedMain.graphml -g A_STAR -s EDGE_COVERAGE:100 + */ + public void testOfflineA_StarEdgeCoverage() { + String args[] = {"offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "A_STAR", "-s", "EDGE_COVERAGE:100"}; + runCommand(args); + assertEquals(errMsg, "", errMsg); + assertEquals(outMsg, 0, getNumMatches(Pattern.compile("INFO").matcher(outMsg))); + } + + private int getNumMatches(Matcher m) { + int numMatches = 0; + while (m.find() == true) + numMatches++; + return numMatches; + } + + /** + * Test command: java -jar mbt.jar offline -f + * graphml/reqtags/ExtendedMain.graphml -g RANDOM -s EDGE_COVERAGE:100 + */ + public void testOfflineRandomEdgeCoverage() { + String args[] = {"offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "RANDOM", "-s", "EDGE_COVERAGE:100"}; + runCommand(args); + assertTrue("No error messgaes should occur: " + errMsg, errMsg.isEmpty()); + assertTrue("Expected at least 78 lines, got: " + outMsg.split("\r\n|\r|\n").length, outMsg.split("\r\n|\r|\n").length >= 78); + } + + /** + * Test command: java -jar mbt.jar offline -f + * graphml/reqtags/ExtendedMain.graphml -g RANDOM -s VERTEX_COVERAGE:100 + */ + public void testOfflineRandomStateCoverage() { + String args[] = {"offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "RANDOM", "-s", "VERTEX_COVERAGE:100"}; + runCommand(args); + assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); + assertTrue("Expected at least 24 lines, got: " + outMsg.split("\r\n|\r|\n").length, outMsg.split("\r\n|\r|\n").length >= 24); + } + + /** + * Test command: java -jar mbt.jar offline -f + * graphml/reqtags/ExtendedMain.graphml -g A_STAR -s VERTEX_COVERAGE:100 + */ + public void testOfflineA_StarStateCoverage() { + String args[] = {"offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "A_STAR", "-s", "VERTEX_COVERAGE:100"}; + runCommand(args); + assertEquals("No error messages should occur.", "", errMsg); + assertTrue(outMsg, getNumMatches(Pattern.compile("INFO").matcher(outMsg)) <= 21); + } + + /** + * Test command: java -jar mbt.jar offline -f + * graphml/reqtags/ExtendedMain.graphml -g a_star -s "REACHED_REQUIREMENT:req + * 78 + */ + public void testOfflineA_StarReachedRequirement() { + String args[] = {"offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "a_star", "-s", "REACHED_REQUIREMENT:req 78"}; + runCommand(args); + assertEquals("No error messages should occur.", "", errMsg); + assertEquals(0, getNumMatches(Pattern.compile("INFO").matcher(outMsg))); + } + + /** + * Test command: java -jar mbt.jar requirements -f + * graphml/reqtags/ExtendedMain.graphml + */ + public void testListReqTags() { + String args[] = {"requirements", "-f", "graphml/reqtags/ExtendedMain.graphml"}; + runCommand(args); + assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); + assertEquals(6, getNumMatches(Pattern.compile("req[ \\d]+").matcher(outMsg))); + } + + /** + * Test command: java -jar mbt.jar source -f graphml/methods/Main.graphml -t + * templates/perl.template + */ + public void testGenerateCodeFromTemplateHeaderAndFooter() { + String args[] = {"source", "-f", "graphml/methods/Main.graphml", "-t", "templates/junit.template"}; + runCommand(args); + assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); + pattern = Pattern.compile(" implements the ", Pattern.MULTILINE); + matcher = pattern.matcher(outMsg); + assertTrue(matcher.find()); + } + + /** + * Test command: java -jar mbt.jar source -f graphml/methods/Main.graphml -t + * templates/perl.template + */ + public void testGenerateCodeFromTemplate() { + String args[] = {"source", "-f", "graphml/methods/Main.graphml", "-t", "templates/perl.template"}; + runCommand(args); + assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); + pattern = Pattern.compile(" implements the ", Pattern.MULTILINE); + matcher = pattern.matcher(outMsg); + assertTrue(matcher.find()); + } + + /** + * Test command: java -jar mbt.jar offline -f + * graphml/misc/missing_inedges.graphml -g RANDOM -s EDGE_COVERAGE:100 + */ + public void testNoVerticesWithNoInEdges() { + String args[] = {"offline", "-f", "graphml/misc/missing_inedges.graphml", "-g", "RANDOM", "-s", "EDGE_COVERAGE:100"}; + runCommand(args); + pattern = Pattern.compile("^No in-edges! Vertex: .* is not reachable, from file: 'graphml.misc.missing_inedges.graphml'$", + Pattern.MULTILINE); + matcher = pattern.matcher(errMsg); + assertTrue(matcher.find()); + } + + /** + * Test command: java -jar mbt.jar offline -f + * graphml/misc/missing_inedges.graphml -g RANDOM -s EDGE_COVERAGE:100 + */ + public void testVertexWithNoInEdges() { + String args[] = {"offline", "-f", "graphml/misc/missing_inedges.graphml", "-g", "RANDOM", "-s", "EDGE_COVERAGE:100"}; + runCommand(args); + pattern = Pattern.compile("No in-edges! Vertex: 'v_InvalidKey', INDEX=9 is not reachable.", Pattern.MULTILINE); + matcher = pattern.matcher(errMsg); + assertTrue(matcher.find()); + } + + /** + * Test command: java -jar mbt.jar online -f graphml/methods/Main.graphml -g + * RANDOM -s TEST_DURATION:10 + */ + public void testOnlineRandom10seconds() { + String args[] = {"online", "-f", "graphml/methods/Main.graphml", "-g", "RANDOM", "-s", "TEST_DURATION:10", "-o", "1"}; + InputStream oldInputStream = System.in; // backup + System.setIn(redirectIn()); + long startTime = System.currentTimeMillis(); + runCommand(args); + long runTime = System.currentTimeMillis() - startTime; + System.setIn(oldInputStream); + assertEquals("No error messages should occur.", "", errMsg); + assertTrue((runTime - 10000) < 3000); + } + + /** + * Test command: java -jar mbt.jar methods -f graphml/methods/Main.graphml + */ + public void testCountMethods() { + String args[] = {"methods", "-f", "graphml/methods/Main.graphml"}; + runCommand(args); + assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); + pattern = Pattern + .compile( + "e_Cancel\\s+e_CloseApp\\s+e_CloseDB\\s+e_CloseDialog\\s+e_EnterCorrectKey\\s+e_EnterInvalidKey\\s+e_Initialize\\s+e_No\\s+e_Start\\s+e_StartWithDatabase\\s+e_Yes\\s+v_EnterMasterCompositeMasterKey\\s+v_InvalidKey\\s+v_KeePassNotRunning\\s+v_MainWindowEmpty\\s+v_MainWindow_DB_Loaded\\s+v_SaveBeforeCloseLock", + Pattern.MULTILINE); + matcher = pattern.matcher(outMsg); + assertTrue(matcher.find()); + } + + /** + * Check for reserved keywords Test command: java -jar mbt.jar methods -f + * graphml/test24 + */ + public void testReservedKeywords() { + String args[] = {"methods", "-f", "graphml/test24"}; + runCommand(args); + pattern = Pattern.compile( + "Could not parse file: '.*graphml.test24.(Camera|Time).graphml'. Edge has a label 'BACKTRACK', which is a reserved keyword", + Pattern.MULTILINE); + matcher = pattern.matcher(errMsg); + System.out.println(errMsg); + assertTrue(matcher.find()); + } + + /** + * Check for reserved keywords Test command: java -jar mbt.jar xml -f + * xml/reqtags/mbt_init6.xml + */ + public void testXmlSetup() { + String args[] = {"xml", "-f", "xml/reqtags/mbt_init6.xml"}; + runCommand(args); + assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); + assertEquals(6, getNumMatches(Pattern.compile("req[ \\d]+").matcher(outMsg))); + } + + /** + * Check that xml with java executor. Test command: java -jar mbt.jar xml -f + * xml/reqtags/mbt_init5.xml + */ + public void testXmlSetupWithJavaExecutor() { + String args[] = {"xml", "-f", "xml/javaExecutor.xml"}; + runCommand(args); + assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); + assertEquals(outMsg, 76, getNumMatches(Pattern.compile("(Vertex:|Edge:)").matcher(outMsg))); + } + + /** + * Test command: java -jar mbt.jar soap -f xml/reqtags/mbt_init6.xml + */ + public void testSOAPWithXML() { + String args[] = {"soap", "-f", "xml/reqtags/mbt_init6.xml"}; + runCommand(args); + assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); + assertTrue( + outMsg, + outMsg + .matches("(?s).*Now running as a SOAP server. For the WSDL file, see: http://.*:9090/mbt-services\\?WSDL\\s+Press Ctrl\\+C to quit\\s+")); + } + + /** + * Test command: java -jar mbt.jar soap + */ + public void testSOAPWithoutXML() { + String args[] = {"soap"}; + runCommand(args); + assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); + assertEquals( + true, + outMsg + .matches("Now running as a SOAP server. For the WSDL file, see: http://.*:9090/mbt-services\\?WSDL\\s+Press Ctrl\\+C to quit\\s+")); + } + + /** + * Test command: java -jar mbt.jar soap -f xml/reqtags/mbt_init6.xml + */ + public void testSOAPWithCorrectClassPathInXML() { + String args[] = {"soap", "-f", "xml/reqtags/mbt_init8.xml"}; + runCommand(args); + assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); + assertTrue( + outMsg, + outMsg + .matches("(?s).*Now running as a SOAP server. For the WSDL file, see: http://.*:9090/mbt-services\\?WSDL\\s+Press Ctrl\\+C to quit\\s+")); + } + + /** + * Test command: java -jar mbt.jar soap -f xml/reqtags/mbt_init9.xml + */ + public void testSOAPWithIncorrectClassPathInXML() { + String args[] = {"soap", "-f", "xml/reqtags/mbt_init9.xml"}; + runCommand(args); + assertTrue(errMsg, errMsg.matches("(?s).*Could not add: 'non-existing-path' to CLASSPATH.*")); + } + + /** + * Test command: java -jar mbt.jar xml -f xml/ReachedVertex.xml + */ + public void testReachedVertexXML() { + String args[] = {"xml", "-f", "xml/ReachedVertex.xml"}; + runCommand(args); + System.out.println(errMsg); + assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); + } } diff --git a/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_10.java b/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_10.java index b0371e21..e35b60e5 100644 --- a/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_10.java +++ b/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_10.java @@ -26,82 +26,81 @@ package org.graphwalker.cli.bugs; -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintStream; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - +import junit.framework.TestCase; import org.apache.log4j.Logger; import org.graphwalker.cli.CLI; import org.graphwalker.cli.CLITest; import org.graphwalker.core.ModelBasedTesting; import org.graphwalker.core.Util; -import junit.framework.TestCase; +import java.io.IOException; +import java.io.OutputStream; +import java.io.PrintStream; +import java.util.regex.Matcher; +import java.util.regex.Pattern; public class Issue_10 extends TestCase { - Pattern pattern; - Matcher matcher; - StringBuffer stdOutput; - StringBuffer errOutput; - String outMsg; - String errMsg; - static Logger logger = Util.setupLogger(CLITest.class); - - @Override - protected void setUp() throws Exception { - super.setUp(); - ModelBasedTesting.getInstance().reset(); - } - - private OutputStream redirectOut() { - return new OutputStream() { - @Override - public void write(int b) throws IOException { - // Redirect to nothing, else we'll get an OutOfMemoryException - // stdOutput.append( Character.toString((char) b) ); - } - }; - } - - private OutputStream redirectErr() { - return new OutputStream() { - @Override - public void write(int b) throws IOException { - errOutput.append(Character.toString((char) b)); - } - }; - } - - private void runCommand(String args[]) { - stdOutput = new StringBuffer(); - errOutput = new StringBuffer(); - - PrintStream outStream = new PrintStream(redirectOut()); - PrintStream oldOutStream = System.out; // backup - PrintStream errStream = new PrintStream(redirectErr()); - PrintStream oldErrStream = System.err; // backup - - System.setOut(outStream); - System.setErr(errStream); - - CLI.main(args); - - System.setOut(oldOutStream); - System.setErr(oldErrStream); - - outMsg = stdOutput.toString(); - errMsg = errOutput.toString(); - logger.debug("stdout: " + outMsg); - logger.debug("stderr: " + errMsg); - } - - // - public void testIssue_10() { - String args[] = { "xml", "-f", "xml/bugs/Issue_10.xml" }; - runCommand(args); - assertTrue(errMsg, errMsg.isEmpty()); - } + Pattern pattern; + Matcher matcher; + StringBuffer stdOutput; + StringBuffer errOutput; + String outMsg; + String errMsg; + static Logger logger = Util.setupLogger(CLITest.class); + + @Override + protected void setUp() throws Exception { + super.setUp(); + ModelBasedTesting.getInstance().reset(); + } + + private OutputStream redirectOut() { + return new OutputStream() { + @Override + public void write(int b) throws IOException { + // Redirect to nothing, else we'll get an OutOfMemoryException + // stdOutput.append( Character.toString((char) b) ); + } + }; + } + + private OutputStream redirectErr() { + return new OutputStream() { + @Override + public void write(int b) throws IOException { + errOutput.append(Character.toString((char) b)); + } + }; + } + + private void runCommand(String args[]) { + stdOutput = new StringBuffer(); + errOutput = new StringBuffer(); + + PrintStream outStream = new PrintStream(redirectOut()); + PrintStream oldOutStream = System.out; // backup + PrintStream errStream = new PrintStream(redirectErr()); + PrintStream oldErrStream = System.err; // backup + + System.setOut(outStream); + System.setErr(errStream); + + CLI.main(args); + + System.setOut(oldOutStream); + System.setErr(oldErrStream); + + outMsg = stdOutput.toString(); + errMsg = errOutput.toString(); + logger.debug("stdout: " + outMsg); + logger.debug("stderr: " + errMsg); + } + + // + public void testIssue_10() { + String args[] = {"xml", "-f", "xml/bugs/Issue_10.xml"}; + runCommand(args); + assertTrue(errMsg, errMsg.isEmpty()); + } } diff --git a/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_9.java b/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_9.java index 904d1341..458ea435 100644 --- a/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_9.java +++ b/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_9.java @@ -26,83 +26,82 @@ package org.graphwalker.cli.bugs; -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintStream; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - +import junit.framework.TestCase; import org.apache.log4j.Logger; import org.graphwalker.cli.CLI; import org.graphwalker.cli.CLITest; import org.graphwalker.core.ModelBasedTesting; import org.graphwalker.core.Util; -import junit.framework.TestCase; +import java.io.IOException; +import java.io.OutputStream; +import java.io.PrintStream; +import java.util.regex.Matcher; +import java.util.regex.Pattern; public class Issue_9 extends TestCase { - Pattern pattern; - Matcher matcher; - StringBuffer stdOutput; - StringBuffer errOutput; - String outMsg; - String errMsg; - static Logger logger = Util.setupLogger(CLITest.class); - - @Override - protected void setUp() throws Exception { - super.setUp(); - ModelBasedTesting.getInstance().reset(); - } - - private OutputStream redirectOut() { - return new OutputStream() { - @Override - public void write(int b) throws IOException { - // Redirect to nothing, else we'll get an OutOfMemoryException - // stdOutput.append( Character.toString((char) b) ); - } - }; - } - - private OutputStream redirectErr() { - return new OutputStream() { - @Override - public void write(int b) throws IOException { - errOutput.append(Character.toString((char) b)); - } - }; - } - - private void runCommand(String args[]) { - stdOutput = new StringBuffer(); - errOutput = new StringBuffer(); - - PrintStream outStream = new PrintStream(redirectOut()); - PrintStream oldOutStream = System.out; // backup - PrintStream errStream = new PrintStream(redirectErr()); - PrintStream oldErrStream = System.err; // backup - - System.setOut(outStream); - System.setErr(errStream); - - CLI.main(args); - - System.setOut(oldOutStream); - System.setErr(oldErrStream); - - outMsg = stdOutput.toString(); - errMsg = errOutput.toString(); - logger.debug("stdout: " + outMsg); - logger.debug("stderr: " + errMsg); - } - - // Test will excute during 35 seconds - public void testIssue_9() { - System.out.println("Test will excute during 35 seconds"); - String args[] = { "xml", "-f", "xml/bugs/Issue_9.xml" }; - runCommand(args); - assertTrue(errMsg, errMsg.isEmpty()); - } + Pattern pattern; + Matcher matcher; + StringBuffer stdOutput; + StringBuffer errOutput; + String outMsg; + String errMsg; + static Logger logger = Util.setupLogger(CLITest.class); + + @Override + protected void setUp() throws Exception { + super.setUp(); + ModelBasedTesting.getInstance().reset(); + } + + private OutputStream redirectOut() { + return new OutputStream() { + @Override + public void write(int b) throws IOException { + // Redirect to nothing, else we'll get an OutOfMemoryException + // stdOutput.append( Character.toString((char) b) ); + } + }; + } + + private OutputStream redirectErr() { + return new OutputStream() { + @Override + public void write(int b) throws IOException { + errOutput.append(Character.toString((char) b)); + } + }; + } + + private void runCommand(String args[]) { + stdOutput = new StringBuffer(); + errOutput = new StringBuffer(); + + PrintStream outStream = new PrintStream(redirectOut()); + PrintStream oldOutStream = System.out; // backup + PrintStream errStream = new PrintStream(redirectErr()); + PrintStream oldErrStream = System.err; // backup + + System.setOut(outStream); + System.setErr(errStream); + + CLI.main(args); + + System.setOut(oldOutStream); + System.setErr(oldErrStream); + + outMsg = stdOutput.toString(); + errMsg = errOutput.toString(); + logger.debug("stdout: " + outMsg); + logger.debug("stderr: " + errMsg); + } + + // Test will excute during 35 seconds + public void testIssue_9() { + System.out.println("Test will excute during 35 seconds"); + String args[] = {"xml", "-f", "xml/bugs/Issue_9.xml"}; + runCommand(args); + assertTrue(errMsg, errMsg.isEmpty()); + } } diff --git a/graphwalker-cli/src/test/resources/graphml/UC01.graphml b/graphwalker-cli/src/test/resources/graphml/UC01.graphml index 96f6d8f6..ef957848 100644 --- a/graphwalker-cli/src/test/resources/graphml/UC01.graphml +++ b/graphwalker-cli/src/test/resources/graphml/UC01.graphml @@ -1,296 +1,387 @@ - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_BrowserStarted - - - - - - - - - - - - - v_BaseURL -REQTAG=UC01 2.2.1 - - - - - - - - - - - - - v_SearchResult -REQTAG=UC01 2.2.2 - - - - - - - - - - - - - v_BrowserStopped - - - - - - - - - - - - - v_BookInformation -REQTAG=UC01 2.2.3 - - - - - - - - - - - - - v_OtherBoughtBooks - - - - - - - - - - - - - v_ShoppingCart -REQTAG=UC01 2.3 - - - - - - - - - - - - - e_init / num_of_books = 0; MAX_BOOKS = 5; - - - - - - - - - - - - e_EnterBaseURL - - - - - - - - - - - - e_SearchBook - - - - - - - - - - - - e_StartBrowser - - - - - - - - - - - - e_ClickBook - - - - - - - - - - - - - - - e_AddBookToCart [num_of_books<=MAX_BOOKS] / num_of_books++; - - - - - - - - - - - - - - - - - e_ShoppingCart - - - - - - - - - - - - - - - e_ShoppingCart - - - - - - - - - - - - - - - - - e_ShoppingCart - - - - - - - - - - - - - - - - - e_SearchBook - - - - - - - - - - - - - - - - - e_SearchBook - - - - - - - - - - - - - - - - - e_SearchBook - - - - - - - - - + + + + + + + + + + + + + + Start + + + + + + + + + + + + + + v_BrowserStarted + + + + + + + + + + + + + + v_BaseURL + REQTAG=UC01 2.2.1 + + + + + + + + + + + + + + v_SearchResult + REQTAG=UC01 2.2.2 + + + + + + + + + + + + + + v_BrowserStopped + + + + + + + + + + + + + + v_BookInformation + REQTAG=UC01 2.2.3 + + + + + + + + + + + + + + v_OtherBoughtBooks + + + + + + + + + + + + + + v_ShoppingCart + REQTAG=UC01 2.3 + + + + + + + + + + + + + + e_init / + num_of_books = 0; MAX_BOOKS = 5; + + + + + + + + + + + + + e_EnterBaseURL + + + + + + + + + + + + + e_SearchBook + + + + + + + + + + + + + e_StartBrowser + + + + + + + + + + + + + + e_ClickBook + + + + + + + + + + + + + + + + + e_AddBookToCart [num_of_books<=MAX_BOOKS] / num_of_books++; + + + + + + + + + + + + + + + + + + e_ShoppingCart + + + + + + + + + + + + + + + + + e_ShoppingCart + + + + + + + + + + + + + + + + + + + e_ShoppingCart + + + + + + + + + + + + + + + + + + e_SearchBook + + + + + + + + + + + + + + + + + + + e_SearchBook + + + + + + + + + + + + + + + + + + e_SearchBook + + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/methods/ExtendedMain.graphml b/graphwalker-cli/src/test/resources/graphml/methods/ExtendedMain.graphml index 4ea8af8d..3f4da238 100644 --- a/graphwalker-cli/src/test/resources/graphml/methods/ExtendedMain.graphml +++ b/graphwalker-cli/src/test/resources/graphml/methods/ExtendedMain.graphml @@ -1,412 +1,533 @@ - - - - - - - - - - - - - - Start - - - - - - - - - - - - v_KeePassNotRunning - - - - - - - - - - - - v_MainWindowEmpty - - - - - - - - - - - - v_EnterMasterCompositeMasterKey - - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - - v_MainWindow_DB_Loaded - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - e_Initialize / incorrect=0; databaseChanged=false - - - - - - - - - - - - - - - - - e_Start - - - - - - - - - - - - - - - e_StartWithDatabase - - - - - - - - - - - - - - - e_EnterInvalidKey/incorrect=incorrect+1 - - - - - - - - - - - - - - - - - e_CloseDialog[incorrect<3] - - - - - - - - - - - - - - - - - e_CloseDialog[incorrect==3]/incorrect=0 - - - - - - - - - - - - - - - e_EnterCorrectKey/incorrect=0 - - - - - - - - - - - - - - - - - e_CloseApp[databaseChanged==false] - - - - - - - - - - - - - - - - - e_CloseApp - - - - - - - - - - - - - - - e_CloseApp[databaseChanged==true&&incorrect==0] - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - e_CloseDB[databaseChanged==true] - - - - - - - - - - - - - - - e_CloseDB[databaseChanged==false] - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - e_ChangeDatabase/databaseChanged=true - - - - - - - - - + + + + + + + + + + + + + + Start + + + + + + + + + + + + + v_KeePassNotRunning + + + + + + + + + + + + + v_MainWindowEmpty + + + + + + + + + + + + + + v_EnterMasterCompositeMasterKey + + + + + + + + + + + + + v_InvalidKey + + + + + + + + + + + + + v_MainWindow_DB_Loaded + + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + + e_Initialize / + incorrect=0; databaseChanged=false + + + + + + + + + + + + + + + + + + e_Start + + + + + + + + + + + + + + + + + e_StartWithDatabase + + + + + + + + + + + + + + + + + e_EnterInvalidKey/incorrect=incorrect+1 + + + + + + + + + + + + + + + + + + e_CloseDialog[incorrect<3] + + + + + + + + + + + + + + + + + + + e_CloseDialog[incorrect==3]/incorrect=0 + + + + + + + + + + + + + + + + + e_EnterCorrectKey/incorrect=0 + + + + + + + + + + + + + + + + + + + e_CloseApp[databaseChanged==false] + + + + + + + + + + + + + + + + + + e_CloseApp + + + + + + + + + + + + + + + + + e_CloseApp[databaseChanged==true&&incorrect==0] + + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + + + + + e_CloseDB[databaseChanged==true] + + + + + + + + + + + + + + + + + e_CloseDB[databaseChanged==false] + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + + + + e_ChangeDatabase/databaseChanged=true + + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/methods/Main.graphml b/graphwalker-cli/src/test/resources/graphml/methods/Main.graphml index 54c6267e..583a93ef 100644 --- a/graphwalker-cli/src/test/resources/graphml/methods/Main.graphml +++ b/graphwalker-cli/src/test/resources/graphml/methods/Main.graphml @@ -1,421 +1,542 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_KeePassNotRunning - - - - - - - - - - - - - v_MainWindowEmpty - - - - - - - - - - - - - v_EnterMasterCompositeMasterKey - - - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - - - v_MainWindow_DB_Loaded - - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - - e_Initialize - - - - - - - - - - - - - - - - - - e_Start - - - - - - - - - - - - - - - - e_StartWithDatabase - - - - - - - - - - - - - e_EnterInvalidKey - - - - - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect < 3 times */ - - - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect key 3 times */ - - - - - - - - - - - - - - - - - - e_EnterCorrectKey - - - - - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - - - e_CloseApp - - - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database changed */ - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - e_CloseDB BACKTRACK /* If database changed */ - - - - - - - - - - - - - - - - e_CloseDB BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + + v_KeePassNotRunning + + + + + + + + + + + + + + v_MainWindowEmpty + + + + + + + + + + + + + + + v_EnterMasterCompositeMasterKey + + + + + + + + + + + + + + v_InvalidKey + + + + + + + + + + + + + + v_MainWindow_DB_Loaded + + + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + + + + e_Initialize + + + + + + + + + + + + + + + + + + + + e_Start + + + + + + + + + + + + + + + + + + e_StartWithDatabase + + + + + + + + + + + + + + + e_EnterInvalidKey + + + + + + + + + + + + + + + + + + + + e_CloseDialog BACKTRACK /* If incorrect < 3 times */ + + + + + + + + + + + + + + + + + + e_CloseDialog BACKTRACK /* If incorrect key 3 times */ + + + + + + + + + + + + + + + + + + + + e_EnterCorrectKey + + + + + + + + + + + + + + + + + + + + + + e_CloseApp BACKTRACK /* If database unchanged */ + + + + + + + + + + + + + + + + + + + + e_CloseApp + + + + + + + + + + + + + + + + + + + + e_CloseApp BACKTRACK /* If database changed */ + + + + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + e_CloseDB BACKTRACK /* If database changed */ + + + + + + + + + + + + + + + + + + e_CloseDB BACKTRACK /* If database unchanged */ + + + + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/misc/missing_inedges.graphml b/graphwalker-cli/src/test/resources/graphml/misc/missing_inedges.graphml index b987cf04..40234d63 100644 --- a/graphwalker-cli/src/test/resources/graphml/misc/missing_inedges.graphml +++ b/graphwalker-cli/src/test/resources/graphml/misc/missing_inedges.graphml @@ -1,389 +1,519 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_KeePassNotRunning - - - - - - - - - - - v_MainWindowEmpty - - - - - - - - - - - v_EnterMasterCompositeMasterKey - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - v_MainWindow_DB_Loaded - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - e_Initialize - - - - - - - - - - - - - - - - e_Start - - - - - - - - - - - - - - e_StartWithDatabase - - - - - - - - - - - e_EnterInvalidKey - - - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect < 3 times */ - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect key 3 times */ - - - - - - - - - - - - - - - - e_EnterCorrectKey - - - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - e_CloseApp - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database changed */ - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - e_CloseDB BACKTRACK /* If database changed */ - - - - - - - - - - - - - - e_CloseDB BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect key 3 times */ - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_KeePassNotRunning + + + + + + + + + + + + v_MainWindowEmpty + + + + + + + + + + + + + v_EnterMasterCompositeMasterKey + + + + + + + + + + + + v_InvalidKey + + + + + + + + + + + + v_MainWindow_DB_Loaded + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + v_InvalidKey + + + + + + + + + + + + + e_Initialize + + + + + + + + + + + + + + + + + + e_Start + + + + + + + + + + + + + + + + e_StartWithDatabase + + + + + + + + + + + + + e_EnterInvalidKey + + + + + + + + + + + + + + + + + + e_CloseDialog BACKTRACK /* If incorrect < 3 times */ + + + + + + + + + + + + + + + + e_CloseDialog BACKTRACK /* If incorrect key 3 times */ + + + + + + + + + + + + + + + + + + e_EnterCorrectKey + + + + + + + + + + + + + + + + + + + + e_CloseApp BACKTRACK /* If database unchanged */ + + + + + + + + + + + + + + + + + + e_CloseApp + + + + + + + + + + + + + + + + + + e_CloseApp BACKTRACK /* If database changed */ + + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + e_CloseDB BACKTRACK /* If database changed */ + + + + + + + + + + + + + + + + e_CloseDB BACKTRACK /* If database unchanged */ + + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + e_CloseDialog BACKTRACK /* If incorrect key 3 times */ + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/misc/no_missing_inedges.graphml b/graphwalker-cli/src/test/resources/graphml/misc/no_missing_inedges.graphml index e98dfc75..cc3109b2 100644 --- a/graphwalker-cli/src/test/resources/graphml/misc/no_missing_inedges.graphml +++ b/graphwalker-cli/src/test/resources/graphml/misc/no_missing_inedges.graphml @@ -1,401 +1,531 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_KeePassNotRunning - - - - - - - - - - - v_MainWindowEmpty - - - - - - - - - - - v_EnterMasterCompositeMasterKey - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - v_MainWindow_DB_Loaded - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - e_Initialize - - - - - - - - - - - - - - - - e_Start - - - - - - - - - - - - - - e_StartWithDatabase - - - - - - - - - - - e_EnterInvalidKey - - - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect < 3 times */ - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect key 3 times */ - - - - - - - - - - - - - - - - e_EnterCorrectKey - - - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - e_CloseApp - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database changed */ - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - e_CloseDB BACKTRACK /* If database changed */ - - - - - - - - - - - - - - e_CloseDB BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect key 3 times */ - - - - - - - - - - - - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_KeePassNotRunning + + + + + + + + + + + + v_MainWindowEmpty + + + + + + + + + + + + + v_EnterMasterCompositeMasterKey + + + + + + + + + + + + v_InvalidKey + + + + + + + + + + + + v_MainWindow_DB_Loaded + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + v_InvalidKey + + + + + + + + + + + + + e_Initialize + + + + + + + + + + + + + + + + + + e_Start + + + + + + + + + + + + + + + + e_StartWithDatabase + + + + + + + + + + + + + e_EnterInvalidKey + + + + + + + + + + + + + + + + + + e_CloseDialog BACKTRACK /* If incorrect < 3 times */ + + + + + + + + + + + + + + + + e_CloseDialog BACKTRACK /* If incorrect key 3 times */ + + + + + + + + + + + + + + + + + + e_EnterCorrectKey + + + + + + + + + + + + + + + + + + + + e_CloseApp BACKTRACK /* If database unchanged */ + + + + + + + + + + + + + + + + + + e_CloseApp + + + + + + + + + + + + + + + + + + e_CloseApp BACKTRACK /* If database changed */ + + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + e_CloseDB BACKTRACK /* If database changed */ + + + + + + + + + + + + + + + + e_CloseDB BACKTRACK /* If database unchanged */ + + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + e_CloseDialog BACKTRACK /* If incorrect key 3 times */ + + + + + + + + + + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/reqtags/ExtendedMain.graphml b/graphwalker-cli/src/test/resources/graphml/reqtags/ExtendedMain.graphml index 687b8720..719106da 100644 --- a/graphwalker-cli/src/test/resources/graphml/reqtags/ExtendedMain.graphml +++ b/graphwalker-cli/src/test/resources/graphml/reqtags/ExtendedMain.graphml @@ -1,416 +1,537 @@ - - - - - - - - - - - - - - Start - - - - - - - - - - - - v_KeePassNotRunning - - - - - - - - - - - - v_MainWindowEmpty -REQTAG=req 79 - - - - - - - - - - - - v_EnterMasterCompositeMasterKey - - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - - v_MainWindow_DB_Loaded -REQTAG=req 55, req 78 - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - e_Initialize / incorrect=0; databaseChanged=false - - - - - - - - - - - - - - - - - e_Start - - - - - - - - - - - - - - - e_StartWithDatabase -REQTAG=req1 - - - - - - - - - - - - - - - e_EnterInvalidKey/incorrect=incorrect+1 - - - - - - - - - - - - - - - - - e_CloseDialog[incorrect<3] - - - - - - - - - - - - - - - - - e_CloseDialog[incorrect==3]/incorrect=0 - - - - - - - - - - - - - - - e_EnterCorrectKey/incorrect=0 -REQTAG=req2, req 23 - - - - - - - - - - - - - - - - - e_CloseApp[databaseChanged==false] - - - - - - - - - - - - - - - - - e_CloseApp - - - - - - - - - - - - - - - e_CloseApp[databaseChanged==true&&incorrect==0] - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - e_CloseDB[databaseChanged==true] - - - - - - - - - - - - - - - e_CloseDB[databaseChanged==false] - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - e_ChangeDatabase/databaseChanged=true - - - - - - - - - + + + + + + + + + + + + + + Start + + + + + + + + + + + + + v_KeePassNotRunning + + + + + + + + + + + + + v_MainWindowEmpty + REQTAG=req 79 + + + + + + + + + + + + + + v_EnterMasterCompositeMasterKey + + + + + + + + + + + + + v_InvalidKey + + + + + + + + + + + + + v_MainWindow_DB_Loaded + REQTAG=req 55, req 78 + + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + + e_Initialize / + incorrect=0; databaseChanged=false + + + + + + + + + + + + + + + + + + e_Start + + + + + + + + + + + + + + + + + e_StartWithDatabase + REQTAG=req1 + + + + + + + + + + + + + + + + + e_EnterInvalidKey/incorrect=incorrect+1 + + + + + + + + + + + + + + + + + + e_CloseDialog[incorrect<3] + + + + + + + + + + + + + + + + + + + e_CloseDialog[incorrect==3]/incorrect=0 + + + + + + + + + + + + + + + + + e_EnterCorrectKey/incorrect=0 + REQTAG=req2, req 23 + + + + + + + + + + + + + + + + + + + e_CloseApp[databaseChanged==false] + + + + + + + + + + + + + + + + + + e_CloseApp + + + + + + + + + + + + + + + + + e_CloseApp[databaseChanged==true&&incorrect==0] + + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + + + + + e_CloseDB[databaseChanged==true] + + + + + + + + + + + + + + + + + e_CloseDB[databaseChanged==false] + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + + + + e_ChangeDatabase/databaseChanged=true + + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/AddressBook.graphml b/graphwalker-cli/src/test/resources/graphml/test24/AddressBook.graphml index 0a483c30..750ae8e2 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/AddressBook.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/AddressBook.graphml @@ -1,1459 +1,1927 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_AddressBook - - - - - - - - - - - v_AddressBook_ToolsMenu_1 - - - - - - - - - - - v_AddressBook_AddContact SUBGRAPH - - - - - - - - - - - v_DeleteItems SUBGRAPH - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - v_AddressBook_AddFavorite - - - - - - - - - - - v_ContactTapToSelectNumber SUBGRAPH - - - - - - - - - - - v_AddressBook_ToolsMenu_2 - - - - - - - - - - - v_AddressBook_ContactSettings - - - - - - - - - - - Stop - - - - - - - - - - - v_SelectNameFormat - - - - - - - - - - - v_Prefer - - - - - - - - - - - v_BirthdayReminderSettingsEnabled - - - - - - - - - - - v_BirthdayReminderSettingsDisabled - - - - - - - - - - - v_DefaultValues SUBGRAPH - - - - - - - - - - - v_DefaultValues SUBGRAPH - - - - - - - - - - - v_DefaultValues SUBGRAPH - - - - - - - - - - - v_ReminderWhen - - - - - - - - - - - v_Time SUBGRAPH - - - - - - - - - - - v_Audio SUBGRAPH - - - - - - - - - - - v_SendVCard SUBGRAPH - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACKING /* If Icon 2 is enabled. */ - - - - - - - - - - - - - - e_SweepShowKeyboard - - - - - - - - - - - e_TapIcon_4 BACKTRACKING /* If Icon 4 is enabled. */ - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapRandomListItem BACKTRACKING /* If an item exists in the list. */ - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - e_TapItem3 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - e_TapItem4 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACKING /* If sending a SMS, and close app was called, we gor here */ - - - - - - - - - - - - - - e_TapItem3 - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_AddressBook + + + + + + + + + + + + v_AddressBook_ToolsMenu_1 + + + + + + + + + + + + v_AddressBook_AddContact SUBGRAPH + + + + + + + + + + + + v_DeleteItems SUBGRAPH + + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + + v_AddressBook_AddFavorite + + + + + + + + + + + + v_ContactTapToSelectNumber SUBGRAPH + + + + + + + + + + + + v_AddressBook_ToolsMenu_2 + + + + + + + + + + + + v_AddressBook_ContactSettings + + + + + + + + + + + + Stop + + + + + + + + + + + + v_SelectNameFormat + + + + + + + + + + + + v_Prefer + + + + + + + + + + + + v_BirthdayReminderSettingsEnabled + + + + + + + + + + + + v_BirthdayReminderSettingsDisabled + + + + + + + + + + + + v_DefaultValues SUBGRAPH + + + + + + + + + + + + v_DefaultValues SUBGRAPH + + + + + + + + + + + + v_DefaultValues SUBGRAPH + + + + + + + + + + + + v_ReminderWhen + + + + + + + + + + + + v_Time SUBGRAPH + + + + + + + + + + + + v_Audio SUBGRAPH + + + + + + + + + + + + v_SendVCard SUBGRAPH + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACKING /* If Icon 2 is enabled. */ + + + + + + + + + + + + + + + + e_SweepShowKeyboard + + + + + + + + + + + + + e_TapIcon_4 BACKTRACKING /* If Icon 4 is enabled. */ + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_TapRandomListItem BACKTRACKING /* If an item exists in the list. */ + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + e_TapScreen + + + + + + + + + + + + + + + + + + e_TapItem2 + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + + + e_TapScreen + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_TapItem2 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_TapScreen + + + + + + + + + + + + + + + + + + e_TapItem3 + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + e_TapItem4 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp BACKTRACKING /* If sending a SMS, and close app was called, we gor + here */ + + + + + + + + + + + + + + + + e_TapItem3 + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/AddressBookContact.graphml b/graphwalker-cli/src/test/resources/graphml/test24/AddressBookContact.graphml index 8de79cbb..659918eb 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/AddressBookContact.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/AddressBookContact.graphml @@ -1,600 +1,775 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_AddressBook_AddContact - - - - - - - - - - - - - v_ContactMustHaveName - - - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - - - v_Camera SUBGRAPH - - - - - - - - - - - - - v_AudioTone - - - - - - - - - - - - - v_KeyboardNumeric SUBGRAPH - - - - - - - - - - - - - Stop - - - - - - - - - - - - - v_ContactHasChanged - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapInListStringFirst_name - - - - - - - - - - - - - - - - e_TapInListStringPicture - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapInListStringRing_tone - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapInListStringMobile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - BACKTRACK /* No name set */ - - - - - - - - - - - - - - - - - - BACKTRACK /* Mandatory fields OK */ - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - BACKTRACK /* Fields OK */ - - - - - - - - - - - - - - - - - - BACKTRACK /* No name set */ - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + + v_AddressBook_AddContact + + + + + + + + + + + + + + v_ContactMustHaveName + + + + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + + + + v_Camera SUBGRAPH + + + + + + + + + + + + + + v_AudioTone + + + + + + + + + + + + + + v_KeyboardNumeric SUBGRAPH + + + + + + + + + + + + + + Stop + + + + + + + + + + + + + + v_ContactHasChanged + + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_TapInListStringFirst_name + + + + + + + + + + + + + + + + + + e_TapInListStringPicture + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapInListStringRing_tone + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_TapInListStringMobile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + BACKTRACK /* + No name set */ + + + + + + + + + + + + + + + + + + + BACKTRACK /* + Mandatory fields OK */ + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + BACKTRACK /* + Fields OK */ + + + + + + + + + + + + + + + + + + + BACKTRACK /* + No name set */ + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/AddressBookReadOnly.graphml b/graphwalker-cli/src/test/resources/graphml/test24/AddressBookReadOnly.graphml index a5d0b79a..f4122236 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/AddressBookReadOnly.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/AddressBookReadOnly.graphml @@ -1,226 +1,297 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_AddressBookReadOnly - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - v_ContactTapToSelectNumber NO_MERGE - - - - - - - - - - - Stop - - - - - - - - - - - - - - e_SweepShowKeyboard - - - - - - - - - - - - - - e_TapRandomListItem BACKTRACK /* If an item exists in the list. */ - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TapRandomListItem BACKTRACK /* Only allowed when there are numbers in the list */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - e_SweepAccept - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_AddressBookReadOnly + + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + + v_ContactTapToSelectNumber NO_MERGE + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + e_SweepShowKeyboard + + + + + + + + + + + + + + + + e_TapRandomListItem BACKTRACK /* If an item exists in the list. */ + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapRandomListItem BACKTRACK /* Only allowed when there are numbers in the list */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Alarm.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Alarm.graphml index 643a24df..d99c76b7 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Alarm.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Alarm.graphml @@ -1,818 +1,1085 @@ - + - - - - - - - - - - - v_Audio SUBGRAPH - - - - - - - - - - - v_AlarmHistory_ToolsMenu - - - - - - - - - - - v_AlarmHistory - - - - - - - - - - - v_Audio SUBGRAPH - - - - - - - - - - - v_AlarmEdit SUBGRAPH - - - - - - - - - - - v_DeleteItems SUBGRAPH - - - - - - - - - - - v_AlarmToolsMenu - - - - - - - - - - - v_AlarmDateAlreadyOccured - - - - - - - - - - - v_AlarmEdit SUBGRAPH - - - - - - - - - - - v_Date SUBGRAPH - - - - - - - - - - - v_Time SUBGRAPH - - - - - - - - - - - v_Alarm - - - - - - - - - - - Start - - - - - - - - - - - Stop - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TapListItemFirst - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If an alarm exists in the list. */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_3 BACKTRACK /* If an alarm exists in the list. */ - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - e_SelectRandomListItem /* 'Add Alarm...' do always exist. New Alarms gets added to the list. */ - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - e_SelectRandomListItem /* Listan kan vara tom */ - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TryTapListItemNotFirst BACKTRACK /* If a Alarm is selected from the list. */ - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView BACKTRACK - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - + + + + + + + + + + + v_Audio SUBGRAPH + + + + + + + + + + + + v_AlarmHistory_ToolsMenu + + + + + + + + + + + + v_AlarmHistory + + + + + + + + + + + + v_Audio SUBGRAPH + + + + + + + + + + + + v_AlarmEdit SUBGRAPH + + + + + + + + + + + + v_DeleteItems SUBGRAPH + + + + + + + + + + + + v_AlarmToolsMenu + + + + + + + + + + + + v_AlarmDateAlreadyOccured + + + + + + + + + + + + v_AlarmEdit SUBGRAPH + + + + + + + + + + + + v_Date SUBGRAPH + + + + + + + + + + + + v_Time SUBGRAPH + + + + + + + + + + + + v_Alarm + + + + + + + + + + + + Start + + + + + + + + + + + + Stop + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapListItemFirst + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* If an alarm exists in the list. */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapIcon_3 BACKTRACK /* If an alarm exists in the list. */ + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + + e_SelectRandomListItem /* 'Add Alarm...' do always exist. New Alarms gets added to + the list. */ + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + e_SelectRandomListItem /* Listan kan vara tom */ + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TryTapListItemNotFirst BACKTRACK /* If a Alarm is selected from the list. */ + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseView BACKTRACK + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + BACKTRACK + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/AlarmEdit.graphml b/graphwalker-cli/src/test/resources/graphml/test24/AlarmEdit.graphml index ac02274e..9ca97b44 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/AlarmEdit.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/AlarmEdit.graphml @@ -1,714 +1,946 @@ - + - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - v_AlarmEdit - - - - - - - - - - - Start - - - - - - - - - - - v_Time SUBGRAPH - - - - - - - - - - - v_Date SUBGRAPH - - - - - - - - - - - v_AlarmAction - - - - - - - - - - - v_AlarmDateAlreadyOccured - - - - - - - - - - - Stop - - - - - - - - - - - v_EditAlarmChanged - - - - - - - - - - - v_AlarmDateAlreadyOccured - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_TapItem3 - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - - e_TapItem4 - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + + v_AlarmEdit + + + + + + + + + + + + Start + + + + + + + + + + + + v_Time SUBGRAPH + + + + + + + + + + + + v_Date SUBGRAPH + + + + + + + + + + + + v_AlarmAction + + + + + + + + + + + + v_AlarmDateAlreadyOccured + + + + + + + + + + + + Stop + + + + + + + + + + + + v_EditAlarmChanged + + + + + + + + + + + + v_AlarmDateAlreadyOccured + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_TapItem3 + + + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + + e_TapItem2 + + + + + + + + + + + + + + + + + + e_TapItem4 + + + + + + + + + + + + + + + + + + e_TapRandomListItem + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Audio.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Audio.graphml index e53e523f..d6568c8b 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Audio.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Audio.graphml @@ -1,411 +1,545 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_Audio - - - - - - - - - - - v_AudioAction - - - - - - - - - - - v_AudioTone /* TODO: Implement selection of audio file.*/ - - - - - - - - - - - v_AudioTone_ToolsMenu - - - - - - - - - - - v_ChangeVolume - - - - - - - - - - - v_DefaultValues SUBGRAPH - - - - - - - - - - - Stop - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_Audio + + + + + + + + + + + + v_AudioAction + + + + + + + + + + + + v_AudioTone /* TODO: Implement selection + of audio file.*/ + + + + + + + + + + + + v_AudioTone_ToolsMenu + + + + + + + + + + + + v_ChangeVolume + + + + + + + + + + + + v_DefaultValues SUBGRAPH + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + + e_TapItem2 + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + e_TapIcon_4 + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapRandomListItem + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Calculator.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Calculator.graphml index c1c3f1d8..a13abd17 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Calculator.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Calculator.graphml @@ -1,234 +1,304 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_Calculator - - - - - - - - - - - v_KeyboardNumeric SUBGRAPH - - - - - - - - - - - v_Calculator_Error - - - - - - - - - - - Stop - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACK - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_Calculator + + + + + + + + + + + + v_KeyboardNumeric SUBGRAPH + + + + + + + + + + + + v_Calculator_Error + + + + + + + + + + + + Stop + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.05 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.05 + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp BACKTRACK + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Calendar.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Calendar.graphml index e50f307b..44ec9b07 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Calendar.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Calendar.graphml @@ -1,760 +1,1001 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_CalendarMonthView - - - - - - - - - - - v_Calendar_ToolsMenu SUBGRAPH - - - - - - - - - - - v_CalendarWeekView - - - - - - - - - - - v_CalendarDayView - - - - - - - - - - - v_Calendar_ToolsMenu SUBGRAPH - - - - - - - - - - - v_Calendar_ToolsMenu SUBGRAPH - - - - - - - - - - - v_CalendarAppointment SUBGRAPH - - - - - - - - - - - v_Calendar SUBGRAPH - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapCalendarItem - - - - - - - - - - - - - - - - e_TapCalendarItem - - - - - - - - - - - - - - e_TryTapRandomListItem BACKTRACK - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - e_LeftKey - - - - - - - - - - - - - - - e_RightKey - - - - - - - - - - - - - - - e_UpKey - - - - - - - - - - - - - - - e_DownKey - - - - - - - - - - - - - - - e_LeftKey - - - - - - - - - - - - - - - e_RightKey - - - - - - - - - - - - - - - e_UpKey - - - - - - - - - - - - - - - e_DownKey - - - - - - - - - - - - - - - e_LeftKey - - - - - - - - - - - - - - - e_RightKey - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACK weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_CalendarMonthView + + + + + + + + + + + + v_Calendar_ToolsMenu SUBGRAPH + + + + + + + + + + + + v_CalendarWeekView + + + + + + + + + + + + v_CalendarDayView + + + + + + + + + + + + v_Calendar_ToolsMenu SUBGRAPH + + + + + + + + + + + + v_Calendar_ToolsMenu SUBGRAPH + + + + + + + + + + + + v_CalendarAppointment SUBGRAPH + + + + + + + + + + + + v_Calendar SUBGRAPH + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_TapCalendarItem + + + + + + + + + + + + + + + + + + e_TapCalendarItem + + + + + + + + + + + + + + + + e_TryTapRandomListItem BACKTRACK + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + e_LeftKey + + + + + + + + + + + + + + + + + e_RightKey + + + + + + + + + + + + + + + + + e_UpKey + + + + + + + + + + + + + + + + + e_DownKey + + + + + + + + + + + + + + + + + e_LeftKey + + + + + + + + + + + + + + + + + e_RightKey + + + + + + + + + + + + + + + + + e_UpKey + + + + + + + + + + + + + + + + + e_DownKey + + + + + + + + + + + + + + + + + e_LeftKey + + + + + + + + + + + + + + + + + e_RightKey + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp BACKTRACK weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/CalendarAppointment.graphml b/graphwalker-cli/src/test/resources/graphml/test24/CalendarAppointment.graphml index d624c0a6..f603b501 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/CalendarAppointment.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/CalendarAppointment.graphml @@ -1,976 +1,1251 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_CalendarAppointment - - - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - - - v_Date SUBGRAPH - - - - - - - - - - - - - v_Time SUBGRAPH - - - - - - - - - - - - - v_CalendarAppointmentStatus - - - - - - - - - - - - - v_CalendarAppointmentReminder - - - - - - - - - - - - - v_CalendarAppointmentReminderCustom - - - - - - - - - - - - - v_Time SUBGRAPH - - - - - - - - - - - - - v_Date SUBGRAPH - - - - - - - - - - - - - Stop - - - - - - - - - - - - - v_CalendarAppointmentSaveChanges - - - - - - - - - - - - - v_TimeMustBeLess - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - e_TapInListStringSubject BACKTRACK - - - - - - - - - - - - - - - - - e_SelectRandomListItem BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapInListStringStart_date BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapInListStringStart_time BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapInListStringStatus BACKTRACK - - - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapInListStringReminder BACKTRACK - - - - - - - - - - - - - - - - - - e_TapRandomListItemNotLast BACKTRACK /* If not 'Custom...' is selected. */ - - - - - - - - - - - - - - - - e_TapListItemLast - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView BACKTRACK - - - - - - - - - - - - - - - - - - e_TapItem2 BACKTRACK /* If 'Time:' is selected. */ - - - - - - - - - - - - - - - - - - e_TapItem1 BACKTRACK /* If 'Date:' is selected. */ - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACK weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACK weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + + v_CalendarAppointment + + + + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + + + + v_Date SUBGRAPH + + + + + + + + + + + + + + v_Time SUBGRAPH + + + + + + + + + + + + + + v_CalendarAppointmentStatus + + + + + + + + + + + + + + v_CalendarAppointmentReminder + + + + + + + + + + + + + + v_CalendarAppointmentReminderCustom + + + + + + + + + + + + + + v_Time SUBGRAPH + + + + + + + + + + + + + + v_Date SUBGRAPH + + + + + + + + + + + + + + Stop + + + + + + + + + + + + + + v_CalendarAppointmentSaveChanges + + + + + + + + + + + + + + v_TimeMustBeLess + + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + e_TapInListStringSubject BACKTRACK + + + + + + + + + + + + + + + + + + + e_SelectRandomListItem BACKTRACK + + + + + + + + + + + + + + + + + + + + e_SweepCloseView BACKTRACK + + + + + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapInListStringStart_date BACKTRACK + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_TapInListStringStart_time BACKTRACK + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_TapInListStringStatus BACKTRACK + + + + + + + + + + + + + + + + + + + + e_TapRandomListItem + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_TapInListStringReminder BACKTRACK + + + + + + + + + + + + + + + + + + + + e_TapRandomListItemNotLast BACKTRACK /* If not 'Custom...' is selected. */ + + + + + + + + + + + + + + + + + + e_TapListItemLast + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseView BACKTRACK + + + + + + + + + + + + + + + + + + + + e_TapItem2 BACKTRACK /* If 'Time:' is selected. */ + + + + + + + + + + + + + + + + + + + + e_TapItem1 BACKTRACK /* If 'Date:' is selected. */ + + + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp BACKTRACK weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseApp BACKTRACK weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml index eb81ddcb..80439411 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml @@ -1,267 +1,359 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_Calendar_ToolsMenu - - - - - - - - - - - v_CalendarAppointment SUBGRAPH - - - - - - - - - - - Stop - - - - - - - - - - - v_DeleteItems SUBGRAPH - - - - - - - - - - - v_Date SUBGRAPH - - - - - - - - - - - v_Audio SUBGRAPH - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_Calendar_ToolsMenu + + + + + + + + + + + + v_CalendarAppointment SUBGRAPH + + + + + + + + + + + + Stop + + + + + + + + + + + + v_DeleteItems SUBGRAPH + + + + + + + + + + + + v_Date SUBGRAPH + + + + + + + + + + + + v_Audio SUBGRAPH + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + + + + e_TapIcon_4 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/CallHistory.graphml b/graphwalker-cli/src/test/resources/graphml/test24/CallHistory.graphml index 8292ff5c..3237d432 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/CallHistory.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/CallHistory.graphml @@ -1,313 +1,400 @@ - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_CallHistory - - - - - - - - - - - - - v_CallHistory_ToolsMenu - - - - - - - - - - - - - v_DeleteItems SUBGRAPH - - - - - - - - - - - - - v_AddressBook_AddContact SUBGRAPH - - - - - - - - - - - - - v_ContactTapToSelectNumber SUBGRAPH - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* Only if enabled */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* Only if enabled */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_4 BACKTRACK /* Only if enabled */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + + v_CallHistory + + + + + + + + + + + + + + v_CallHistory_ToolsMenu + + + + + + + + + + + + + + v_DeleteItems SUBGRAPH + + + + + + + + + + + + + + v_AddressBook_AddContact SUBGRAPH + + + + + + + + + + + + + + v_ContactTapToSelectNumber SUBGRAPH + + + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* Only if enabled */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapIcon_1 BACKTRACK /* Only if enabled */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapIcon_4 BACKTRACK /* Only if enabled */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Camera.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Camera.graphml index e724e867..ef184b46 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Camera.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Camera.graphml @@ -1,871 +1,1152 @@ - - - - - - - - - - - Start - - - - - - - - - - - v_CameraViewFinder - - - - - - - - - - - v_Camera_ToolsMenu - - - - - - - - - - - v_Camera_Settings - - - - - - - - - - - v_Camera_Settings_Resolution - - - - - - - - - - - v_Camera_ResetDefaultValues - - - - - - - - - - - v_Camera_ToolsMenu_Reset - - - - - - - - - - - v_Camera_Settings_WhiteBalance - - - - - - - - - - - v_Camera_Settings_Brightness - - - - - - - - - - - v_SavingImage - - - - - - - - - - - v_SavingImage - - - - - - - - - - - v_SendPictureAsMMS SUBGRAPH - - - - - - - - - - - v_ImageViewer SUBGRAPH - - - - - - - - - - - v_Camera_Settings_ColorSaturation - - - - - - - - - - - v_Camera - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - e_TapTakePicture - - - - - - - - - - - - - - - - e_Wait_2s - - - - - - - - - - - - - - - - - - e_Wait_4s - - - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_SweepCloseApp BLOCKED weight=0.05 - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* If enabled */ - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - e_TapItem3 - - - - - - - - - - - - - - e_TapItem4 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_CameraViewFinder + + + + + + + + + + + + v_Camera_ToolsMenu + + + + + + + + + + + + v_Camera_Settings + + + + + + + + + + + + v_Camera_Settings_Resolution + + + + + + + + + + + + v_Camera_ResetDefaultValues + + + + + + + + + + + + v_Camera_ToolsMenu_Reset + + + + + + + + + + + + v_Camera_Settings_WhiteBalance + + + + + + + + + + + + v_Camera_Settings_Brightness + + + + + + + + + + + + v_SavingImage + + + + + + + + + + + + v_SavingImage + + + + + + + + + + + + v_SendPictureAsMMS SUBGRAPH + + + + + + + + + + + + v_ImageViewer SUBGRAPH + + + + + + + + + + + + v_Camera_Settings_ColorSaturation + + + + + + + + + + + + v_Camera + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + e_TapTakePicture + + + + + + + + + + + + + + + + + + e_Wait_2s + + + + + + + + + + + + + + + + + + + + e_Wait_4s + + + + + + + + + + + + + + + + + + + + e_TapRandomListItem + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_SweepCloseApp BLOCKED weight=0.05 + + + + + + + + + + + + + + + + e_TapIcon_1 BACKTRACK /* If enabled */ + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_TapItem2 + + + + + + + + + + + + + e_TapItem3 + + + + + + + + + + + + + + + + e_TapItem4 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/ContactFavorites.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ContactFavorites.graphml index 2dfeb832..5443d68a 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/ContactFavorites.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/ContactFavorites.graphml @@ -1,579 +1,741 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_ContactFavorites - - - - - - - - - - - - - v_ContactFavorites_ToolsMenu_1 - - - - - - - - - - - - - v_ContactFavorites_ToolsMenu_2 - - - - - - - - - - - - - v_AddressBook_AddContact SUBGRAPH - - - - - - - - - - - - - v_ContactFavorite_DeleteFavorite - - - - - - - - - - - - - v_AddressBook_ImportFromSIM - - - - - - - - - - - - - v_AddressBook_ExportToSIM - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK - - - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + + v_ContactFavorites + + + + + + + + + + + + + + v_ContactFavorites_ToolsMenu_1 + + + + + + + + + + + + + + v_ContactFavorites_ToolsMenu_2 + + + + + + + + + + + + + + v_AddressBook_AddContact SUBGRAPH + + + + + + + + + + + + + + v_ContactFavorite_DeleteFavorite + + + + + + + + + + + + + + v_AddressBook_ImportFromSIM + + + + + + + + + + + + + + v_AddressBook_ExportToSIM + + + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK + + + + + + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + + + + + + e_TapIcon_4 + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml index 9e860bcd..463eaf94 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml @@ -1,83 +1,107 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_ContactFavoritesReadOnly SUBGRAPH - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_ContactFavoritesReadOnly SUBGRAPH + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml index 34757f09..4ec59627 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml @@ -1,480 +1,637 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_ContactTapToSelectNumber - - - - - - - - - - - v_AddressBook_Contact_ToolsMenu - - - - - - - - - - - v_SendMessage SUBGRAPH - - - - - - - - - - - Stop - - - - - - - - - - - v_KeyboardNumeric SUBGRAPH - - - - - - - - - - - v_AddressBook_AddContact SUBGRAPH - - - - - - - - - - - v_AddressBook_AddContact SUBGRAPH - - - - - - - - - - - v_SendVCard SUBGRAPH - - - - - - - - - - - v_MessagingInbox NO_MERGE - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled. */ - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - e_SweepShowKeyboard BACKTRACK /* Only if contact has a number */ - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - e_SweepClose - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_ContactTapToSelectNumber + + + + + + + + + + + + v_AddressBook_Contact_ToolsMenu + + + + + + + + + + + + v_SendMessage SUBGRAPH + + + + + + + + + + + + Stop + + + + + + + + + + + + v_KeyboardNumeric SUBGRAPH + + + + + + + + + + + + v_AddressBook_AddContact SUBGRAPH + + + + + + + + + + + + v_AddressBook_AddContact SUBGRAPH + + + + + + + + + + + + v_SendVCard SUBGRAPH + + + + + + + + + + + + v_MessagingInbox NO_MERGE + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled. */ + + + + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + e_SweepShowKeyboard BACKTRACK /* Only if contact has a number */ + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + + + e_SweepClose + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Contacts.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Contacts.graphml index d127a7c7..4f724681 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Contacts.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Contacts.graphml @@ -1,228 +1,294 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_AddressBook SUBGRAPH - - - - - - - - - - - v_ContactFavorites SUBGRAPH - - - - - - - - - - - v_Contacts - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_AddressBook SUBGRAPH + + + + + + + + + + + + v_ContactFavorites SUBGRAPH + + + + + + + + + + + + v_Contacts + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/ContactsReadOnly.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ContactsReadOnly.graphml index a0bb43e9..5caf84aa 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/ContactsReadOnly.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/ContactsReadOnly.graphml @@ -1,194 +1,248 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_AddressBookReadOnly SUBGRAPH - - - - - - - - - - - v_ContactFavoritesReadOnly SUBGRAPH - - - - - - - - - - - v_ContactsReadOnly - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_AddressBookReadOnly SUBGRAPH + + + + + + + + + + + + v_ContactFavoritesReadOnly SUBGRAPH + + + + + + + + + + + + v_ContactsReadOnly + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Date.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Date.graphml index 96e909be..f97eea17 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Date.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Date.graphml @@ -1,115 +1,139 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_Date - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_PressRandomKey - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + + v_Date + + + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_PressRandomKey + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/DefaultValues.graphml b/graphwalker-cli/src/test/resources/graphml/test24/DefaultValues.graphml index 4b8ed698..ebd4ea61 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/DefaultValues.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/DefaultValues.graphml @@ -1,255 +1,337 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_DefaultValues - - - - - - - - - - - v_ResetDefaultValues - - - - - - - - - - - v_SelectItems - - - - - - - - - - - Stop - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled. */ - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ - - - - - - - - - - - - - - - e_SelectRandomListItem /* Values different from default, will be listed. */ - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_DefaultValues + + + + + + + + + + + + v_ResetDefaultValues + + + + + + + + + + + + v_SelectItems + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled. */ + + + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ + + + + + + + + + + + + + + + + + e_SelectRandomListItem /* Values different from default, will be listed. */ + + + + + + + + + + + + + + + + + e_TapRandomListItem + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/DeleteItems.graphml b/graphwalker-cli/src/test/resources/graphml/test24/DeleteItems.graphml index d1651024..be1c27c8 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/DeleteItems.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/DeleteItems.graphml @@ -1,253 +1,335 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_DeleteItems - - - - - - - - - - - v_SelectItems - - - - - - - - - - - Stop - - - - - - - - - - - v_ConfirmDeleteItem - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled */ - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled */ - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_SweepAccept BACKTRACK /* If any items is selected */ - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_TryTapRandomListItem BACKTRACK - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_SweepCloseApp BLOCKED weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp BLOCKED weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp BLOCKED weight=0.05 - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_DeleteItems + + + + + + + + + + + + v_SelectItems + + + + + + + + + + + + Stop + + + + + + + + + + + + v_ConfirmDeleteItem + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled */ + + + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK /* If any items is selected */ + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + e_TryTapRandomListItem BACKTRACK + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_SweepCloseApp BLOCKED weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp BLOCKED weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp BLOCKED weight=0.05 + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/GlobalSettings.graphml b/graphwalker-cli/src/test/resources/graphml/test24/GlobalSettings.graphml index 1269b901..474e0642 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/GlobalSettings.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/GlobalSettings.graphml @@ -1,466 +1,628 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_GlobalSettings - - - - - - - - - - - Stop - - - - - - - - - - - v_DisplaySettings - - - - - - - - - - - v_SystemSettings - - - - - - - - - - - v_CommunicationSettings - - - - - - - - - - - v_AudioSettings - - - - - - - - - - - v_GPRSSettings - - - - - - - - - - - v_GPRSSettingsToolsMenu - - - - - - - - - - - v_GPRSAddAPN - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_TheNameAlreadyExists - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - e_TapIcon_2 - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - BACKTRACK - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_GlobalSettings + + + + + + + + + + + + Stop + + + + + + + + + + + + v_DisplaySettings + + + + + + + + + + + + v_SystemSettings + + + + + + + + + + + + v_CommunicationSettings + + + + + + + + + + + + v_AudioSettings + + + + + + + + + + + + v_GPRSSettings + + + + + + + + + + + + v_GPRSSettingsToolsMenu + + + + + + + + + + + + v_GPRSAddAPN + + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + v_TheNameAlreadyExists + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + e_TapIcon_2 + + + + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + + + + e_TapIcon_4 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.05 + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapItem2 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/ImageViewer.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ImageViewer.graphml index b9882ced..1ff4ad48 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/ImageViewer.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/ImageViewer.graphml @@ -1,126 +1,165 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_ImageViewer - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_ImageViewer + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardNumeric.graphml b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardNumeric.graphml index 9fc8a618..880707a1 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardNumeric.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardNumeric.graphml @@ -1,250 +1,331 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - Stop - - - - - - - - - - - v_KeyboardNumeric - - - - - - - - - - - v_PasteText - - - - - - - - - - - v_KeyboardToolsMenu SUBGRAPH - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - e_SweepCloseView BACKTRACK weight=0.05 - - - - - - - - - - - - - - - e_PressRandomKey BACKTRACK weight=0.8 - - - - - - - - - - - - - - e_SweepShowKeyboard BACKTRACK /* If text exists in the clipboard. */ - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepShowTools BACKTRACK - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACK weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + Stop + + + + + + + + + + + + v_KeyboardNumeric + + + + + + + + + + + + v_PasteText + + + + + + + + + + + + v_KeyboardToolsMenu SUBGRAPH + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + e_SweepCloseView BACKTRACK weight=0.05 + + + + + + + + + + + + + + + + + e_PressRandomKey BACKTRACK weight=0.8 + + + + + + + + + + + + + + + + e_SweepShowKeyboard BACKTRACK /* If text exists in the clipboard. */ + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + e_TapRandomListItem + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepShowTools BACKTRACK + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp BACKTRACK weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardText.graphml b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardText.graphml index eeebb502..a46bba76 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardText.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardText.graphml @@ -1,367 +1,484 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - Stop - - - - - - - - - - - v_KeyboardText - - - - - - - - - - - v_PasteText - - - - - - - - - - - v_KeyboardToolsMenu SUBGRAPH - - - - - - - - - - - v_KeyboardSelectWord - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView BACKTRACK weight=0.25 - - - - - - - - - - - - - - - e_PressRandomKey BACKTRACK weight=0.5 - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_TryTapRandomListItem - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepShowTools BACKTRACK - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp BLOCKED BACKTRACK weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepShowKeyboard BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + Stop + + + + + + + + + + + + v_KeyboardText + + + + + + + + + + + + v_PasteText + + + + + + + + + + + + v_KeyboardToolsMenu SUBGRAPH + + + + + + + + + + + + v_KeyboardSelectWord + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + + + + + e_SweepCloseView BACKTRACK weight=0.25 + + + + + + + + + + + + + + + + + e_PressRandomKey BACKTRACK weight=0.5 + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + e_TryTapRandomListItem + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepShowTools BACKTRACK + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + + + e_TapScreen + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp BLOCKED BACKTRACK weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepShowKeyboard BACKTRACK + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + BACKTRACK + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml index 21171880..2921b2da 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml @@ -1,752 +1,1004 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_KeyboardSettings - - - - - - - - - - - v_SelectFavoriteKeyboards - - - - - - - - - - - v_SelectKeyboardSpeed - - - - - - - - - - - v_ChangeButtonVibration - - - - - - - - - - - v_DefaultValues SUBGRAPH - - - - - - - - - - - v_KeyboardToolsMenu - - - - - - - - - - - v_SelectKeyboard - - - - - - - - - - - Stop - - - - - - - - - - - v_ConfirmClear - - - - - - - - - - - v_CopyTo - - - - - - - - - - - v_PasteText - - - - - - - - - - - v_Preview - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - e_TapItem3 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_MoveSliderRandom - - - - - - - - - - - - - - - e_MoveSliderRandom - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled */ - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled */ - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_TapIcon_3 BACKTRACK /* If Icon 3 is enabled */ - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - e_TapIcon_4 BACKTRACK /* If Icon 4 is enabled */ - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TryTapRandomListItem - - - - - - - - - - - - - - e_TapIcon_6 BACKTRACK /* If Icon 6 is enabled */ - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_KeyboardSettings + + + + + + + + + + + + v_SelectFavoriteKeyboards + + + + + + + + + + + + v_SelectKeyboardSpeed + + + + + + + + + + + + v_ChangeButtonVibration + + + + + + + + + + + + v_DefaultValues SUBGRAPH + + + + + + + + + + + + v_KeyboardToolsMenu + + + + + + + + + + + + v_SelectKeyboard + + + + + + + + + + + + Stop + + + + + + + + + + + + v_ConfirmClear + + + + + + + + + + + + v_CopyTo + + + + + + + + + + + + v_PasteText + + + + + + + + + + + + v_Preview + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + + e_TapItem2 + + + + + + + + + + + + + + + + e_TapItem3 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + e_MoveSliderRandom + + + + + + + + + + + + + + + + + e_MoveSliderRandom + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled */ + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled */ + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_TapIcon_3 BACKTRACK /* If Icon 3 is enabled */ + + + + + + + + + + + + + + + + + + e_TapRandomListItem + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + e_TapIcon_4 BACKTRACK /* If Icon 4 is enabled */ + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TryTapRandomListItem + + + + + + + + + + + + + + + + e_TapIcon_6 BACKTRACK /* If Icon 6 is enabled */ + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Main.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Main.graphml index b97a7f85..928899f3 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Main.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Main.graphml @@ -1,925 +1,1170 @@ - - - - - - - - - - - Start - - - - - - - - - - - v_Contacts SUBGRAPH - - - - - - - - - - - v_StatusScreen - - - - - - - - - - - v_StartMenu - - - - - - - - - - - v_Camera SUBGRAPH - - - - - - - - - - - v_MessagingInbox SUBGRAPH - - - - - - - - - - - v_MediaPlayer SUBGRAPH - - - - - - - - - - - v_StartMenu_2 - - - - - - - - - - - v_StartMenu_3 - - - - - - - - - - - v_ShortCuts - - - - - - - - - - - v_SysFiles SUBGRAPH - - - - - - - - - - - v_RunningApplications SUBGRAPH - - - - - - - - - - - v_Calendar SUBGRAPH - - - - - - - - - - - v_Notes SUBGRAPH - - - - - - - - - - - v_Tetris SUBGRAPH - - - - - - - - - - - v_Alarm SUBGRAPH - - - - - - - - - - - v_NeoBrowser SUBGRAPH - - - - - - - - - - - v_Calculator SUBGRAPH - - - - - - - - - - - v_NumberToDial SUBGRAPH - - - - - - - - - - - v_GlobalSettings SUBGRAPH - - - - - - - - - - - e_Init - - - - - - - - - - - - - - e_TapIcon_2 - - - - - - - - - - - - - - - - e_SweepShowStartMenu - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - e_TapIcon_6 - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabLeft weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepTabLeft weight=0.05 - - - - - - - - - - - - - - - - e_SweepTabLeft weight=0.05 - - - - - - - - - - - - - - - - e_SweepTabLeft weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - e_TapIcon_2 - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - e_TapIcon_6 - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - e_TapIcon_2 - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - e_SweepShowKeyboard - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_Contacts SUBGRAPH + + + + + + + + + + + + v_StatusScreen + + + + + + + + + + + + v_StartMenu + + + + + + + + + + + + v_Camera SUBGRAPH + + + + + + + + + + + + v_MessagingInbox SUBGRAPH + + + + + + + + + + + + v_MediaPlayer SUBGRAPH + + + + + + + + + + + + v_StartMenu_2 + + + + + + + + + + + + v_StartMenu_3 + + + + + + + + + + + + v_ShortCuts + + + + + + + + + + + + v_SysFiles SUBGRAPH + + + + + + + + + + + + v_RunningApplications SUBGRAPH + + + + + + + + + + + + v_Calendar SUBGRAPH + + + + + + + + + + + + v_Notes SUBGRAPH + + + + + + + + + + + + v_Tetris SUBGRAPH + + + + + + + + + + + + v_Alarm SUBGRAPH + + + + + + + + + + + + v_NeoBrowser SUBGRAPH + + + + + + + + + + + + v_Calculator SUBGRAPH + + + + + + + + + + + + v_NumberToDial SUBGRAPH + + + + + + + + + + + + v_GlobalSettings SUBGRAPH + + + + + + + + + + + + e_Init + + + + + + + + + + + + + + + + e_TapIcon_2 + + + + + + + + + + + + + + + + + + e_SweepShowStartMenu + + + + + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + + + e_TapIcon_6 + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + e_SweepTabLeft weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepTabLeft weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepTabLeft weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepTabLeft weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.05 + + + + + + + + + + + + + + + + + + e_TapIcon_2 + + + + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + + + + e_TapIcon_4 + + + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + e_TapIcon_6 + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + e_TapIcon_2 + + + + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + + + + e_SweepShowKeyboard + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MakeCall.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MakeCall.graphml index 98bf9575..83af131b 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/MakeCall.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/MakeCall.graphml @@ -1,143 +1,185 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_MakeCall - - - - - - - - - - - v_OutgoingCall - - - - - - - - - - - v_NoSIMCard - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - e_NoSIMCard BACKTRACK /* If no SIM card inserted in the phone */ - - - - - - - - - - - - - - - - e_Wait_5s - - - - - - - - - - - - - - e_SweepCloseView - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_MakeCall + + + + + + + + + + + + v_OutgoingCall + + + + + + + + + + + + v_NoSIMCard + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + e_NoSIMCard BACKTRACK /* If no SIM card inserted in the phone */ + + + + + + + + + + + + + + + + + + e_Wait_5s + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MediaPlayer.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MediaPlayer.graphml index cfa9757f..1b24d5cc 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/MediaPlayer.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/MediaPlayer.graphml @@ -1,854 +1,1125 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_MediaPlayerChoose - - - - - - - - - - - v_MediaPlayerPlayList - - - - - - - - - - - v_MediaPlayerToolsMenu1 - - - - - - - - - - - v_MediaPlayerVolume - - - - - - - - - - - v_MediaPlayerToolsMenu2 - - - - - - - - - - - v_MediaPlayerToolsMenu - - - - - - - - - - - v_MediaPlayerPlayer - - - - - - - - - - - v_MediaPlayerSettings - - - - - - - - - - - v_CreatePlaylist - - - - - - - - - - - v_MediaPlayerAddFile - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - v_MediaPlayerPosition - - - - - - - - - - - v_EditPlaylist - - - - - - - - - - - v_MediaPlayer - - - - - - - - - - - Stop - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_SavePlaylistError - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_SweepShowTools BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - - e_MoveSliderRandom - - - - - - - - - - - - - - e_TapIcon_3 BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_MoveSliderRandom - - - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK - - - - - - - - - - - - - - - - e_TapIcon_5 BACKTRACK - - - - - - - - - - - - - - - - e_TapIcon_6 BACKTRACK - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.1 - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.1 - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_MediaPlayerChoose + + + + + + + + + + + + v_MediaPlayerPlayList + + + + + + + + + + + + v_MediaPlayerToolsMenu1 + + + + + + + + + + + + v_MediaPlayerVolume + + + + + + + + + + + + v_MediaPlayerToolsMenu2 + + + + + + + + + + + + v_MediaPlayerToolsMenu + + + + + + + + + + + + v_MediaPlayerPlayer + + + + + + + + + + + + v_MediaPlayerSettings + + + + + + + + + + + + v_CreatePlaylist + + + + + + + + + + + + v_MediaPlayerAddFile + + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + + v_MediaPlayerPosition + + + + + + + + + + + + v_EditPlaylist + + + + + + + + + + + + v_MediaPlayer + + + + + + + + + + + + Stop + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + v_SavePlaylistError + + + + + + + + + + + + + + + + e_TapIcon_4 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + + + e_TapItem2 + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + e_SweepShowTools BACKTRACK + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapIcon_4 + + + + + + + + + + + + + + + + + e_MoveSliderRandom + + + + + + + + + + + + + + + + e_TapIcon_3 BACKTRACK + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + e_MoveSliderRandom + + + + + + + + + + + + + + + + + + e_TapIcon_1 BACKTRACK + + + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK + + + + + + + + + + + + + + + + + + e_TapIcon_5 BACKTRACK + + + + + + + + + + + + + + + + + + e_TapIcon_6 BACKTRACK + + + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.1 + + + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.1 + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MessagingCompose.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MessagingCompose.graphml index 29d25974..794df213 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/MessagingCompose.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/MessagingCompose.graphml @@ -1,466 +1,616 @@ - - - - - - - - - - - Start - - - - - - - - - - - v_MessagingCompose - - - - - - - - - - - v_MessagingCompose_ToolsMenu - - - - - - - - - - - v_ContactsReadOnly SUBGRAPH - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - Stop - - - - - - - - - - - v_MessageEmpty - - - - - - - - - - - v_NoRecipient - - - - - - - - - - - v_SendFailed - - - - - - - - - - - v_SendingMessage - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_TapInListStringTo - - - - - - - - - - - - - - - - e_TapInListStringText - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_Wait_5s - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - e_Wait_5s - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_MessagingCompose + + + + + + + + + + + + v_MessagingCompose_ToolsMenu + + + + + + + + + + + + v_ContactsReadOnly SUBGRAPH + + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + + Stop + + + + + + + + + + + + v_MessageEmpty + + + + + + + + + + + + v_NoRecipient + + + + + + + + + + + + v_SendFailed + + + + + + + + + + + + v_SendingMessage + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_TapInListStringTo + + + + + + + + + + + + + + + + + + e_TapInListStringText + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_Wait_5s + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + e_Wait_5s + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MessagingDrafts.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MessagingDrafts.graphml index 1ab48945..bf2e09bf 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/MessagingDrafts.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/MessagingDrafts.graphml @@ -1,133 +1,175 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_MessagingInbox MERGE - - - - - - - - - - - v_MessagingDrafts - - - - - - - - - - - v_MessagingSent MERGE - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_MessagingInbox MERGE + + + + + + + + + + + + v_MessagingDrafts + + + + + + + + + + + + v_MessagingSent MERGE + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MessagingInbox.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MessagingInbox.graphml index 24980d58..4923039d 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/MessagingInbox.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/MessagingInbox.graphml @@ -1,233 +1,306 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_MessagingInbox - - - - - - - - - - - v_MessagingDrafts SUBGRAPH - - - - - - - - - - - v_MessagingSent SUBGRAPH - - - - - - - - - - - v_MessagingInbox_ToolsMenu - - - - - - - - - - - v_MessagingCompose SUBGRAPH - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_MessagingInbox + + + + + + + + + + + + v_MessagingDrafts SUBGRAPH + + + + + + + + + + + + v_MessagingSent SUBGRAPH + + + + + + + + + + + + v_MessagingInbox_ToolsMenu + + + + + + + + + + + + v_MessagingCompose SUBGRAPH + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MessagingSent.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MessagingSent.graphml index 249a9191..04ff97cb 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/MessagingSent.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/MessagingSent.graphml @@ -1,133 +1,175 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_MessagingInbox MERGE - - - - - - - - - - - v_MessagingSent - - - - - - - - - - - v_MessagingDrafts MERGE - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_MessagingInbox MERGE + + + + + + + + + + + + v_MessagingSent + + + + + + + + + + + + v_MessagingDrafts MERGE + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/NeoBrowser.graphml b/graphwalker-cli/src/test/resources/graphml/test24/NeoBrowser.graphml index a4822855..720fe164 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/NeoBrowser.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/NeoBrowser.graphml @@ -1,951 +1,1245 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_NeoBrowser - - - - - - - - - - - v_NeoBrowserToolsMenu_1 - - - - - - - - - - - v_URLEntered - - - - - - - - - - - v_NoPageToDisplay - - - - - - - - - - - v_QuitBrowser - - - - - - - - - - - v_InternetConnErr - - - - - - - - - - - v_EnterURL - - - - - - - - - - - v_SelectFontSize - - - - - - - - - - - v_Favorites - - - - - - - - - - - v_NeoBrowserToolsMenu_2 - - - - - - - - - - - v_NeoBrowserSettings - - - - - - - - - - - v_KeyboardText - - - - - - - - - - - v_SelectWWWAPN - - - - - - - - - - - v_NeoBrowserWin - - - - - - - - - - - v_NoInternetConnErr - - - - - - - - - - - Stop - - - - - - - - - - - v_BrowserStatusScreen - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - e_EnterValidURL - - - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - e_TapIcon_6 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - e_SweepShowKeyboard - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - e_EnterInvalidURL - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - e_TryTapRandomListItem BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_NeoBrowser + + + + + + + + + + + + v_NeoBrowserToolsMenu_1 + + + + + + + + + + + + v_URLEntered + + + + + + + + + + + + v_NoPageToDisplay + + + + + + + + + + + + v_QuitBrowser + + + + + + + + + + + + v_InternetConnErr + + + + + + + + + + + + v_EnterURL + + + + + + + + + + + + v_SelectFontSize + + + + + + + + + + + + v_Favorites + + + + + + + + + + + + v_NeoBrowserToolsMenu_2 + + + + + + + + + + + + v_NeoBrowserSettings + + + + + + + + + + + + v_KeyboardText + + + + + + + + + + + + v_SelectWWWAPN + + + + + + + + + + + + v_NeoBrowserWin + + + + + + + + + + + + v_NoInternetConnErr + + + + + + + + + + + + Stop + + + + + + + + + + + + v_BrowserStatusScreen + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + + e_EnterValidURL + + + + + + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + e_TapIcon_6 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_TapRandomListItem + + + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + e_SweepShowKeyboard + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + e_EnterInvalidURL + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + e_TryTapRandomListItem BACKTRACK + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Notes.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Notes.graphml index 8a45f8af..df2d59a9 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Notes.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Notes.graphml @@ -1,440 +1,584 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_Notes - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - v_NoteHasChanged - - - - - - - - - - - v_Notes_View - - - - - - - - - - - v_Notes_ToolsMenu - - - - - - - - - - - v_DeleteItems SUBGRAPH - - - - - - - - - - - Stop - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_TryTapListItemNotFirst BACKTRACK /* If note exists */ - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If icon enabled */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapListItemFirst - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_SweepCloseView BLOCKED weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_Notes + + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + + v_NoteHasChanged + + + + + + + + + + + + v_Notes_View + + + + + + + + + + + + v_Notes_ToolsMenu + + + + + + + + + + + + v_DeleteItems SUBGRAPH + + + + + + + + + + + + Stop + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.05 + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_TryTapListItemNotFirst BACKTRACK /* If note exists */ + + + + + + + + + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* If icon enabled */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapListItemFirst + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_SweepCloseView BLOCKED weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/NumberToDial.graphml b/graphwalker-cli/src/test/resources/graphml/test24/NumberToDial.graphml index 273f4634..69c19caf 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/NumberToDial.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/NumberToDial.graphml @@ -1,208 +1,275 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_NumberToDial - - - - - - - - - - - Stop - - - - - - - - - - - v_PasteText - - - - - - - - - - - v_KeyboardToolsMenu SUBGRAPH - - - - - - - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_SweepShowKeyboard BACKTRACK /* If text exists in the clipboard. */ - - - - - - - - - - - - - - - - e_TryTapRandomListItem BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_NumberToDial + + + + + + + + + + + + Stop + + + + + + + + + + + + v_PasteText + + + + + + + + + + + + v_KeyboardToolsMenu SUBGRAPH + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_SweepShowKeyboard BACKTRACK /* If text exists in the clipboard. */ + + + + + + + + + + + + + + + + + + e_TryTapRandomListItem BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/RunningApplications.graphml b/graphwalker-cli/src/test/resources/graphml/test24/RunningApplications.graphml index 5492292d..45559b26 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/RunningApplications.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/RunningApplications.graphml @@ -1,238 +1,315 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - v_RunningApplications - - - - - - - - - - - v_RunningApplicationsToolMenu - - - - - - - - - - - v_RunningApplicationsSettings - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - e_TapIcon_3 BACKTRACK - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_RunningApplications + + + + + + + + + + + + v_RunningApplicationsToolMenu + + + + + + + + + + + + v_RunningApplicationsSettings + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + + + + e_TapIcon_3 BACKTRACK + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/SendMessage.graphml b/graphwalker-cli/src/test/resources/graphml/test24/SendMessage.graphml index bacc8f4e..365d3495 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/SendMessage.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/SendMessage.graphml @@ -1,231 +1,293 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_MessagingCompose SUBGRAPH - - - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - - - Stop - - - - - - - - - - - - - v_SendMessage. - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - BACKTRACK /* No text entered */ - - - - - - - - - - - - - - - - BACKTRACK /* Text entered */ - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + + v_MessagingCompose SUBGRAPH + + + + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + + + + Stop + + + + + + + + + + + + + + v_SendMessage. + + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + BACKTRACK /* + No text entered */ + + + + + + + + + + + + + + + + + BACKTRACK /* + Text entered */ + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/SendPictureAsMMS.graphml b/graphwalker-cli/src/test/resources/graphml/test24/SendPictureAsMMS.graphml index 119fa590..8774889b 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/SendPictureAsMMS.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/SendPictureAsMMS.graphml @@ -1,448 +1,577 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_SendPictureAsMMS - - - - - - - - - - - - - v_ConfirmResize - - - - - - - - - - - - - v_EditSlide - - - - - - - - - - - - - v_SaveSlideChanges - - - - - - - - - - - - - v_ComposeMMS MERGE - - - - - - - - - - - - - v_Slides - - - - - - - - - - - - - Stop - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK /* Image resized */ - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + + v_SendPictureAsMMS + + + + + + + + + + + + + + v_ConfirmResize + + + + + + + + + + + + + + v_EditSlide + + + + + + + + + + + + + + v_SaveSlideChanges + + + + + + + + + + + + + + v_ComposeMMS MERGE + + + + + + + + + + + + + + v_Slides + + + + + + + + + + + + + + Stop + + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + e_TapScreen + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + BACKTRACK /* + Image resized */ + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/SendVCard.graphml b/graphwalker-cli/src/test/resources/graphml/test24/SendVCard.graphml index e1dbeb94..3d578bea 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/SendVCard.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/SendVCard.graphml @@ -1,589 +1,758 @@ - + - - - - - - - - - - - - - - - v_SendVCard - - - - - - - - - - - - - Start - - - - - - - - - - - - - Stop - - - - - - - - - - - - - v_MessagingInbox NO_MERGE - - - - - - - - - - - - - v_KeyboardNumeric SUBGRAPH - - - - - - - - - - - - - v_EditTo - - - - - - - - - - - - - v_NoRecipient - - - - - - - - - - - - - v_ContactsReadOnly - - - - - - - - - - - - - v_ContactTapToSelectNumber NO_MERGE - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepShowKeyboard BACKTRACK /* Only contact has a number */ - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - - - e_TapRandomListItem BACKTRACK /* Only allowed when there are numbers in the list */ - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - BACKTRACK /* Recipient dose no exist */ - - - - - - - - - - - - - BACKTRACK /* Recipient exists */ - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - + + + + + + + + + + + + + + + v_SendVCard + + + + + + + + + + + + + + Start + + + + + + + + + + + + + + Stop + + + + + + + + + + + + + + v_MessagingInbox NO_MERGE + + + + + + + + + + + + + + v_KeyboardNumeric SUBGRAPH + + + + + + + + + + + + + + v_EditTo + + + + + + + + + + + + + + v_NoRecipient + + + + + + + + + + + + + + v_ContactsReadOnly + + + + + + + + + + + + + + v_ContactTapToSelectNumber NO_MERGE + + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepShowKeyboard BACKTRACK /* Only contact has a number */ + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + + + + + e_TapRandomListItem BACKTRACK /* Only allowed when there are numbers in the list */ + + + + + + + + + + + + + + + + + + e_TapScreen + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + BACKTRACK /* + Recipient dose no exist */ + + + + + + + + + + + + + + BACKTRACK /* + Recipient exists */ + + + + + + + + + + + + + + + + + + e_TapScreen + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/SysFiles.graphml b/graphwalker-cli/src/test/resources/graphml/test24/SysFiles.graphml index 0adaa6f2..a8858704 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/SysFiles.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/SysFiles.graphml @@ -1,99 +1,123 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_SysFiles - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + + v_SysFiles + + + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Tetris.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Tetris.graphml index 9fb3fec2..64c90a13 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Tetris.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Tetris.graphml @@ -1,142 +1,180 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_Tetris - - - - - - - - - - - - - v_QuitTetris - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + + v_Tetris + + + + + + + + + + + + + + v_QuitTetris + + + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Time.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Time.graphml index 9b2b3d7f..f3a21e48 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Time.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Time.graphml @@ -1,98 +1,126 @@ - - - - - - - - - - - Start - - - - - - - - - - - v_Time - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - e_PressRandomKey - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - + + + + + + + + + + + Start + + + + + + + + + + + + v_Time + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + + e_PressRandomKey + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + diff --git a/graphwalker-cli/src/test/resources/xml/ReachedVertex.xml b/graphwalker-cli/src/test/resources/xml/ReachedVertex.xml index 0d356526..f8986ff9 100644 --- a/graphwalker-cli/src/test/resources/xml/ReachedVertex.xml +++ b/graphwalker-cli/src/test/resources/xml/ReachedVertex.xml @@ -27,8 +27,8 @@ - - - - + + + + diff --git a/graphwalker-cli/src/test/resources/xml/javaExecutor.xml b/graphwalker-cli/src/test/resources/xml/javaExecutor.xml index 5ef8bc44..2fcc11b5 100644 --- a/graphwalker-cli/src/test/resources/xml/javaExecutor.xml +++ b/graphwalker-cli/src/test/resources/xml/javaExecutor.xml @@ -27,8 +27,8 @@ - + - - + + diff --git a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init6.xml b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init6.xml index d8835294..c88fa662 100644 --- a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init6.xml +++ b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init6.xml @@ -24,9 +24,9 @@ THE SOFTWARE. #L% --> - - - - - - + + + + + + diff --git a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init8.xml b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init8.xml index 6f82cbe9..a086f3fb 100644 --- a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init8.xml +++ b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init8.xml @@ -24,18 +24,18 @@ THE SOFTWARE. #L% --> - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init9.xml b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init9.xml index a32d2845..7882c2bd 100644 --- a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init9.xml +++ b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init9.xml @@ -24,18 +24,18 @@ THE SOFTWARE. #L% --> - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/graphwalker-core/pom.xml b/graphwalker-core/pom.xml index ac5ea4f7..f44bf73c 100644 --- a/graphwalker-core/pom.xml +++ b/graphwalker-core/pom.xml @@ -15,43 +15,43 @@ GraphWalker Core - - junit - junit - test - - - commons-cli - commons-cli - - - log4j - log4j - - - org.jdom - jdom - - - commons-configuration - commons-configuration - - - net.sf.jung - jung-graph-impl - - - org.beanshell - bsh - - - net.sf.jung - jung-algorithms - - - net.sf.jung - jung-visualization - + + junit + junit + test + + + commons-cli + commons-cli + + + log4j + log4j + + + org.jdom + jdom + + + commons-configuration + commons-configuration + + + net.sf.jung + jung-graph-impl + + + org.beanshell + bsh + + + net.sf.jung + jung-algorithms + + + net.sf.jung + jung-visualization + \ No newline at end of file diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Application.java b/graphwalker-core/src/main/java/org/graphwalker/core/Application.java index 43b2bbcb..59fe482d 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Application.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Application.java @@ -27,8 +27,12 @@ public interface Application { Status getStatus(); + void setButtons(); + void updateLayout(); + void pause(); + void executingJavaTest(boolean flag); } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java b/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java index dd713c6b..f6995e49 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java @@ -32,26 +32,26 @@ import java.net.URLClassLoader; public class ClassPathHack { - private static final Class[] parameters = new Class[] { URL.class }; + private static final Class[] parameters = new Class[]{URL.class}; - @SuppressWarnings("deprecation") - public static void addFile(File f) throws IOException { - // f.toURL is deprecated - addURL(f.toURL()); - } + @SuppressWarnings("deprecation") + public static void addFile(File f) throws IOException { + // f.toURL is deprecated + addURL(f.toURL()); + } - protected static void addURL(URL u) throws IOException { - URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader(); - Class sysclass = URLClassLoader.class; + protected static void addURL(URL u) throws IOException { + URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader(); + Class sysclass = URLClassLoader.class; - try { - Method method = sysclass.getDeclaredMethod("addURL", parameters); - method.setAccessible(true); - method.invoke(sysloader, u); - } catch (Exception e) { - Util.logStackTraceToError(e); - throw new IOException("Error, could not add URL to system classloader"); - } + try { + Method method = sysclass.getDeclaredMethod("addURL", parameters); + method.setAccessible(true); + method.invoke(sysloader, u); + } catch (Exception e) { + Util.logStackTraceToError(e); + throw new IOException("Error, could not add URL to system classloader"); + } - } + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java b/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java index b49eb5e8..02a2d9e3 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java @@ -26,128 +26,128 @@ package org.graphwalker.core; +import org.apache.log4j.Logger; + import java.util.Stack; import java.util.Vector; -import org.apache.log4j.Logger; - public class EventDrivenModels { - private static Logger logger = Util.setupLogger(EventDrivenModels.class); - Vector models = new Vector(); - Stack pausedModels = new Stack(); - private Object executionClass = null; - private ThreadWrapper executingModel = null; - private static final Object lockbox = new Object(); - - public EventDrivenModels(Object executionClass) { - this.executionClass = executionClass; - } - - public EventDrivenModels() { - } - - public Vector getModels() { - return models; - } - - public void addModel(ModelBasedTesting model) { - models.add(model); - } - - public void runModel(String modelName) { - stopAndSwitchModel(modelName); - } - - public void stopAndSwitchModel(String modelName) { - logger.debug("Will switch to model: " + modelName); - if (executingModel != null) { - logger.debug("Stopping model thread: " + executingModel); - executingModel.getModel().stop(); - executingModel = null; - } - for (ModelBasedTesting m : models) { - if (modelName.equals(m.getGraph().getLabelKey())) { - logger.debug("Found the model, will now start it: " + m.getGraph().getLabelKey()); - executingModel = new ThreadWrapper(m); - executingModel.start(); - return; - } - } - throw new RuntimeException("Did not find a model: " + modelName); - } - - public void pauseAndSwitchModel(String modelName) { - logger.debug("Will switch to model: " + modelName); - if (executingModel != null) { - logger.debug("Suspending model thread: " + executingModel); - executingModel.getModel().suspend(); - pausedModels.push(executingModel); - executingModel = null; - } - for (ModelBasedTesting m : models) { - if (modelName.equals(m.getGraph().getLabelKey())) { - logger.debug("Found the model, will now start it: " + m.getGraph().getLabelKey()); - executingModel = new ThreadWrapper(m); - executingModel.start(); - return; - } - } - throw new RuntimeException("Did not find a model: " + modelName); - } - - public void waitToFinish() { - try { - while (true) { - synchronized (lockbox) { - if (executingModel == null) { - if (pausedModels.isEmpty()) { - logger.debug("All threads terminated"); - return; - } - logger.debug("Found suspended model: " + pausedModels.peek()); - executingModel = pausedModels.pop(); - executingModel.getModel().resume(); - } else { - if (executingModel.getState() == Thread.State.TERMINATED) { - logger.debug("Terminated: " + executingModel); - executingModel = null; - } - } - } - Thread.sleep(100); - } - } catch (InterruptedException e) { - Util.logStackTraceToError(e); - } - } - - public class ThreadWrapper extends Thread { - private ModelBasedTesting model; - - public ModelBasedTesting getModel() { - return model; - } - - public void setModel(ModelBasedTesting model) { - this.model = model; - } - - public ThreadWrapper(ModelBasedTesting model) { - this.model = model; - setName(model.getGraph().getLabelKey()); - } - - @Override - public void run() { - try { - model.setCurrentVertex("Start"); - model.reload(); - model.executePath(executionClass); - } catch (InterruptedException e) { - Util.logStackTraceToError(e); - } catch (RuntimeException e) { - logger.debug(e.getMessage()); - } - } - } + private static Logger logger = Util.setupLogger(EventDrivenModels.class); + Vector models = new Vector(); + Stack pausedModels = new Stack(); + private Object executionClass = null; + private ThreadWrapper executingModel = null; + private static final Object lockbox = new Object(); + + public EventDrivenModels(Object executionClass) { + this.executionClass = executionClass; + } + + public EventDrivenModels() { + } + + public Vector getModels() { + return models; + } + + public void addModel(ModelBasedTesting model) { + models.add(model); + } + + public void runModel(String modelName) { + stopAndSwitchModel(modelName); + } + + public void stopAndSwitchModel(String modelName) { + logger.debug("Will switch to model: " + modelName); + if (executingModel != null) { + logger.debug("Stopping model thread: " + executingModel); + executingModel.getModel().stop(); + executingModel = null; + } + for (ModelBasedTesting m : models) { + if (modelName.equals(m.getGraph().getLabelKey())) { + logger.debug("Found the model, will now start it: " + m.getGraph().getLabelKey()); + executingModel = new ThreadWrapper(m); + executingModel.start(); + return; + } + } + throw new RuntimeException("Did not find a model: " + modelName); + } + + public void pauseAndSwitchModel(String modelName) { + logger.debug("Will switch to model: " + modelName); + if (executingModel != null) { + logger.debug("Suspending model thread: " + executingModel); + executingModel.getModel().suspend(); + pausedModels.push(executingModel); + executingModel = null; + } + for (ModelBasedTesting m : models) { + if (modelName.equals(m.getGraph().getLabelKey())) { + logger.debug("Found the model, will now start it: " + m.getGraph().getLabelKey()); + executingModel = new ThreadWrapper(m); + executingModel.start(); + return; + } + } + throw new RuntimeException("Did not find a model: " + modelName); + } + + public void waitToFinish() { + try { + while (true) { + synchronized (lockbox) { + if (executingModel == null) { + if (pausedModels.isEmpty()) { + logger.debug("All threads terminated"); + return; + } + logger.debug("Found suspended model: " + pausedModels.peek()); + executingModel = pausedModels.pop(); + executingModel.getModel().resume(); + } else { + if (executingModel.getState() == Thread.State.TERMINATED) { + logger.debug("Terminated: " + executingModel); + executingModel = null; + } + } + } + Thread.sleep(100); + } + } catch (InterruptedException e) { + Util.logStackTraceToError(e); + } + } + + public class ThreadWrapper extends Thread { + private ModelBasedTesting model; + + public ModelBasedTesting getModel() { + return model; + } + + public void setModel(ModelBasedTesting model) { + this.model = model; + } + + public ThreadWrapper(ModelBasedTesting model) { + this.model = model; + setName(model.getGraph().getLabelKey()); + } + + @Override + public void run() { + try { + model.setCurrentVertex("Start"); + model.reload(); + model.executePath(executionClass); + } catch (InterruptedException e) { + Util.logStackTraceToError(e); + } catch (RuntimeException e) { + logger.debug(e.getMessage()); + } + } + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java b/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java index d3cd3d88..ea5cb89e 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java @@ -25,138 +25,137 @@ */ /** - * + * */ package org.graphwalker.core; /** * @author Johan Tejle - * */ public class ExtendedMain { - /** - * This method implements the Edge 'e_Cancel' - */ - public void e_Cancel() { - System.out.println("Edge: e_Cancel"); - } - - /** - * This method implements the Edge 'e_ChangeDatabase' - */ - public void e_ChangeDatabase() { - System.out.println("Edge: e_ChangeDatabase"); - } - - /** - * This method implements the Edge 'e_CloseApp' - */ - public void e_CloseApp() { - System.out.println("Edge: e_CloseApp"); - } - - /** - * This method implements the Edge 'e_CloseDB' - */ - public void e_CloseDB() { - System.out.println("Edge: e_CloseDB"); - } - - /** - * This method implements the Edge 'e_CloseDialog' - */ - public void e_CloseDialog() { - System.out.println("Edge: e_CloseDialog"); - } - - /** - * This method implements the Edge 'e_EnterCorrectKey' - */ - public void e_EnterCorrectKey() { - System.out.println("Edge: e_EnterCorrectKey"); - } - - /** - * This method implements the Edge 'e_EnterInvalidKey' - */ - public void e_EnterInvalidKey() { - System.out.println("Edge: e_EnterInvalidKey"); - } - - /** - * This method implements the Edge 'e_Initialize' - */ - public void e_Initialize() { - System.out.println("Edge: e_Initialize"); - } - - /** - * This method implements the Edge 'e_No' - */ - public void e_No() { - System.out.println("Edge: e_No"); - } - - /** - * This method implements the Edge 'e_Start' - */ - public void e_Start() { - System.out.println("Edge: e_Start"); - } - - /** - * This method implements the Edge 'e_StartWithDatabase' - */ - public void e_StartWithDatabase() { - System.out.println("Edge: e_StartWithDatabase"); - } - - /** - * This method implements the Edge 'e_Yes' - */ - public void e_Yes() { - System.out.println("Edge: e_Yes"); - } - - /** - * This method implements the Vertex 'v_EnterMasterCompositeMasterKey' - */ - public void v_EnterMasterCompositeMasterKey() { - System.out.println("Vertex: v_EnterMasterCompositeMasterKey"); - } - - /** - * This method implements the Vertex 'v_InvalidKey' - */ - public void v_InvalidKey() { - System.out.println("Vertex: v_InvalidKey"); - } - - /** - * This method implements the Vertex 'v_KeePassNotRunning' - */ - public void v_KeePassNotRunning() { - System.out.println("Vertex: v_KeePassNotRunning"); - } - - /** - * This method implements the Vertex 'v_MainWindowEmpty' - */ - public void v_MainWindowEmpty() { - System.out.println("Vertex: v_MainWindowEmpty"); - } - - /** - * This method implements the Vertex 'v_MainWindow_DB_Loaded' - */ - public void v_MainWindow_DB_Loaded() { - System.out.println("Vertex: v_MainWindow_DB_Loaded"); - } - - /** - * This method implements the Vertex 'v_SaveBeforeCloseLock' - */ - public void v_SaveBeforeCloseLock() { - System.out.println("Vertex: v_SaveBeforeCloseLock"); - } + /** + * This method implements the Edge 'e_Cancel' + */ + public void e_Cancel() { + System.out.println("Edge: e_Cancel"); + } + + /** + * This method implements the Edge 'e_ChangeDatabase' + */ + public void e_ChangeDatabase() { + System.out.println("Edge: e_ChangeDatabase"); + } + + /** + * This method implements the Edge 'e_CloseApp' + */ + public void e_CloseApp() { + System.out.println("Edge: e_CloseApp"); + } + + /** + * This method implements the Edge 'e_CloseDB' + */ + public void e_CloseDB() { + System.out.println("Edge: e_CloseDB"); + } + + /** + * This method implements the Edge 'e_CloseDialog' + */ + public void e_CloseDialog() { + System.out.println("Edge: e_CloseDialog"); + } + + /** + * This method implements the Edge 'e_EnterCorrectKey' + */ + public void e_EnterCorrectKey() { + System.out.println("Edge: e_EnterCorrectKey"); + } + + /** + * This method implements the Edge 'e_EnterInvalidKey' + */ + public void e_EnterInvalidKey() { + System.out.println("Edge: e_EnterInvalidKey"); + } + + /** + * This method implements the Edge 'e_Initialize' + */ + public void e_Initialize() { + System.out.println("Edge: e_Initialize"); + } + + /** + * This method implements the Edge 'e_No' + */ + public void e_No() { + System.out.println("Edge: e_No"); + } + + /** + * This method implements the Edge 'e_Start' + */ + public void e_Start() { + System.out.println("Edge: e_Start"); + } + + /** + * This method implements the Edge 'e_StartWithDatabase' + */ + public void e_StartWithDatabase() { + System.out.println("Edge: e_StartWithDatabase"); + } + + /** + * This method implements the Edge 'e_Yes' + */ + public void e_Yes() { + System.out.println("Edge: e_Yes"); + } + + /** + * This method implements the Vertex 'v_EnterMasterCompositeMasterKey' + */ + public void v_EnterMasterCompositeMasterKey() { + System.out.println("Vertex: v_EnterMasterCompositeMasterKey"); + } + + /** + * This method implements the Vertex 'v_InvalidKey' + */ + public void v_InvalidKey() { + System.out.println("Vertex: v_InvalidKey"); + } + + /** + * This method implements the Vertex 'v_KeePassNotRunning' + */ + public void v_KeePassNotRunning() { + System.out.println("Vertex: v_KeePassNotRunning"); + } + + /** + * This method implements the Vertex 'v_MainWindowEmpty' + */ + public void v_MainWindowEmpty() { + System.out.println("Vertex: v_MainWindowEmpty"); + } + + /** + * This method implements the Vertex 'v_MainWindow_DB_Loaded' + */ + public void v_MainWindow_DB_Loaded() { + System.out.println("Vertex: v_MainWindow_DB_Loaded"); + } + + /** + * This method implements the Vertex 'v_SaveBeforeCloseLock' + */ + public void v_SaveBeforeCloseLock() { + System.out.println("Vertex: v_SaveBeforeCloseLock"); + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java b/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java index d82a62bd..f5722fde 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java @@ -26,12 +26,12 @@ package org.graphwalker.core; -import java.util.Vector; - import org.graphwalker.core.exceptions.GeneratorException; import org.graphwalker.core.exceptions.StopConditionException; import org.graphwalker.core.multipleModels.ModelHandler; +import java.util.Vector; + /** * Handles the common constants for the org.graphwalker package. This includes * reserved key words, and text strings used for storing custom data as @@ -39,458 +39,458 @@ */ public class Keywords { - /** - * Each graph has a start (entry) vertex, and that vertex holds this datum.
- * There is only one vertex in a graph, holding this datum.
- * Used by MBT when merging graphs, and when generating test sequences. - */ - public static final String START_NODE = "Start"; - - /** - * Each graph has one and only one vertex to which the START_NODE points to. - * The vertex which has this keyword set, is that node. - */ - public static final String GRAPH_VERTEX = "graph_vertex"; - - /** - * The stop (exit) vertex denotes an exit point in a graph.
- * There can only be one vertex in a graph, holding this datum.
- * Only sub-graphs can have a stop vertex.
- * Used by MBT only when merging graphs. - */ - public static final String STOP_NODE = "Stop"; - - /** - * The id taken from the graphml file. TODO Investigate if this datum is - * deprecated - */ - public static final String ID_KEY = "id"; - - /** - * The graph editor yEd, can use images to depict vertices, which normally - * gets lost during merging. So, when writing merged graphs back to file, this - * datum holds the path and file of that image. - */ - public static final String IMAGE_KEY = "image"; - - /** - * The graph editor yEd, can use images to depict vertices, which normally - * gets lost during merging. So, when writing merged graphs back to file, this - * datum holds the width of that image. - */ - public static final String WIDTH_KEY = "width"; - - /** - * The graph editor yEd, can use images to depict vertices, which normally - * gets lost during merging. So, when writing merged graphs back to file, this - * datum holds the height of that image. - */ - public static final String HEIGHT_KEY = "height"; - - /** - * The x position of the node, as saved by the yEd editor. - */ - public static final String X_POS = "x_pos"; - - /** - * The y position of the node, as saved by the yEd editor. - */ - public static final String Y_POS = "y_pos"; - - /** - * When merging graphs, the source file of each graph is noted, so that in the - * event of an error, the correct graph file can be used in meaningful error - * messages to the end user. - */ - public static final String FILE_KEY = "file"; - - /** - * The name of the vertex or edge, that will result in a method or function - * call in the executing test tool.
- * * The label of an edge can be empty (or null).
- * * A vertex must always have a label.
- * * The label is always defined at the first line in a label.
- */ - public static final String LABEL_KEY = "label"; - - /** - * This datum contain the complete text hold by a label. - */ - public static final String FULL_LABEL_KEY = "full_label"; - - /** - * This datum contains a counter for each vertex and edge. Used by MBT during - * a online test. Every time a vertex or an edge is traversed it is visited, - * thus incremented once. - */ - public static final String VISITED_KEY = "visited"; - - /** - * Used by MBT during random walks during test sequence generation. It holds a - * real value between 0 and 1, and represents the probability that a specific - * edge should be chosen. A value of 0.05, would mean a 5% chance of that edge - * to be selected during a run.
- * * Only edges uses this datum. - */ - public static final String WEIGHT_KEY = "weight"; - - /** - * Used by MBT to store information about manual testing. This data should - * containing text regarding an action or expected result. - */ - public static final String DATA_KEY = "data"; - - /** - * The datum provides the edge or vertex a unique integer number, uniquely - * identifying the object.
- * Generated by MBT when reading and merging graphs. Also used to provide - * better info during logging at:
- * * Parsing graphml files
- * * Merging
- * * Generating offline and online test sequences - */ - public static final String INDEX_KEY = "index"; - - /** - * This datum is used by MBT when merging graphs. It tells MBT that the vertex - * containing this key word, should be merged with the first occurence of a - * vertex with the same label. - */ - public static final String MERGE = "merge"; - - /** - * This datum is used by MBT when merging graphs. It tells MBT that the vertex - * containing this key word, should not merge this vertex with any subgraph. - */ - public static final String NO_MERGE = "no merge"; - - /** - * Used internally by MBT. When graphs are merged, MBT keeps track of which - * vertices have been merged by MBT. - */ - public static final String MERGED_BY_MBT = "merged by mbt"; - - /** - * Used internally by MBT. A vertex in a graph with the label START, and a - * single empty out edge is defined as the main graph (or Mother Graph) - */ - public static final String MOTHER_GRAPH_START_VERTEX = "mother graph start vertex"; - - /** - * Used internally by MBT. A vertex in a graph with the label START, and a - * single non-empty out edge is defined as a subgraph. - */ - public static final String SUBGRAPH_START_VERTEX = "subgraph start vertex"; - - /** - * A vertex or an edge with the key word BLOCKED, will not participate in the - * resulting (merged) graph, end thus be excluded. - */ - public static final String BLOCKED = "BLOCKED"; - - /** - * An edge with the key word BACKTRACK is used to enable a simple logic that - * enables a end user to backtrack in the graph to the previous vertex.
- * This is used only during a online run. - */ - public static final String BACKTRACK = "BACKTRACK"; - - /** - * This datum contains the label parameter used by an edge in EFSM models. - */ - public static final String PARAMETER_KEY = "parameter"; - - /** - * This datum contains the label guard used by an edge in EFSM models. - */ - public static final String GUARD_KEY = "guard"; - - /** - * This datum contains the actions used by an edge in EFSM models. The datum - * is a String containing the actions. - */ - public static final String ACTIONS_KEY = "action"; - - /** - * This datum contains the requirement tag which can be set in a vertex or - * edge. The datum is a String containing one or more requirement tag. - * Multiple tags are to be separated using commas. - */ - public static final String REQTAG_KEY = "reqtag"; - - /** - * Used when running multiple-models, see also {@link ModelHandler}. The - * meaning of this keyword is that if a vertex has this set, the execution of - * the model will be paused, and the execution may switch to another model - * with the same label as the vertex of the {@link Keywords#GRAPH_VERTEX - * GRAPH_VERTEX} in that other model. - */ - public static final String SWITCH_MODEL = "switch_model"; - - /** - * This datum contains the dijkstra object used to find the shortest path in - * models. - */ - public static final String DIJKSTRA = "dijkstra"; - - public static final int CONDITION_REACHED_EDGE = 1001; - - public static final int CONDITION_REACHED_VERTEX = 1002; - - public static final int CONDITION_EDGE_COVERAGE = 1003; - - public static final int CONDITION_VERTEX_COVERAGE = 1004; - - public static final int CONDITION_TEST_LENGTH = 1005; - - public static final int CONDITION_TEST_DURATION = 1006; - - public static final int CONDITION_REQUIREMENT_COVERAGE = 1007; - - public static final int CONDITION_REACHED_REQUIREMENT = 1008; - - public static final int CONDITION_NEVER = 1009; - - public static final int GENERATOR_RANDOM = 2001; - - public static final int GENERATOR_A_STAR = 2002; - - public static final int GENERATOR_LIST = 2003; - - public static final int GENERATOR_STUB = 2004; - - public static final int GENERATOR_REQUIREMENTS = 2005; - - public static final int GENERATOR_SHORTEST_NON_OPTIMIZED = 2006; - - public static final int GENERATOR_MANUAL_HTML = 2007; - - public static final int GENERATOR_ALL_PATH_PERMUTATIONS = 2008; - - /** - * Holds the pre-defined key words - */ - private static Vector reservedKeyWords = new Vector(); - - /** - * Defines the key words - */ - static { - Keywords.reservedKeyWords.add("BLOCKED"); - Keywords.reservedKeyWords.add("BACKTRACK"); - Keywords.reservedKeyWords.add("MERGE"); - Keywords.reservedKeyWords.add("NO_MERGE"); - Keywords.reservedKeyWords.add("SWITCH_MODEL"); - } - - /** - * Returns true if the wordToCheck is a pre-defined key word. - */ - public static boolean isKeyWord(final String wordToCheck) { - return Keywords.reservedKeyWords.contains(wordToCheck.toUpperCase()); - } - - public static class StopCondition { - private String name; - private String description; - private Integer id; - - private StopCondition(final String name, final String description, final Integer id) { - this.name = name; - this.description = description; - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(final String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(final String description) { - this.description = description; - } - - public Integer getId() { - return id; - } - - public void setId(final Integer id) { - this.id = id; - } - } - - /** - * Holds the pre-defined list of stop-condition. - */ - private static Vector stopConditions = new Vector(); - - /** - * Defines the stop-condition strings - */ - static { - Keywords.stopConditions.add(new StopCondition("REACHED_EDGE", "REACHED_EDGE:", Keywords.CONDITION_REACHED_EDGE)); - Keywords.stopConditions.add(new StopCondition("REACHED_VERTEX", - "REACHED_VERTEX:", Keywords.CONDITION_REACHED_VERTEX)); - Keywords.stopConditions.add(new StopCondition("EDGE_COVERAGE", "EDGE_COVERAGE:", - Keywords.CONDITION_EDGE_COVERAGE)); - Keywords.stopConditions.add(new StopCondition("VERTEX_COVERAGE", "VERTEX_COVERAGE:", - Keywords.CONDITION_VERTEX_COVERAGE)); - Keywords.stopConditions.add(new StopCondition("TEST_LENGTH", "TEST_LENGTH:", - Keywords.CONDITION_TEST_LENGTH)); - Keywords.stopConditions.add(new StopCondition("TEST_DURATION", "TEST_DURATION:

-	 * '<EDGE LABEL>', INDEX=x ('<SOURCE VERTEX LABEL>', INDEX=y -> '<DEST VERTEX LABEL>', INDEX=z)
-	 * 
- * - * Where x, y and n are the unique indexes for the edge, the source - * vertex and the destination vertex.
- * Please note that the label of an edge can be either null, or empty - * (""); - */ - private static String getCompleteEdgeName(final Edge edge) { - return "Edge: '" + edge.getLabelKey() + "', INDEX=" + edge.getIndexKey(); - } - - /** - * Retries information regarding a vertex, and returns it as a String. This - * method is for logging purposes. - * - * @param vertex - * The vertex about which information shall be retrieved. - * @return Returns a String with information regarding the vertex. The format - * is:
- * - *
-	 * '<VERTEX LABEL>', INDEX=n
-	 * 
- * - * Where is the unique index for the vertex. - */ - private static String getCompleteVertexName(final Vertex vertex) { - return "Vertex: '" + vertex.getLabelKey() + "', INDEX=" + vertex.getIndexKey(); - } - - public static void AbortIf(final boolean bool, final String message) { - if (bool) { - throw new RuntimeException(message); - } - } - - public static Logger setupLogger(@SuppressWarnings("rawtypes") final Class classParam) { - Logger logger = Logger.getLogger(classParam); - if (new File("graphwalker.properties").canRead()) { - PropertyConfigurator.configure("graphwalker.properties"); - } else { - PropertyConfigurator.configure(classParam.getResource("/graphwalker.properties")); - } - return logger; - } - - /** - * Creates an adds a vertex to a graph. - * - * @param graph - * The graph to which a vertex is to be added. - * @param strLabel - * The label of the vertex. - * @return The newly created vertex. - */ - public static Vertex addVertexToGraph(final Graph graph, final String strLabel) { - Vertex retur = new Vertex(); - retur.setIndexKey(graph.getEdgeCount() + graph.getVertexCount() + 1); - if (strLabel != null) { - retur.setLabelKey(strLabel); - } - graph.addVertex(retur); - return retur; - } - - /** - * Creates and adds an edge to a graph. - * - * @param graph - * The graph to which the edge is to be added. - * @param vertexFrom - * The source point of the edge. - * @param vertexTo - * The destination point of the edge. - * @param strLabel - * The label of the edge. - * @param strParameter - * The parameter(s) to be passed to the method implementing the edge - * in a test. - * @param strGuard - * The guard of the edge. - * @param strAction - * The action to be performed. - * @return The newly created edge. - */ - public static Edge addEdgeToGraph(final Graph graph, final Vertex vertexFrom, final Vertex vertexTo, final String strLabel, - final String strParameter, final String strGuard, final String strAction) { - Edge retur = new Edge(); - retur.setIndexKey(graph.getEdgeCount() + graph.getVertexCount() + 1); - if (strLabel != null) { - retur.setLabelKey(strLabel); - } - if (strParameter != null) { - retur.setParameterKey(strParameter); - } - if (strGuard != null) { - retur.setGuardKey(strGuard); - } - if (strAction != null) { - retur.setActionsKey(strAction); - } - graph.addEdge(retur, vertexFrom, vertexTo); - return retur; - } - - /** - * Adds a stop condition for the model. - * - * @param machine - * @param conditionType - * The condition type. - * @param conditionValue - * The value of the condition. - * @return The newly created stop condition. - * @throws StopConditionException - */ - public static StopCondition getCondition(final FiniteStateMachine machine, final int conditionType, final String conditionValue) - throws StopConditionException { - StopCondition condition = null; - try { - switch (conditionType) { - case Keywords.CONDITION_EDGE_COVERAGE: - condition = new EdgeCoverage(Double.parseDouble(conditionValue) / 100); - break; - case Keywords.CONDITION_REACHED_EDGE: - if (conditionValue == null || conditionValue.isEmpty()) { - throw new StopConditionException("The name of reached edge must not be empty"); - } - if (machine != null && machine.findEdge(Edge.getLabelAndParameter(conditionValue)[0]) == null) { - throw new StopConditionException("The name of reached edge: '" + Edge.getLabelAndParameter(conditionValue)[0] - + "' (in stop condition: '" + conditionValue + "') does not exists in the model."); - } - condition = new ReachedEdge(conditionValue); - break; - case Keywords.CONDITION_REACHED_VERTEX: - if (conditionValue == null || conditionValue.isEmpty()) { - throw new StopConditionException("The name of reached vertex must not be empty"); - } - if (machine != null && machine.getModel().findVertex(Vertex.getLabel(conditionValue)) == null) { - throw new StopConditionException("The name of reached vertex: '" + Vertex.getLabel(conditionValue) + "' (in stop condition: '" - + conditionValue + "') does not exists in the model."); - } - condition = new ReachedVertex(conditionValue); - break; - case Keywords.CONDITION_VERTEX_COVERAGE: - condition = new VertexCoverage(Double.parseDouble(conditionValue) / 100); - break; - case Keywords.CONDITION_TEST_DURATION: - condition = new TimeDuration(Long.parseLong(conditionValue)); - break; - case Keywords.CONDITION_TEST_LENGTH: - condition = new TestCaseLength(Integer.parseInt(conditionValue)); - break; - case Keywords.CONDITION_NEVER: - condition = new NeverCondition(); - break; - case Keywords.CONDITION_REQUIREMENT_COVERAGE: - condition = new RequirementCoverage(Double.parseDouble(conditionValue) / 100); - break; - case Keywords.CONDITION_REACHED_REQUIREMENT: - condition = new ReachedRequirement(conditionValue); - break; - default: - throw new StopConditionException("Unsupported stop condition selected"); - } - } catch (NumberFormatException e) { - if (conditionValue == null || conditionValue.isEmpty()) { - throw new StopConditionException("Stop condition value is missing. "); - } else { - throw new StopConditionException("Invalid stop condition value: " + conditionValue); - } - } - return condition; - } - - public static PathGenerator getGenerator(final int generatorType) throws GeneratorException { - PathGenerator generator = null; - - switch (generatorType) { - case Keywords.GENERATOR_RANDOM: - generator = new RandomPathGenerator(); - break; - - case Keywords.GENERATOR_ALL_PATH_PERMUTATIONS: - generator = new AllPathPermutationsGenerator(); - break; - - case Keywords.GENERATOR_A_STAR: - generator = new A_StarPathGenerator(); - break; - - case Keywords.GENERATOR_STUB: - generator = new CodeGenerator(); - break; - - case Keywords.GENERATOR_LIST: - generator = new ListGenerator(); - break; - - case Keywords.GENERATOR_REQUIREMENTS: - generator = new RequirementsGenerator(); - break; - - case Keywords.GENERATOR_SHORTEST_NON_OPTIMIZED: - generator = new NonOptimizedShortestPath(); - break; - - default: - throw new GeneratorException("Unsupported generator selected."); - } - - Util.logger.debug("Added generator: " + generator + " " + generatorType); - - return generator; - } - - public Util() { - super(); - // TODO Auto-generated constructor stub - } - - /** - * Load MBT settings from a xml file - * - * @param file - * @return - * @throws StopConditionException - * @throws GeneratorException - * @throws IOException - * @throws JDOMException - * @throws InterruptedException - */ - public static ModelBasedTesting loadMbtAsWSFromXml(final File file) throws StopConditionException, GeneratorException, IOException, - JDOMException, InterruptedException { - return loadXml(file, true, false, false); - } - - /** - * Load MBT settings from a xml file - * - * @param file - * @param dryRun - * Is mbt to be run in a dry run mode? - * @return - * @throws StopConditionException - * @throws GeneratorException - * @throws IOException - * @throws JDOMException - * @throws InterruptedException - */ - public static ModelBasedTesting loadMbtFromXml(final File file, final boolean dryRun) throws StopConditionException, - GeneratorException, IOException, JDOMException, InterruptedException { - return loadXml(file, false, dryRun, false); - } - - /** - * Load MBT settings from a xml file - * - * @param file - * The XML settings file - * @return - * @throws StopConditionException - * @throws GeneratorException - * @throws IOException - * @throws JDOMException - * @throws InterruptedException - */ - public static ModelBasedTesting loadMbtFromXml(final File file) throws StopConditionException, GeneratorException, IOException, - JDOMException, InterruptedException { - return loadXml(file, false, false, false); - } - - /** - * Creates a new instance of MBT and loads the settings from a xml file - * - * @param file - * The XML settings file - * @return - * @throws StopConditionException - * @throws GeneratorException - * @throws IOException - * @throws JDOMException - * @throws InterruptedException - */ - public static ModelBasedTesting getNewMbtFromXml(final File file) throws StopConditionException, GeneratorException, IOException, - JDOMException, InterruptedException { - return loadXml(file, false, false, true); - } - - /** - * Load MBT settings from a xml file - * - * @param file - * The XML settings file - * @return - * @throws StopConditionException - * @throws GeneratorException - * @throws IOException - * @throws JDOMException - * @throws InterruptedException - */ - public ModelBasedTesting loadMbtFromXmlNonStatic(final File file) throws StopConditionException, GeneratorException, IOException, - JDOMException, InterruptedException { - return loadXmlNonStatic(file, false, false); - } - - /** - * Load MBT settings from a xml file - * - * @param file - * The XML settings file - * @param runningSoapServices - * Is mbt to run in Web Services mode? - * @param dryRun - * Is mbt to be run in a dry run mode? - * @param generateNewModel - * @return - * @throws StopConditionException - * @throws GeneratorException - * @throws IOException - * @throws JDOMException - * @throws InterruptedException - */ - @SuppressWarnings("unchecked") - private static ModelBasedTesting loadXml(final File file, final boolean runningSoapServices, final boolean dryRun, - final boolean generateNewModel) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { - - final ModelBasedTesting mbt = new ModelBasedTesting(); - mbt.setDryRun(dryRun); - - SAXBuilder parser = new SAXBuilder(); - Document doc; - doc = parser.build(file); - Element root = doc.getRootElement(); - List models = root.getChildren("MODEL"); - - if (models.size() == 0) { - throw new RuntimeException("Model is missing from XML"); - } - - for (Element element : models) { - mbt.readGraph((element).getAttributeValue("PATH")); - } - - List classPath = root.getChildren("CLASS"); - for (Element element : classPath) { - String classPaths[] = element.getAttributeValue("PATH").split(":"); - for (String classPath2 : classPaths) { - try { - ClassPathHack.addFile(getFile(classPath2)); - Util.logger.debug("Added to classpath: " + classPath2); - } catch (Exception e) { - throw new RuntimeException(e.getMessage() + "\nCould not add: '" + classPath2 + "' to CLASSPATH\n" - + "Please review your xml file: '" + file + "' at CLASS PATH", e); - } - } - } - - if (root.getAttributeValue("SCRIPT_ENGINE") != null && root.getAttributeValue("SCRIPT_ENGINE").equalsIgnoreCase("js")) { - Util.logger.debug("Enabling JavaScript engine"); - mbt.enableJsScriptEngine(true); - } else { - Util.logger.debug("Using BeanShell script engine, if EFSM is enabled."); - mbt.enableJsScriptEngine(false); - } - - if (root.getAttributeValue("EXTENDED") != null && root.getAttributeValue("EXTENDED").equalsIgnoreCase("true")) { - Util.logger.debug("Enabling extended FSM"); - mbt.enableExtended(true); - mbt.setStartupScript(getScriptContent(root.getChildren("SCRIPT"))); - } else { - Util.logger.debug("Disabling extended FSM"); - mbt.enableExtended(false); - } - - if (root.getAttributeValue("WEIGHT") != null && root.getAttributeValue("WEIGHT").equalsIgnoreCase("true")) { - Util.logger.debug("Using weighted edges"); - mbt.setWeighted(true); - } else { - Util.logger.debug("Will not use weighted edges"); - mbt.setWeighted(false); - } - - List generators = root.getChildren("GENERATOR"); - - if (generators.size() == 0) { - throw new RuntimeException("Generator is missing from XML"); - } - - PathGenerator generator; - if (generators.size() > 1) { - generator = new CombinedPathGenerator(); - for (Element element : generators) { - ((CombinedPathGenerator) generator).addPathGenerator(getGenerator(mbt.getMachine(), element)); - } - } else { - generator = getGenerator(mbt.getMachine(), generators.get(0)); - } - if (generator == null) { - throw new RuntimeException("Failed to set generator"); - } - mbt.setGenerator(generator); - mbt.populateMachineRequirementHashTable(); - final String reportName = root.getAttributeValue("REPORT"); - String reportTemplate = root.getAttributeValue("REPORT-TEMPLATE"); - - if (reportName != null && reportTemplate != null) { - Util.logger.debug("Will use report template: " + reportTemplate); - mbt.getStatisticsManager().setReportTemplate(new FileInputStream(new File(reportTemplate))); - } - - String logInterval = root.getAttributeValue("LOG-INTERVAL"); - - if (logInterval != null) { - long seconds = Integer.valueOf(logInterval).longValue(); - TimerTask logTask; - if (reportName != null && reportTemplate != null) { - logTask = new TimerTask() { - @Override - public void run() { - try { - mbt.getStatisticsManager().writeFullReport(new PrintStream(reportName)); - } catch (FileNotFoundException e) { - throw new RuntimeException("Could not open or write report file '" + reportName + "'", e); - } - } - }; - } else { - logTask = new TimerTask() { - @Override - public void run() { - Util.logger.info(mbt.getStatisticsCompact()); - } - }; - } - Util.timer = new Timer(); - Util.timer.schedule(logTask, 500, seconds * 1000); - } - - if (!runningSoapServices) { - try { - - String executor = root.getAttributeValue("EXECUTOR"); - Util.logger.debug("Executor is: " + executor); - String executorParam = null; - if (executor.contains(":")) { - executorParam = executor.substring(executor.indexOf(':') + 1); - executor = executor.substring(0, executor.indexOf(':')); - } - - if (executor.equalsIgnoreCase("offline")) { - PrintStream out = System.out; - if (executorParam != null && !executorParam.equals("")) { - try { - out = new PrintStream(executorParam); - } catch (FileNotFoundException e) { - throw new RuntimeException("file '" + executorParam + "' could not be created or is writeprotected.", e); - } - } - if (!mbt.isUseGUI()) { - mbt.writePath(out); - if (out != System.out) { - out.close(); - } - } - } else if (executor.equalsIgnoreCase("manual")) { - PrintStream out = System.out; - if (executorParam != null && !executorParam.equals("")) { - try { - out = new PrintStream(executorParam); - } catch (FileNotFoundException e) { - throw new RuntimeException("file '" + executorParam + "' could not be created or is writeprotected.", e); - } - } - if (!mbt.isUseGUI()) { - Vector testSequence = new Vector(); - mbt.writePath(testSequence); - - new PrintHTMLTestSequence(testSequence, out); - if (out != System.out) { - out.close(); - } - } - } else if (executor.equalsIgnoreCase("java")) { - if (executorParam == null || executorParam.equals("")) { - throw new RuntimeException("No java class specified for execution"); - } - - if (!mbt.isUseGUI()) { - mbt.executePath(executorParam); - } else { - mbt.setJavaExecutorClass(executorParam); - } - } else if (executor.equalsIgnoreCase("online")) { - if (mbt.isDryRun()) { - Util.logger.debug("Executing a dry run"); - mbt.executePath(null, null); - } - if (!mbt.isUseGUI()) { - mbt.interractivePath(); - } - - } else if (executor.equalsIgnoreCase("none") || executor.equals("")) { - // no execution (for debug purpose) - } else { - throw new RuntimeException("Unknown executor '" + executor + "'"); - } - - } finally { - if (Util.timer != null) { - Util.timer.cancel(); - } - if (reportName != null && reportTemplate != null && !mbt.isUseGUI()) { - mbt.getStatisticsManager().writeFullReport(reportName); - } - } - } - return mbt; - } - - @SuppressWarnings("unchecked") - private ModelBasedTesting loadXmlNonStatic(final File file, final boolean runningSoapServices, final boolean dryRun) - throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { - final ModelBasedTesting mbt = new ModelBasedTesting(); - mbt.setDryRun(dryRun); - - SAXBuilder parser = new SAXBuilder(); - Document doc; - doc = parser.build(file); - Element root = doc.getRootElement(); - List models = root.getChildren("MODEL"); - - if (models.size() == 0) { - throw new RuntimeException("Model is missing from XML"); - } - - for (Element element : models) { - mbt.readGraph((element).getAttributeValue("PATH")); - } - - List classPath = root.getChildren("CLASS"); - for (Element element : classPath) { - String classPaths[] = element.getAttributeValue("PATH").split(":"); - for (String classPath2 : classPaths) { - try { - ClassPathHack.addFile(getFile(classPath2)); - Util.logger.debug("Added to classpath: " + classPath2); - } catch (Exception e) { - throw new RuntimeException(e.getMessage() + "\nCould not add: '" + classPath2 + "' to CLASSPATH\n" - + "Please review your xml file: '" + file + "' at CLASS PATH", e); - } - } - } - - if (root.getAttributeValue("SCRIPT_ENGINE") != null && root.getAttributeValue("SCRIPT_ENGINE").equalsIgnoreCase("js")) { - Util.logger.debug("Enabling JavaScript engine"); - mbt.enableJsScriptEngine(true); - } else { - Util.logger.debug("Using BeanShell script engine, if EFSM is enabled."); - mbt.enableJsScriptEngine(false); - } - - if (root.getAttributeValue("EXTENDED") != null && root.getAttributeValue("EXTENDED").equalsIgnoreCase("true")) { - Util.logger.debug("Enabling extended FSM"); - mbt.enableExtended(true); - mbt.setStartupScript(getScriptContent(root.getChildren("SCRIPT"))); - } else { - Util.logger.debug("Disabling extended FSM"); - mbt.enableExtended(false); - } - - if (root.getAttributeValue("WEIGHT") != null && root.getAttributeValue("WEIGHT").equalsIgnoreCase("true")) { - Util.logger.debug("Using weighted edges"); - mbt.setWeighted(true); - } else { - Util.logger.debug("Will not use weighted edges"); - mbt.setWeighted(false); - } - - List generators = root.getChildren("GENERATOR"); - - if (generators.size() == 0) { - throw new RuntimeException("Generator is missing from XML"); - } - - PathGenerator generator; - if (generators.size() > 1) { - generator = new CombinedPathGenerator(); - for (Element element : generators) { - ((CombinedPathGenerator) generator).addPathGenerator(getGenerator(mbt.getMachine(), element)); - } - } else { - generator = getGenerator(mbt.getMachine(), generators.get(0)); - } - if (generator == null) { - throw new RuntimeException("Failed to set generator"); - } - mbt.setGenerator(generator); - - final String reportName = root.getAttributeValue("REPORT"); - String reportTemplate = root.getAttributeValue("REPORT-TEMPLATE"); - - if (reportName != null && reportTemplate != null) { - Util.logger.debug("Will use report template: " + reportTemplate); - mbt.getStatisticsManager().setReportTemplate(new FileInputStream(new File(reportTemplate))); - } - - String logInterval = root.getAttributeValue("LOG-INTERVAL"); - - if (logInterval != null) { - long seconds = Integer.valueOf(logInterval).longValue(); - TimerTask logTask; - if (reportName != null && reportTemplate != null) { - logTask = new TimerTask() { - @Override - public void run() { - try { - mbt.getStatisticsManager().writeFullReport(new PrintStream(reportName)); - } catch (FileNotFoundException e) { - throw new RuntimeException("Could not open or write report file '" + reportName + "'", e); - } - } - }; - } else { - logTask = new TimerTask() { - @Override - public void run() { - Util.logger.info(mbt.getStatisticsCompact()); - } - }; - } - Util.timer = new Timer(); - Util.timer.schedule(logTask, 500, seconds * 1000); - } - - if (!runningSoapServices) { - try { - - String executor = root.getAttributeValue("EXECUTOR"); - Util.logger.debug("Executor is: " + executor); - String executorParam = null; - if (executor.contains(":")) { - executorParam = executor.substring(executor.indexOf(':') + 1); - executor = executor.substring(0, executor.indexOf(':')); - } - - if (executor.equalsIgnoreCase("offline")) { - PrintStream out = System.out; - if (executorParam != null && !executorParam.equals("")) { - try { - out = new PrintStream(executorParam); - } catch (FileNotFoundException e) { - throw new RuntimeException("file '" + executorParam + "' could not be created or is writeprotected.", e); - } - } - if (!mbt.isUseGUI()) { - mbt.writePath(out); - if (out != System.out) { - out.close(); - } - } - } else if (executor.equalsIgnoreCase("manual")) { - PrintStream out = System.out; - if (executorParam != null && !executorParam.equals("")) { - try { - out = new PrintStream(executorParam); - } catch (FileNotFoundException e) { - throw new RuntimeException("file '" + executorParam + "' could not be created or is writeprotected.", e); - } - } - if (!mbt.isUseGUI()) { - Vector testSequence = new Vector(); - mbt.writePath(testSequence); - - new PrintHTMLTestSequence(testSequence, out); - if (out != System.out) { - out.close(); - } - } - } else if (executor.equalsIgnoreCase("java")) { - if (executorParam == null || executorParam.equals("")) { - throw new RuntimeException("No java class specified for execution"); - } - - if (!mbt.isUseGUI()) { - mbt.executePath(executorParam); - } else { - mbt.setJavaExecutorClass(executorParam); - } - } else if (executor.equalsIgnoreCase("online")) { - if (mbt.isDryRun()) { - Util.logger.debug("Executing a dry run"); - mbt.executePath(null, null); - } - if (!mbt.isUseGUI()) { - mbt.interractivePath(); - } - - // } else if (executor.equalsIgnoreCase("none") || - // executor.equals("")) { - // no execution (for debug purpose) - } else { - throw new RuntimeException("Unknown executor '" + executor + "'"); - } - - } finally { - if (Util.timer != null) { - Util.timer.cancel(); - } - if (reportName != null && reportTemplate != null && !mbt.isUseGUI()) { - mbt.getStatisticsManager().writeFullReport(reportName); - } - } - } - return mbt; - } - - private static String getScriptContent(final List scripts) throws IOException { - StringBuilder stringBuilder = new StringBuilder(); - for (Element element : scripts) { - String internal = element.getTextTrim(); - if (internal != null && !internal.equals("")) { - stringBuilder.append(internal); - stringBuilder.append(System.getProperty("line.separator")); - } - String external = element.getAttributeValue("PATH"); - if (external != null && !external.equals("")) { - stringBuilder.append(readFile(Util.getFile(external))); - stringBuilder.append(System.getProperty("line.separator")); - } - } - return stringBuilder.toString(); - } - - @SuppressWarnings("unchecked") - private static PathGenerator getGenerator(final FiniteStateMachine machine, final Element generator) throws StopConditionException, - GeneratorException, IOException { - int generatorType = Keywords.getGenerator(generator.getAttributeValue("TYPE")); - PathGenerator generatorObject = getGenerator(generatorType); - if (generatorObject instanceof CodeGenerator) { - String[] template = { "", "", "" }; - String templateFile = generator.getAttributeValue("VALUE"); - if (templateFile != null) { - template[1] = readFile(Util.getFile(templateFile.trim())); - } else { - Element templateElement = generator.getChild("TEMPLATE"); - if (templateElement != null) { - template[0] = templateElement.getChildTextTrim("HEADER"); - template[1] = templateElement.getChildTextTrim("BODY"); - template[2] = templateElement.getChildTextTrim("FOOTER"); - } else { - throw new RuntimeException("No Template is specified for the stub generator."); - } - } - ((CodeGenerator) generatorObject).setTemplate(template); - } else { - StopCondition stopCondition = getCondition(machine, generator.getChildren()); - if (stopCondition != null) { - generatorObject.setStopCondition(stopCondition); - } - } - return generatorObject; - } - - private static StopCondition getCondition(final FiniteStateMachine machine, final List conditions) throws StopConditionException { - StopCondition condition = null; - if (conditions.size() > 1) { - condition = new CombinationalCondition(); - for (Element element : conditions) { - ((CombinationalCondition) condition).add(getCondition(machine, element)); - } - } else if (conditions.size() == 1) { - condition = getCondition(machine, conditions.get(0)); - } - return condition; - } - - @SuppressWarnings("unchecked") - private static StopCondition getCondition(final FiniteStateMachine machine, final Element condition) throws StopConditionException { - StopCondition stopCondition = null; - if (condition.getName().equalsIgnoreCase("AND")) { - stopCondition = new CombinationalCondition(); - for (Element element : (Iterable) condition.getChildren()) { - ((CombinationalCondition) stopCondition).add(getCondition(machine, element)); - } - } else if (condition.getName().equalsIgnoreCase("OR")) { - stopCondition = new AlternativeCondition(); - for (Element element : (Iterable) condition.getChildren()) { - ((AlternativeCondition) stopCondition).add(getCondition(machine, element)); - } - } else if (condition.getName().equalsIgnoreCase("CONDITION")) { - int type = Keywords.getStopCondition(condition.getAttributeValue("TYPE")); - String value = condition.getAttributeValue("VALUE"); - stopCondition = getCondition(machine, type, value); - } - return stopCondition; - } - - public static String readFile(final File file) throws IOException { - StringBuilder stringBuilder = new StringBuilder(); - FileReader reader = null; - try { - reader = new FileReader(file); - BufferedReader bufferedReader = new BufferedReader(reader); - while (bufferedReader.ready()) { - stringBuilder.append(bufferedReader.readLine()); - stringBuilder.append(System.getProperty("line.separator")); - } - bufferedReader.close(); - } catch (IOException e) { - throw e; // TODO: remove the IOE from method signature and throw a new - // exception extending runtime - } finally { - closeQuietly(reader); - } - return stringBuilder.toString(); - } - - public static char getInput() { - char c = 0; - try { - while (c != '0' && c != '1' && c != '2') { - int tmp = System.in.read(); - c = (char) tmp; - } - } catch (IOException e) { - // - } - return c; - } - - /** - * This functions shuffle the array, and returns the shuffled array - * - * @param array - * @return - */ - public static Object[] shuffle(final Object[] array) { - for (int i = 0; i < array.length; i++) { - Object leftObject = array[i]; - int index = Util.random.nextInt(array.length); - Object rightObject = array[index]; - - array[i] = rightObject; - array[index] = leftObject; - } - return array; - } - - public static InetAddress getInternetAddr(final String nic) { - // Find the real network interface - NetworkInterface iface = null; - InetAddress ia = null; - boolean foundNIC = false; - try { - for (Enumeration ifaces = NetworkInterface.getNetworkInterfaces(); ifaces.hasMoreElements() && foundNIC == false;) { - iface = ifaces.nextElement(); - Util.logger.debug("Interface: " + iface.getDisplayName()); - for (Enumeration ips = iface.getInetAddresses(); ips.hasMoreElements() && foundNIC == false;) { - ia = ips.nextElement(); - Util.logger.debug(ia.getCanonicalHostName() + " " + ia.getHostAddress()); - if (!ia.isLoopbackAddress()) { - Util.logger.debug(" Not a loopback address..."); - if (!ia.getHostAddress().contains(":") && nic.equals(iface.getDisplayName())) { - Util.logger.debug(" Host address does not contain ':'"); - Util.logger.debug(" Interface: " + iface.getName() + " seems to be InternetInterface. I'll take it..."); - foundNIC = true; - } - } - } - } - } catch (SocketException e) { - Util.logger.error(e.getMessage()); - } finally { - if (!foundNIC && nic != null) { - Util.logger.error("Could not bind to network interface: " + nic); - throw new RuntimeException("Could not bind to network interface: " + nic); - } else if (!foundNIC) { - Util.logger.error("Could not bind to any network interface"); - throw new RuntimeException("Could not bind to any network interface: "); - } - } - return ia; - } - - public static String readWSPort() { - PropertiesConfiguration conf = null; - if (new File("graphwalker.properties").canRead()) { - try { - conf = new PropertiesConfiguration("graphwalker.properties"); - } catch (ConfigurationException e) { - Util.logger.error(e.getMessage()); - } - } else { - conf = new PropertiesConfiguration(); - try { - conf.load(Util.class.getResourceAsStream("/graphwalker.properties")); - } catch (ConfigurationException e) { - Util.logger.error(e.getMessage()); - } - } - String port = conf.getString("graphwalker.ws.port"); - Util.logger.debug("Read graphwalker.ws.port from graphwalker.properties: " + port); - if (port == null) { - port = "9090"; - Util.logger.debug("Setting port to: 9090"); - } - return port; - } - - public static Boolean readSoapGuiStartupState() { - PropertiesConfiguration conf = null; - if (new File("graphwalker.properties").canRead()) { - try { - conf = new PropertiesConfiguration("graphwalker.properties"); - } catch (ConfigurationException e) { - Util.logger.error(e.getMessage()); - } - } else { - conf = new PropertiesConfiguration(); - try { - conf.load(Util.class.getResourceAsStream("/graphwalker.properties")); - } catch (ConfigurationException e) { - Util.logger.error(e.getMessage()); - } - } - Boolean soapGuiState = false; - try { - soapGuiState = conf.getBoolean("org.graphwalker.GUI.startSOAP"); - } catch (NoSuchElementException e) { - Util.logger.debug("org.graphwalker.GUI.startSOAP not found in graphwalker.properties"); - soapGuiState = false; - } - Util.logger.debug("Read org.graphwalker.GUI.startSOAP from graphwalker.properties: " + soapGuiState); - return soapGuiState; - } - - public static void logStackTraceToError(final Exception e) { - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - e.printStackTrace(pw); - pw.close(); - Util.logger.error(sw.toString()); - } - - public static void logStackTraceToError(final Throwable t) { - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - t.printStackTrace(pw); - pw.close(); - Util.logger.error(sw.toString()); - } - - public static File getFile(final String resourceName) { - Util.logger.debug("Try to get file: " + resourceName); - File file = new File(resourceName); - if (file.exists()) { - Util.logger.debug("File exists on file system."); - return file; - } - ClassLoader cloader = Thread.currentThread().getContextClassLoader(); - Util.logger.debug("Class loader class name: " + cloader.getClass().getName()); - URL resource = cloader.getResource(resourceName); - - if (resource == null) { - throw new IllegalArgumentException("Could not get resource: " + resourceName); - } - - return new File(resource.getPath()); - } - - public static void closeQuietly(Reader reader) { - if (null != reader) { - try { - reader.close(); - } catch (Exception e) { - // ignore all exceptions - } - } - } - - public static void closeQuietly(InputStream inputStream) { - if (null != inputStream) { - try { - inputStream.close(); - } catch (Exception e) { - // ignore all exceptions - } - } - } + private static Logger logger = setupLogger(Util.class); + static private Random random = new Random(); + public static String newline = System.getProperty("line.separator"); + static private Timer timer = null; + + public static String getCompleteName(final AbstractElement element) { + if (element instanceof Edge) { + return getCompleteEdgeName((Edge) element); + } + if (element instanceof Vertex) { + return getCompleteVertexName((Vertex) element); + } + throw new RuntimeException("Element type not supported: '" + element.getClass().getName() + "'"); + } + + /** + * Retries information regarding an edge, and returns it as a String. This + * method is for logging purposes. + * + * @param edge The edge about which information shall be retrieved. + * @return Returns a String with information regarding the edge, including the + * source and destination vertices. The format is:
+ *

+ *

+     *         '<EDGE LABEL>', INDEX=x ('<SOURCE VERTEX LABEL>', INDEX=y -> '<DEST VERTEX LABEL>', INDEX=z)
+     *         
+ *

+ * Where x, y and n are the unique indexes for the edge, the source + * vertex and the destination vertex.
+ * Please note that the label of an edge can be either null, or empty + * (""); + */ + private static String getCompleteEdgeName(final Edge edge) { + return "Edge: '" + edge.getLabelKey() + "', INDEX=" + edge.getIndexKey(); + } + + /** + * Retries information regarding a vertex, and returns it as a String. This + * method is for logging purposes. + * + * @param vertex The vertex about which information shall be retrieved. + * @return Returns a String with information regarding the vertex. The format + * is:
+ *

+ *

+     *         '<VERTEX LABEL>', INDEX=n
+     *         
+ *

+ * Where is the unique index for the vertex. + */ + private static String getCompleteVertexName(final Vertex vertex) { + return "Vertex: '" + vertex.getLabelKey() + "', INDEX=" + vertex.getIndexKey(); + } + + public static void AbortIf(final boolean bool, final String message) { + if (bool) { + throw new RuntimeException(message); + } + } + + public static Logger setupLogger(@SuppressWarnings("rawtypes") final Class classParam) { + Logger logger = Logger.getLogger(classParam); + if (new File("graphwalker.properties").canRead()) { + PropertyConfigurator.configure("graphwalker.properties"); + } else { + PropertyConfigurator.configure(classParam.getResource("/graphwalker.properties")); + } + return logger; + } + + /** + * Creates an adds a vertex to a graph. + * + * @param graph The graph to which a vertex is to be added. + * @param strLabel The label of the vertex. + * @return The newly created vertex. + */ + public static Vertex addVertexToGraph(final Graph graph, final String strLabel) { + Vertex retur = new Vertex(); + retur.setIndexKey(graph.getEdgeCount() + graph.getVertexCount() + 1); + if (strLabel != null) { + retur.setLabelKey(strLabel); + } + graph.addVertex(retur); + return retur; + } + + /** + * Creates and adds an edge to a graph. + * + * @param graph The graph to which the edge is to be added. + * @param vertexFrom The source point of the edge. + * @param vertexTo The destination point of the edge. + * @param strLabel The label of the edge. + * @param strParameter The parameter(s) to be passed to the method implementing the edge + * in a test. + * @param strGuard The guard of the edge. + * @param strAction The action to be performed. + * @return The newly created edge. + */ + public static Edge addEdgeToGraph(final Graph graph, final Vertex vertexFrom, final Vertex vertexTo, final String strLabel, + final String strParameter, final String strGuard, final String strAction) { + Edge retur = new Edge(); + retur.setIndexKey(graph.getEdgeCount() + graph.getVertexCount() + 1); + if (strLabel != null) { + retur.setLabelKey(strLabel); + } + if (strParameter != null) { + retur.setParameterKey(strParameter); + } + if (strGuard != null) { + retur.setGuardKey(strGuard); + } + if (strAction != null) { + retur.setActionsKey(strAction); + } + graph.addEdge(retur, vertexFrom, vertexTo); + return retur; + } + + /** + * Adds a stop condition for the model. + * + * @param machine + * @param conditionType The condition type. + * @param conditionValue The value of the condition. + * @return The newly created stop condition. + * @throws StopConditionException + */ + public static StopCondition getCondition(final FiniteStateMachine machine, final int conditionType, final String conditionValue) + throws StopConditionException { + StopCondition condition = null; + try { + switch (conditionType) { + case Keywords.CONDITION_EDGE_COVERAGE: + condition = new EdgeCoverage(Double.parseDouble(conditionValue) / 100); + break; + case Keywords.CONDITION_REACHED_EDGE: + if (conditionValue == null || conditionValue.isEmpty()) { + throw new StopConditionException("The name of reached edge must not be empty"); + } + if (machine != null && machine.findEdge(Edge.getLabelAndParameter(conditionValue)[0]) == null) { + throw new StopConditionException("The name of reached edge: '" + Edge.getLabelAndParameter(conditionValue)[0] + + "' (in stop condition: '" + conditionValue + "') does not exists in the model."); + } + condition = new ReachedEdge(conditionValue); + break; + case Keywords.CONDITION_REACHED_VERTEX: + if (conditionValue == null || conditionValue.isEmpty()) { + throw new StopConditionException("The name of reached vertex must not be empty"); + } + if (machine != null && machine.getModel().findVertex(Vertex.getLabel(conditionValue)) == null) { + throw new StopConditionException("The name of reached vertex: '" + Vertex.getLabel(conditionValue) + "' (in stop condition: '" + + conditionValue + "') does not exists in the model."); + } + condition = new ReachedVertex(conditionValue); + break; + case Keywords.CONDITION_VERTEX_COVERAGE: + condition = new VertexCoverage(Double.parseDouble(conditionValue) / 100); + break; + case Keywords.CONDITION_TEST_DURATION: + condition = new TimeDuration(Long.parseLong(conditionValue)); + break; + case Keywords.CONDITION_TEST_LENGTH: + condition = new TestCaseLength(Integer.parseInt(conditionValue)); + break; + case Keywords.CONDITION_NEVER: + condition = new NeverCondition(); + break; + case Keywords.CONDITION_REQUIREMENT_COVERAGE: + condition = new RequirementCoverage(Double.parseDouble(conditionValue) / 100); + break; + case Keywords.CONDITION_REACHED_REQUIREMENT: + condition = new ReachedRequirement(conditionValue); + break; + default: + throw new StopConditionException("Unsupported stop condition selected"); + } + } catch (NumberFormatException e) { + if (conditionValue == null || conditionValue.isEmpty()) { + throw new StopConditionException("Stop condition value is missing. "); + } else { + throw new StopConditionException("Invalid stop condition value: " + conditionValue); + } + } + return condition; + } + + public static PathGenerator getGenerator(final int generatorType) throws GeneratorException { + PathGenerator generator = null; + + switch (generatorType) { + case Keywords.GENERATOR_RANDOM: + generator = new RandomPathGenerator(); + break; + + case Keywords.GENERATOR_ALL_PATH_PERMUTATIONS: + generator = new AllPathPermutationsGenerator(); + break; + + case Keywords.GENERATOR_A_STAR: + generator = new A_StarPathGenerator(); + break; + + case Keywords.GENERATOR_STUB: + generator = new CodeGenerator(); + break; + + case Keywords.GENERATOR_LIST: + generator = new ListGenerator(); + break; + + case Keywords.GENERATOR_REQUIREMENTS: + generator = new RequirementsGenerator(); + break; + + case Keywords.GENERATOR_SHORTEST_NON_OPTIMIZED: + generator = new NonOptimizedShortestPath(); + break; + + default: + throw new GeneratorException("Unsupported generator selected."); + } + + Util.logger.debug("Added generator: " + generator + " " + generatorType); + + return generator; + } + + public Util() { + super(); + // TODO Auto-generated constructor stub + } + + /** + * Load MBT settings from a xml file + * + * @param file + * @return + * @throws StopConditionException + * @throws GeneratorException + * @throws IOException + * @throws JDOMException + * @throws InterruptedException + */ + public static ModelBasedTesting loadMbtAsWSFromXml(final File file) throws StopConditionException, GeneratorException, IOException, + JDOMException, InterruptedException { + return loadXml(file, true, false, false); + } + + /** + * Load MBT settings from a xml file + * + * @param file + * @param dryRun Is mbt to be run in a dry run mode? + * @return + * @throws StopConditionException + * @throws GeneratorException + * @throws IOException + * @throws JDOMException + * @throws InterruptedException + */ + public static ModelBasedTesting loadMbtFromXml(final File file, final boolean dryRun) throws StopConditionException, + GeneratorException, IOException, JDOMException, InterruptedException { + return loadXml(file, false, dryRun, false); + } + + /** + * Load MBT settings from a xml file + * + * @param file The XML settings file + * @return + * @throws StopConditionException + * @throws GeneratorException + * @throws IOException + * @throws JDOMException + * @throws InterruptedException + */ + public static ModelBasedTesting loadMbtFromXml(final File file) throws StopConditionException, GeneratorException, IOException, + JDOMException, InterruptedException { + return loadXml(file, false, false, false); + } + + /** + * Creates a new instance of MBT and loads the settings from a xml file + * + * @param file The XML settings file + * @return + * @throws StopConditionException + * @throws GeneratorException + * @throws IOException + * @throws JDOMException + * @throws InterruptedException + */ + public static ModelBasedTesting getNewMbtFromXml(final File file) throws StopConditionException, GeneratorException, IOException, + JDOMException, InterruptedException { + return loadXml(file, false, false, true); + } + + /** + * Load MBT settings from a xml file + * + * @param file The XML settings file + * @return + * @throws StopConditionException + * @throws GeneratorException + * @throws IOException + * @throws JDOMException + * @throws InterruptedException + */ + public ModelBasedTesting loadMbtFromXmlNonStatic(final File file) throws StopConditionException, GeneratorException, IOException, + JDOMException, InterruptedException { + return loadXmlNonStatic(file, false, false); + } + + /** + * Load MBT settings from a xml file + * + * @param file The XML settings file + * @param runningSoapServices Is mbt to run in Web Services mode? + * @param dryRun Is mbt to be run in a dry run mode? + * @param generateNewModel + * @return + * @throws StopConditionException + * @throws GeneratorException + * @throws IOException + * @throws JDOMException + * @throws InterruptedException + */ + @SuppressWarnings("unchecked") + private static ModelBasedTesting loadXml(final File file, final boolean runningSoapServices, final boolean dryRun, + final boolean generateNewModel) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + + final ModelBasedTesting mbt = new ModelBasedTesting(); + mbt.setDryRun(dryRun); + + SAXBuilder parser = new SAXBuilder(); + Document doc; + doc = parser.build(file); + Element root = doc.getRootElement(); + List models = root.getChildren("MODEL"); + + if (models.size() == 0) { + throw new RuntimeException("Model is missing from XML"); + } + + for (Element element : models) { + mbt.readGraph((element).getAttributeValue("PATH")); + } + + List classPath = root.getChildren("CLASS"); + for (Element element : classPath) { + String classPaths[] = element.getAttributeValue("PATH").split(":"); + for (String classPath2 : classPaths) { + try { + ClassPathHack.addFile(getFile(classPath2)); + Util.logger.debug("Added to classpath: " + classPath2); + } catch (Exception e) { + throw new RuntimeException(e.getMessage() + "\nCould not add: '" + classPath2 + "' to CLASSPATH\n" + + "Please review your xml file: '" + file + "' at CLASS PATH", e); + } + } + } + + if (root.getAttributeValue("SCRIPT_ENGINE") != null && root.getAttributeValue("SCRIPT_ENGINE").equalsIgnoreCase("js")) { + Util.logger.debug("Enabling JavaScript engine"); + mbt.enableJsScriptEngine(true); + } else { + Util.logger.debug("Using BeanShell script engine, if EFSM is enabled."); + mbt.enableJsScriptEngine(false); + } + + if (root.getAttributeValue("EXTENDED") != null && root.getAttributeValue("EXTENDED").equalsIgnoreCase("true")) { + Util.logger.debug("Enabling extended FSM"); + mbt.enableExtended(true); + mbt.setStartupScript(getScriptContent(root.getChildren("SCRIPT"))); + } else { + Util.logger.debug("Disabling extended FSM"); + mbt.enableExtended(false); + } + + if (root.getAttributeValue("WEIGHT") != null && root.getAttributeValue("WEIGHT").equalsIgnoreCase("true")) { + Util.logger.debug("Using weighted edges"); + mbt.setWeighted(true); + } else { + Util.logger.debug("Will not use weighted edges"); + mbt.setWeighted(false); + } + + List generators = root.getChildren("GENERATOR"); + + if (generators.size() == 0) { + throw new RuntimeException("Generator is missing from XML"); + } + + PathGenerator generator; + if (generators.size() > 1) { + generator = new CombinedPathGenerator(); + for (Element element : generators) { + ((CombinedPathGenerator) generator).addPathGenerator(getGenerator(mbt.getMachine(), element)); + } + } else { + generator = getGenerator(mbt.getMachine(), generators.get(0)); + } + if (generator == null) { + throw new RuntimeException("Failed to set generator"); + } + mbt.setGenerator(generator); + mbt.populateMachineRequirementHashTable(); + final String reportName = root.getAttributeValue("REPORT"); + String reportTemplate = root.getAttributeValue("REPORT-TEMPLATE"); + + if (reportName != null && reportTemplate != null) { + Util.logger.debug("Will use report template: " + reportTemplate); + mbt.getStatisticsManager().setReportTemplate(new FileInputStream(new File(reportTemplate))); + } + + String logInterval = root.getAttributeValue("LOG-INTERVAL"); + + if (logInterval != null) { + long seconds = Integer.valueOf(logInterval).longValue(); + TimerTask logTask; + if (reportName != null && reportTemplate != null) { + logTask = new TimerTask() { + @Override + public void run() { + try { + mbt.getStatisticsManager().writeFullReport(new PrintStream(reportName)); + } catch (FileNotFoundException e) { + throw new RuntimeException("Could not open or write report file '" + reportName + "'", e); + } + } + }; + } else { + logTask = new TimerTask() { + @Override + public void run() { + Util.logger.info(mbt.getStatisticsCompact()); + } + }; + } + Util.timer = new Timer(); + Util.timer.schedule(logTask, 500, seconds * 1000); + } + + if (!runningSoapServices) { + try { + + String executor = root.getAttributeValue("EXECUTOR"); + Util.logger.debug("Executor is: " + executor); + String executorParam = null; + if (executor.contains(":")) { + executorParam = executor.substring(executor.indexOf(':') + 1); + executor = executor.substring(0, executor.indexOf(':')); + } + + if (executor.equalsIgnoreCase("offline")) { + PrintStream out = System.out; + if (executorParam != null && !executorParam.equals("")) { + try { + out = new PrintStream(executorParam); + } catch (FileNotFoundException e) { + throw new RuntimeException("file '" + executorParam + "' could not be created or is writeprotected.", e); + } + } + if (!mbt.isUseGUI()) { + mbt.writePath(out); + if (out != System.out) { + out.close(); + } + } + } else if (executor.equalsIgnoreCase("manual")) { + PrintStream out = System.out; + if (executorParam != null && !executorParam.equals("")) { + try { + out = new PrintStream(executorParam); + } catch (FileNotFoundException e) { + throw new RuntimeException("file '" + executorParam + "' could not be created or is writeprotected.", e); + } + } + if (!mbt.isUseGUI()) { + Vector testSequence = new Vector(); + mbt.writePath(testSequence); + + new PrintHTMLTestSequence(testSequence, out); + if (out != System.out) { + out.close(); + } + } + } else if (executor.equalsIgnoreCase("java")) { + if (executorParam == null || executorParam.equals("")) { + throw new RuntimeException("No java class specified for execution"); + } + + if (!mbt.isUseGUI()) { + mbt.executePath(executorParam); + } else { + mbt.setJavaExecutorClass(executorParam); + } + } else if (executor.equalsIgnoreCase("online")) { + if (mbt.isDryRun()) { + Util.logger.debug("Executing a dry run"); + mbt.executePath(null, null); + } + if (!mbt.isUseGUI()) { + mbt.interractivePath(); + } + + } else if (executor.equalsIgnoreCase("none") || executor.equals("")) { + // no execution (for debug purpose) + } else { + throw new RuntimeException("Unknown executor '" + executor + "'"); + } + + } finally { + if (Util.timer != null) { + Util.timer.cancel(); + } + if (reportName != null && reportTemplate != null && !mbt.isUseGUI()) { + mbt.getStatisticsManager().writeFullReport(reportName); + } + } + } + return mbt; + } + + @SuppressWarnings("unchecked") + private ModelBasedTesting loadXmlNonStatic(final File file, final boolean runningSoapServices, final boolean dryRun) + throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + final ModelBasedTesting mbt = new ModelBasedTesting(); + mbt.setDryRun(dryRun); + + SAXBuilder parser = new SAXBuilder(); + Document doc; + doc = parser.build(file); + Element root = doc.getRootElement(); + List models = root.getChildren("MODEL"); + + if (models.size() == 0) { + throw new RuntimeException("Model is missing from XML"); + } + + for (Element element : models) { + mbt.readGraph((element).getAttributeValue("PATH")); + } + + List classPath = root.getChildren("CLASS"); + for (Element element : classPath) { + String classPaths[] = element.getAttributeValue("PATH").split(":"); + for (String classPath2 : classPaths) { + try { + ClassPathHack.addFile(getFile(classPath2)); + Util.logger.debug("Added to classpath: " + classPath2); + } catch (Exception e) { + throw new RuntimeException(e.getMessage() + "\nCould not add: '" + classPath2 + "' to CLASSPATH\n" + + "Please review your xml file: '" + file + "' at CLASS PATH", e); + } + } + } + + if (root.getAttributeValue("SCRIPT_ENGINE") != null && root.getAttributeValue("SCRIPT_ENGINE").equalsIgnoreCase("js")) { + Util.logger.debug("Enabling JavaScript engine"); + mbt.enableJsScriptEngine(true); + } else { + Util.logger.debug("Using BeanShell script engine, if EFSM is enabled."); + mbt.enableJsScriptEngine(false); + } + + if (root.getAttributeValue("EXTENDED") != null && root.getAttributeValue("EXTENDED").equalsIgnoreCase("true")) { + Util.logger.debug("Enabling extended FSM"); + mbt.enableExtended(true); + mbt.setStartupScript(getScriptContent(root.getChildren("SCRIPT"))); + } else { + Util.logger.debug("Disabling extended FSM"); + mbt.enableExtended(false); + } + + if (root.getAttributeValue("WEIGHT") != null && root.getAttributeValue("WEIGHT").equalsIgnoreCase("true")) { + Util.logger.debug("Using weighted edges"); + mbt.setWeighted(true); + } else { + Util.logger.debug("Will not use weighted edges"); + mbt.setWeighted(false); + } + + List generators = root.getChildren("GENERATOR"); + + if (generators.size() == 0) { + throw new RuntimeException("Generator is missing from XML"); + } + + PathGenerator generator; + if (generators.size() > 1) { + generator = new CombinedPathGenerator(); + for (Element element : generators) { + ((CombinedPathGenerator) generator).addPathGenerator(getGenerator(mbt.getMachine(), element)); + } + } else { + generator = getGenerator(mbt.getMachine(), generators.get(0)); + } + if (generator == null) { + throw new RuntimeException("Failed to set generator"); + } + mbt.setGenerator(generator); + + final String reportName = root.getAttributeValue("REPORT"); + String reportTemplate = root.getAttributeValue("REPORT-TEMPLATE"); + + if (reportName != null && reportTemplate != null) { + Util.logger.debug("Will use report template: " + reportTemplate); + mbt.getStatisticsManager().setReportTemplate(new FileInputStream(new File(reportTemplate))); + } + + String logInterval = root.getAttributeValue("LOG-INTERVAL"); + + if (logInterval != null) { + long seconds = Integer.valueOf(logInterval).longValue(); + TimerTask logTask; + if (reportName != null && reportTemplate != null) { + logTask = new TimerTask() { + @Override + public void run() { + try { + mbt.getStatisticsManager().writeFullReport(new PrintStream(reportName)); + } catch (FileNotFoundException e) { + throw new RuntimeException("Could not open or write report file '" + reportName + "'", e); + } + } + }; + } else { + logTask = new TimerTask() { + @Override + public void run() { + Util.logger.info(mbt.getStatisticsCompact()); + } + }; + } + Util.timer = new Timer(); + Util.timer.schedule(logTask, 500, seconds * 1000); + } + + if (!runningSoapServices) { + try { + + String executor = root.getAttributeValue("EXECUTOR"); + Util.logger.debug("Executor is: " + executor); + String executorParam = null; + if (executor.contains(":")) { + executorParam = executor.substring(executor.indexOf(':') + 1); + executor = executor.substring(0, executor.indexOf(':')); + } + + if (executor.equalsIgnoreCase("offline")) { + PrintStream out = System.out; + if (executorParam != null && !executorParam.equals("")) { + try { + out = new PrintStream(executorParam); + } catch (FileNotFoundException e) { + throw new RuntimeException("file '" + executorParam + "' could not be created or is writeprotected.", e); + } + } + if (!mbt.isUseGUI()) { + mbt.writePath(out); + if (out != System.out) { + out.close(); + } + } + } else if (executor.equalsIgnoreCase("manual")) { + PrintStream out = System.out; + if (executorParam != null && !executorParam.equals("")) { + try { + out = new PrintStream(executorParam); + } catch (FileNotFoundException e) { + throw new RuntimeException("file '" + executorParam + "' could not be created or is writeprotected.", e); + } + } + if (!mbt.isUseGUI()) { + Vector testSequence = new Vector(); + mbt.writePath(testSequence); + + new PrintHTMLTestSequence(testSequence, out); + if (out != System.out) { + out.close(); + } + } + } else if (executor.equalsIgnoreCase("java")) { + if (executorParam == null || executorParam.equals("")) { + throw new RuntimeException("No java class specified for execution"); + } + + if (!mbt.isUseGUI()) { + mbt.executePath(executorParam); + } else { + mbt.setJavaExecutorClass(executorParam); + } + } else if (executor.equalsIgnoreCase("online")) { + if (mbt.isDryRun()) { + Util.logger.debug("Executing a dry run"); + mbt.executePath(null, null); + } + if (!mbt.isUseGUI()) { + mbt.interractivePath(); + } + + // } else if (executor.equalsIgnoreCase("none") || + // executor.equals("")) { + // no execution (for debug purpose) + } else { + throw new RuntimeException("Unknown executor '" + executor + "'"); + } + + } finally { + if (Util.timer != null) { + Util.timer.cancel(); + } + if (reportName != null && reportTemplate != null && !mbt.isUseGUI()) { + mbt.getStatisticsManager().writeFullReport(reportName); + } + } + } + return mbt; + } + + private static String getScriptContent(final List scripts) throws IOException { + StringBuilder stringBuilder = new StringBuilder(); + for (Element element : scripts) { + String internal = element.getTextTrim(); + if (internal != null && !internal.equals("")) { + stringBuilder.append(internal); + stringBuilder.append(System.getProperty("line.separator")); + } + String external = element.getAttributeValue("PATH"); + if (external != null && !external.equals("")) { + stringBuilder.append(readFile(Util.getFile(external))); + stringBuilder.append(System.getProperty("line.separator")); + } + } + return stringBuilder.toString(); + } + + @SuppressWarnings("unchecked") + private static PathGenerator getGenerator(final FiniteStateMachine machine, final Element generator) throws StopConditionException, + GeneratorException, IOException { + int generatorType = Keywords.getGenerator(generator.getAttributeValue("TYPE")); + PathGenerator generatorObject = getGenerator(generatorType); + if (generatorObject instanceof CodeGenerator) { + String[] template = {"", "", ""}; + String templateFile = generator.getAttributeValue("VALUE"); + if (templateFile != null) { + template[1] = readFile(Util.getFile(templateFile.trim())); + } else { + Element templateElement = generator.getChild("TEMPLATE"); + if (templateElement != null) { + template[0] = templateElement.getChildTextTrim("HEADER"); + template[1] = templateElement.getChildTextTrim("BODY"); + template[2] = templateElement.getChildTextTrim("FOOTER"); + } else { + throw new RuntimeException("No Template is specified for the stub generator."); + } + } + ((CodeGenerator) generatorObject).setTemplate(template); + } else { + StopCondition stopCondition = getCondition(machine, generator.getChildren()); + if (stopCondition != null) { + generatorObject.setStopCondition(stopCondition); + } + } + return generatorObject; + } + + private static StopCondition getCondition(final FiniteStateMachine machine, final List conditions) throws StopConditionException { + StopCondition condition = null; + if (conditions.size() > 1) { + condition = new CombinationalCondition(); + for (Element element : conditions) { + ((CombinationalCondition) condition).add(getCondition(machine, element)); + } + } else if (conditions.size() == 1) { + condition = getCondition(machine, conditions.get(0)); + } + return condition; + } + + @SuppressWarnings("unchecked") + private static StopCondition getCondition(final FiniteStateMachine machine, final Element condition) throws StopConditionException { + StopCondition stopCondition = null; + if (condition.getName().equalsIgnoreCase("AND")) { + stopCondition = new CombinationalCondition(); + for (Element element : (Iterable) condition.getChildren()) { + ((CombinationalCondition) stopCondition).add(getCondition(machine, element)); + } + } else if (condition.getName().equalsIgnoreCase("OR")) { + stopCondition = new AlternativeCondition(); + for (Element element : (Iterable) condition.getChildren()) { + ((AlternativeCondition) stopCondition).add(getCondition(machine, element)); + } + } else if (condition.getName().equalsIgnoreCase("CONDITION")) { + int type = Keywords.getStopCondition(condition.getAttributeValue("TYPE")); + String value = condition.getAttributeValue("VALUE"); + stopCondition = getCondition(machine, type, value); + } + return stopCondition; + } + + public static String readFile(final File file) throws IOException { + StringBuilder stringBuilder = new StringBuilder(); + FileReader reader = null; + try { + reader = new FileReader(file); + BufferedReader bufferedReader = new BufferedReader(reader); + while (bufferedReader.ready()) { + stringBuilder.append(bufferedReader.readLine()); + stringBuilder.append(System.getProperty("line.separator")); + } + bufferedReader.close(); + } catch (IOException e) { + throw e; // TODO: remove the IOE from method signature and throw a new + // exception extending runtime + } finally { + closeQuietly(reader); + } + return stringBuilder.toString(); + } + + public static char getInput() { + char c = 0; + try { + while (c != '0' && c != '1' && c != '2') { + int tmp = System.in.read(); + c = (char) tmp; + } + } catch (IOException e) { + // + } + return c; + } + + /** + * This functions shuffle the array, and returns the shuffled array + * + * @param array + * @return + */ + public static Object[] shuffle(final Object[] array) { + for (int i = 0; i < array.length; i++) { + Object leftObject = array[i]; + int index = Util.random.nextInt(array.length); + Object rightObject = array[index]; + + array[i] = rightObject; + array[index] = leftObject; + } + return array; + } + + public static InetAddress getInternetAddr(final String nic) { + // Find the real network interface + NetworkInterface iface = null; + InetAddress ia = null; + boolean foundNIC = false; + try { + for (Enumeration ifaces = NetworkInterface.getNetworkInterfaces(); ifaces.hasMoreElements() && foundNIC == false; ) { + iface = ifaces.nextElement(); + Util.logger.debug("Interface: " + iface.getDisplayName()); + for (Enumeration ips = iface.getInetAddresses(); ips.hasMoreElements() && foundNIC == false; ) { + ia = ips.nextElement(); + Util.logger.debug(ia.getCanonicalHostName() + " " + ia.getHostAddress()); + if (!ia.isLoopbackAddress()) { + Util.logger.debug(" Not a loopback address..."); + if (!ia.getHostAddress().contains(":") && nic.equals(iface.getDisplayName())) { + Util.logger.debug(" Host address does not contain ':'"); + Util.logger.debug(" Interface: " + iface.getName() + " seems to be InternetInterface. I'll take it..."); + foundNIC = true; + } + } + } + } + } catch (SocketException e) { + Util.logger.error(e.getMessage()); + } finally { + if (!foundNIC && nic != null) { + Util.logger.error("Could not bind to network interface: " + nic); + throw new RuntimeException("Could not bind to network interface: " + nic); + } else if (!foundNIC) { + Util.logger.error("Could not bind to any network interface"); + throw new RuntimeException("Could not bind to any network interface: "); + } + } + return ia; + } + + public static String readWSPort() { + PropertiesConfiguration conf = null; + if (new File("graphwalker.properties").canRead()) { + try { + conf = new PropertiesConfiguration("graphwalker.properties"); + } catch (ConfigurationException e) { + Util.logger.error(e.getMessage()); + } + } else { + conf = new PropertiesConfiguration(); + try { + conf.load(Util.class.getResourceAsStream("/graphwalker.properties")); + } catch (ConfigurationException e) { + Util.logger.error(e.getMessage()); + } + } + String port = conf.getString("graphwalker.ws.port"); + Util.logger.debug("Read graphwalker.ws.port from graphwalker.properties: " + port); + if (port == null) { + port = "9090"; + Util.logger.debug("Setting port to: 9090"); + } + return port; + } + + public static Boolean readSoapGuiStartupState() { + PropertiesConfiguration conf = null; + if (new File("graphwalker.properties").canRead()) { + try { + conf = new PropertiesConfiguration("graphwalker.properties"); + } catch (ConfigurationException e) { + Util.logger.error(e.getMessage()); + } + } else { + conf = new PropertiesConfiguration(); + try { + conf.load(Util.class.getResourceAsStream("/graphwalker.properties")); + } catch (ConfigurationException e) { + Util.logger.error(e.getMessage()); + } + } + Boolean soapGuiState = false; + try { + soapGuiState = conf.getBoolean("org.graphwalker.GUI.startSOAP"); + } catch (NoSuchElementException e) { + Util.logger.debug("org.graphwalker.GUI.startSOAP not found in graphwalker.properties"); + soapGuiState = false; + } + Util.logger.debug("Read org.graphwalker.GUI.startSOAP from graphwalker.properties: " + soapGuiState); + return soapGuiState; + } + + public static void logStackTraceToError(final Exception e) { + StringWriter sw = new StringWriter(); + PrintWriter pw = new PrintWriter(sw); + e.printStackTrace(pw); + pw.close(); + Util.logger.error(sw.toString()); + } + + public static void logStackTraceToError(final Throwable t) { + StringWriter sw = new StringWriter(); + PrintWriter pw = new PrintWriter(sw); + t.printStackTrace(pw); + pw.close(); + Util.logger.error(sw.toString()); + } + + public static File getFile(final String resourceName) { + Util.logger.debug("Try to get file: " + resourceName); + File file = new File(resourceName); + if (file.exists()) { + Util.logger.debug("File exists on file system."); + return file; + } + ClassLoader cloader = Thread.currentThread().getContextClassLoader(); + Util.logger.debug("Class loader class name: " + cloader.getClass().getName()); + URL resource = cloader.getResource(resourceName); + + if (resource == null) { + throw new IllegalArgumentException("Could not get resource: " + resourceName); + } + + return new File(resource.getPath()); + } + + public static void closeQuietly(Reader reader) { + if (null != reader) { + try { + reader.close(); + } catch (Exception e) { + // ignore all exceptions + } + } + } + + public static void closeQuietly(InputStream inputStream) { + if (null != inputStream) { + try { + inputStream.close(); + } catch (Exception e) { + // ignore all exceptions + } + } + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AbstractStopCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AbstractStopCondition.java index c1c56130..7a67a036 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AbstractStopCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AbstractStopCondition.java @@ -29,13 +29,13 @@ public abstract class AbstractStopCondition implements StopCondition { - private FiniteStateMachine machine; + private FiniteStateMachine machine; - public FiniteStateMachine getMachine() { - return machine; - } + public FiniteStateMachine getMachine() { + return machine; + } - public void setMachine(FiniteStateMachine machine) { - this.machine = machine; - } + public void setMachine(FiniteStateMachine machine) { + this.machine = machine; + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java index 76577ad4..54550cd6 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java @@ -26,62 +26,62 @@ package org.graphwalker.core.conditions; +import org.graphwalker.core.machines.FiniteStateMachine; + import java.util.Iterator; import java.util.Vector; -import org.graphwalker.core.machines.FiniteStateMachine; - public class AlternativeCondition extends AbstractStopCondition { - private Vector conditions; + private Vector conditions; - @Override - public boolean isFulfilled() { - for (StopCondition condition : conditions) { - if (condition.isFulfilled()) - return true; - } - return false; - } + @Override + public boolean isFulfilled() { + for (StopCondition condition : conditions) { + if (condition.isFulfilled()) + return true; + } + return false; + } - public AlternativeCondition() { - this.conditions = new Vector(); - } + public AlternativeCondition() { + this.conditions = new Vector(); + } - public void add(StopCondition condition) { - this.conditions.add(condition); - } + public void add(StopCondition condition) { + this.conditions.add(condition); + } - @Override - public void setMachine(FiniteStateMachine machine) { - super.setMachine(machine); - for (StopCondition condition : conditions) { - condition.setMachine(machine); - } - } + @Override + public void setMachine(FiniteStateMachine machine) { + super.setMachine(machine); + for (StopCondition condition : conditions) { + condition.setMachine(machine); + } + } - @Override - public double getFulfilment() { - double retur = 0; - for (StopCondition condition : conditions) { - double newFullfillment = condition.getFulfilment(); - if (newFullfillment > retur) { - retur = newFullfillment; - } - } - return retur; - } + @Override + public double getFulfilment() { + double retur = 0; + for (StopCondition condition : conditions) { + double newFullfillment = condition.getFulfilment(); + if (newFullfillment > retur) { + retur = newFullfillment; + } + } + return retur; + } - @Override - public String toString() { - StringBuilder stringBuilder = new StringBuilder("("); - for (Iterator i = conditions.iterator(); i.hasNext();) { - stringBuilder.append(i.next().toString()); - if (i.hasNext()) { - stringBuilder.append(" OR "); - } - } - stringBuilder.append(")"); - return stringBuilder.toString(); - } + @Override + public String toString() { + StringBuilder stringBuilder = new StringBuilder("("); + for (Iterator i = conditions.iterator(); i.hasNext(); ) { + stringBuilder.append(i.next().toString()); + if (i.hasNext()) { + stringBuilder.append(" OR "); + } + } + stringBuilder.append(")"); + return stringBuilder.toString(); + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java index 4e2a8200..8603fc32 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java @@ -26,61 +26,61 @@ package org.graphwalker.core.conditions; +import org.graphwalker.core.machines.FiniteStateMachine; + import java.util.Iterator; import java.util.Vector; -import org.graphwalker.core.machines.FiniteStateMachine; - public class CombinationalCondition extends AbstractStopCondition { - private Vector conditions; + private Vector conditions; - @Override - public boolean isFulfilled() { - for (StopCondition condition : conditions) { - if (!condition.isFulfilled()) { - return false; - } - } - return true; - } + @Override + public boolean isFulfilled() { + for (StopCondition condition : conditions) { + if (!condition.isFulfilled()) { + return false; + } + } + return true; + } - public CombinationalCondition() { - this.conditions = new Vector(); - } + public CombinationalCondition() { + this.conditions = new Vector(); + } - public void add(StopCondition condition) { - this.conditions.add(condition); - } + public void add(StopCondition condition) { + this.conditions.add(condition); + } - @Override - public void setMachine(FiniteStateMachine machine) { - super.setMachine(machine); - for (StopCondition condition : conditions) { - condition.setMachine(machine); - } - } + @Override + public void setMachine(FiniteStateMachine machine) { + super.setMachine(machine); + for (StopCondition condition : conditions) { + condition.setMachine(machine); + } + } - @Override - public double getFulfilment() { - double retur = 0; - for (StopCondition condition : conditions) { - retur += condition.getFulfilment(); - } - return retur / conditions.size(); - } + @Override + public double getFulfilment() { + double retur = 0; + for (StopCondition condition : conditions) { + retur += condition.getFulfilment(); + } + return retur / conditions.size(); + } - @Override - public String toString() { - StringBuilder stringBuilder = new StringBuilder("("); - for (Iterator i = conditions.iterator(); i.hasNext();) { - stringBuilder.append(i.next().toString()); - if (i.hasNext()) { - stringBuilder.append(" AND "); - } - } - stringBuilder.append(")"); - return stringBuilder.toString(); - } + @Override + public String toString() { + StringBuilder stringBuilder = new StringBuilder("("); + for (Iterator i = conditions.iterator(); i.hasNext(); ) { + stringBuilder.append(i.next().toString()); + if (i.hasNext()) { + stringBuilder.append(" AND "); + } + } + stringBuilder.append(")"); + return stringBuilder.toString(); + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java index bde28e97..a74d6efb 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java @@ -32,37 +32,37 @@ public class EdgeCoverage extends AbstractStopCondition { - private double limit; - static Logger logger = Util.setupLogger(EdgeCoverage.class); + private double limit; + static Logger logger = Util.setupLogger(EdgeCoverage.class); - public EdgeCoverage() throws StopConditionException { - this(1); - } + public EdgeCoverage() throws StopConditionException { + this(1); + } - public EdgeCoverage(double limit) throws StopConditionException { - if (limit > 1 || limit < 0) - throw new StopConditionException("Excpeted an edge coverage between 0 and 100. Actual: " + limit * 100); - this.limit = limit; - } + public EdgeCoverage(double limit) throws StopConditionException { + if (limit > 1 || limit < 0) + throw new StopConditionException("Excpeted an edge coverage between 0 and 100. Actual: " + limit * 100); + this.limit = limit; + } - @Override - public boolean isFulfilled() { - double edges = getMachine().getAllEdges().size(); - double covered = getMachine().getNumOfCoveredEdges(); - logger.debug("Edges/covered (limit): " + edges + "/" + covered + " (" + limit + ")"); - return (covered / edges) >= limit; - } + @Override + public boolean isFulfilled() { + double edges = getMachine().getAllEdges().size(); + double covered = getMachine().getNumOfCoveredEdges(); + logger.debug("Edges/covered (limit): " + edges + "/" + covered + " (" + limit + ")"); + return (covered / edges) >= limit; + } - @Override - public double getFulfilment() { - double edges = getMachine().getAllEdges().size(); - double covered = getMachine().getNumOfCoveredEdges(); - return (covered / edges) / limit; - } + @Override + public double getFulfilment() { + double edges = getMachine().getAllEdges().size(); + double covered = getMachine().getNumOfCoveredEdges(); + return (covered / edges) / limit; + } - @Override - public String toString() { - return "EC>=" + (int) (100 * limit); - } + @Override + public String toString() { + return "EC>=" + (int) (100 * limit); + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java index eb35a2ba..c6cf1729 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java @@ -28,22 +28,22 @@ public class NeverCondition extends AbstractStopCondition { - public NeverCondition() { - } + public NeverCondition() { + } - @Override - public boolean isFulfilled() { - return false; - } + @Override + public boolean isFulfilled() { + return false; + } - @Override - public double getFulfilment() { - return 0; - } + @Override + public double getFulfilment() { + return 0; + } - @Override - public String toString() { - return "FALSE"; - } + @Override + public String toString() { + return "FALSE"; + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java index 3078f746..221a4189 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java @@ -26,98 +26,98 @@ package org.graphwalker.core.conditions; -import java.util.ArrayList; - import org.graphwalker.core.graph.Edge; import org.graphwalker.core.machines.FiniteStateMachine; +import java.util.ArrayList; + public class ReachedEdge extends AbstractStopCondition { - private ArrayList allEdges; - private Edge endEdge; - private int[] proximity; - private int maxDistance; - private String edgeName; + private ArrayList allEdges; + private Edge endEdge; + private int[] proximity; + private int maxDistance; + private String edgeName; - @Override - public boolean isFulfilled() { - return getFulfilment() >= 0.99999; - } + @Override + public boolean isFulfilled() { + return getFulfilment() >= 0.99999; + } - @Override - public void setMachine(FiniteStateMachine machine) { - super.setMachine(machine); - if (this.endEdge == null) { - this.endEdge = machine.findEdge(edgeName); - } - if (this.endEdge == null) { - throw new RuntimeException("Vertex '" + edgeName + "' not found in model"); - } - this.proximity = getFloydWarshall(); - this.maxDistance = max(this.proximity); - } + @Override + public void setMachine(FiniteStateMachine machine) { + super.setMachine(machine); + if (this.endEdge == null) { + this.endEdge = machine.findEdge(edgeName); + } + if (this.endEdge == null) { + throw new RuntimeException("Vertex '" + edgeName + "' not found in model"); + } + this.proximity = getFloydWarshall(); + this.maxDistance = max(this.proximity); + } - public ReachedEdge(String edgeName) { - String[] vertex = edgeName.split("/", 2); - this.edgeName = vertex[0]; - } + public ReachedEdge(String edgeName) { + String[] vertex = edgeName.split("/", 2); + this.edgeName = vertex[0]; + } - @Override - public double getFulfilment() { - int distance = this.maxDistance; - if (getMachine().getLastEdge() != null) { - distance = proximity[allEdges.indexOf(getMachine().getLastEdge())]; - } - return (1) - ((double) distance / (double) maxDistance); - } + @Override + public double getFulfilment() { + int distance = this.maxDistance; + if (getMachine().getLastEdge() != null) { + distance = proximity[allEdges.indexOf(getMachine().getLastEdge())]; + } + return (1) - ((double) distance / (double) maxDistance); + } - private int max(int[] t) { - int maximum = t[0]; - for (int i = 1; i < t.length; i++) { - if (t[i] > maximum) { - maximum = t[i]; - } - } - return maximum; - } + private int max(int[] t) { + int maximum = t[0]; + for (int i = 1; i < t.length; i++) { + if (t[i] > maximum) { + maximum = t[i]; + } + } + return maximum; + } - private int[][] getFloydWarshallMatrix() { - allEdges = new ArrayList(getMachine().getAllEdges()); - int n = allEdges.size(); - int[][] retur = new int[n][n]; - for (int i = 0; i < n; i++) { - for (int j = 0; j < n; j++) { - int x = 99999; - if (i == j) { - x = 0; - } else if (getMachine().getModel().isSource(getMachine().getModel().getDest(allEdges.get(j)), allEdges.get(i))) { - x = 1; - } - retur[i][j] = x; - } - } - return retur; - } + private int[][] getFloydWarshallMatrix() { + allEdges = new ArrayList(getMachine().getAllEdges()); + int n = allEdges.size(); + int[][] retur = new int[n][n]; + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + int x = 99999; + if (i == j) { + x = 0; + } else if (getMachine().getModel().isSource(getMachine().getModel().getDest(allEdges.get(j)), allEdges.get(i))) { + x = 1; + } + retur[i][j] = x; + } + } + return retur; + } - private int[] getFloydWarshall() { - int path[][] = getFloydWarshallMatrix(); - int n = path.length; - for (int k = 0; k < n; k++) { - for (int i = 0; i < n; i++) { - for (int j = 0; j < n; j++) { - path[i][j] = Math.min(path[i][j], path[i][k] + path[k][j]); - } - } - } - int startIndex = allEdges.indexOf(endEdge); - if (startIndex >= 0) { - return path[startIndex]; - } - throw new RuntimeException("edge no longer in Graph!"); - } + private int[] getFloydWarshall() { + int path[][] = getFloydWarshallMatrix(); + int n = path.length; + for (int k = 0; k < n; k++) { + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + path[i][j] = Math.min(path[i][j], path[i][k] + path[k][j]); + } + } + } + int startIndex = allEdges.indexOf(endEdge); + if (startIndex >= 0) { + return path[startIndex]; + } + throw new RuntimeException("edge no longer in Graph!"); + } - @Override - public String toString() { - return "EDGE='" + endEdge + "'"; - } + @Override + public String toString() { + return "EDGE='" + endEdge + "'"; + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java index 9d04f268..da848c3d 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java @@ -32,35 +32,35 @@ public class ReachedRequirement extends AbstractStopCondition { - private Collection requirements; + private Collection requirements; - public ReachedRequirement(String requirements) { - String[] list = requirements.split(","); - for (int i = 0; i < list.length; i++) { - list[i] = list[i].trim(); - } - this.requirements = new HashSet(Arrays.asList(list)); - } + public ReachedRequirement(String requirements) { + String[] list = requirements.split(","); + for (int i = 0; i < list.length; i++) { + list[i] = list[i].trim(); + } + this.requirements = new HashSet(Arrays.asList(list)); + } - @Override - public boolean isFulfilled() { - return getMachine().getCoveredRequirements().containsAll(requirements); - } + @Override + public boolean isFulfilled() { + return getMachine().getCoveredRequirements().containsAll(requirements); + } - @Override - public double getFulfilment() { - Collection covered = getMachine().getCoveredRequirements(); - covered.retainAll(requirements); - return covered.size() / (double) requirements.size(); - } + @Override + public double getFulfilment() { + Collection covered = getMachine().getCoveredRequirements(); + covered.retainAll(requirements); + return covered.size() / (double) requirements.size(); + } - @Override - public String toString() { - return "RC=" + Arrays.deepToString(requirements.toArray()); - } + @Override + public String toString() { + return "RC=" + Arrays.deepToString(requirements.toArray()); + } - public Collection getRequirements() { - return requirements; - } + public Collection getRequirements() { + return requirements; + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java index 065fc3d1..a20efe84 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java @@ -26,121 +26,121 @@ package org.graphwalker.core.conditions; -import java.util.ArrayList; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - import org.apache.log4j.Logger; import org.graphwalker.core.Util; import org.graphwalker.core.graph.Vertex; import org.graphwalker.core.machines.ExtendedFiniteStateMachine; import org.graphwalker.core.machines.FiniteStateMachine; +import java.util.ArrayList; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + public class ReachedVertex extends AbstractStopCondition { - private static Logger logger = Util.setupLogger(ReachedVertex.class); - private ArrayList allVertices; - private Vertex endVertex; - private int[] proximity; - private int maxDistance; - private String vertexName; - private String subState; + private static Logger logger = Util.setupLogger(ReachedVertex.class); + private ArrayList allVertices; + private Vertex endVertex; + private int[] proximity; + private int maxDistance; + private String vertexName; + private String subState; - @Override - public boolean isFulfilled() { - return getFulfilment() >= 0.99999; - } + @Override + public boolean isFulfilled() { + return getFulfilment() >= 0.99999; + } - @Override - public void setMachine(FiniteStateMachine machine) { - super.setMachine(machine); - if (this.endVertex == null) { - this.endVertex = machine.getModel().findVertex(vertexName); - } - if (this.endVertex == null) { - throw new RuntimeException("Vertex '" + vertexName + "' not found in model"); - } - this.proximity = getFloydWarshall(); - this.maxDistance = max(this.proximity); - } + @Override + public void setMachine(FiniteStateMachine machine) { + super.setMachine(machine); + if (this.endVertex == null) { + this.endVertex = machine.getModel().findVertex(vertexName); + } + if (this.endVertex == null) { + throw new RuntimeException("Vertex '" + vertexName + "' not found in model"); + } + this.proximity = getFloydWarshall(); + this.maxDistance = max(this.proximity); + } - public ReachedVertex(String vertexName) { - String[] vertex = vertexName.split("/", 2); - this.vertexName = vertex[0]; - this.subState = (vertex.length > 1 ? vertex[1] : ""); - } + public ReachedVertex(String vertexName) { + String[] vertex = vertexName.split("/", 2); + this.vertexName = vertex[0]; + this.subState = (vertex.length > 1 ? vertex[1] : ""); + } - @Override - public double getFulfilment() { - logger.debug("Machine: " + getMachine()); - int distance = proximity[allVertices.indexOf(getMachine().getCurrentVertex())]; - if (getMachine() instanceof ExtendedFiniteStateMachine) { - String currentVertex = getMachine().getCurrentVertexName(); - String currentSubState = ""; - if (vertexName.equals(Vertex.getLabel(currentVertex))) { - if (currentVertex.contains("/")) { - currentSubState = currentVertex.split("/", 2)[1]; - Pattern actionPattern = Pattern.compile(this.subState); - Matcher actionMatcher = actionPattern.matcher(currentSubState); - if (actionMatcher.find()) { - return 1; - } - } - } - return 0; - } + @Override + public double getFulfilment() { + logger.debug("Machine: " + getMachine()); + int distance = proximity[allVertices.indexOf(getMachine().getCurrentVertex())]; + if (getMachine() instanceof ExtendedFiniteStateMachine) { + String currentVertex = getMachine().getCurrentVertexName(); + String currentSubState = ""; + if (vertexName.equals(Vertex.getLabel(currentVertex))) { + if (currentVertex.contains("/")) { + currentSubState = currentVertex.split("/", 2)[1]; + Pattern actionPattern = Pattern.compile(this.subState); + Matcher actionMatcher = actionPattern.matcher(currentSubState); + if (actionMatcher.find()) { + return 1; + } + } + } + return 0; + } - return (1) - ((double) distance / (double) maxDistance); - } + return (1) - ((double) distance / (double) maxDistance); + } - private int max(int[] t) { - int maximum = t[0]; - for (int i = 1; i < t.length; i++) { - if (t[i] > maximum) { - maximum = t[i]; - } - } - return maximum; - } + private int max(int[] t) { + int maximum = t[0]; + for (int i = 1; i < t.length; i++) { + if (t[i] > maximum) { + maximum = t[i]; + } + } + return maximum; + } - private int[][] getFloydWarshallMatrix() { - allVertices = new ArrayList(getMachine().getAllVertices()); - int n = allVertices.size(); - int[][] retur = new int[n][n]; - for (int i = 0; i < n; i++) { - for (int j = 0; j < n; j++) { - int x = 99999; - if (i == j) { - x = 0; - } else if (getMachine().getModel().isPredecessor(allVertices.get(i), allVertices.get(j))) { - x = 1; - } - retur[i][j] = x; - } - } - return retur; - } + private int[][] getFloydWarshallMatrix() { + allVertices = new ArrayList(getMachine().getAllVertices()); + int n = allVertices.size(); + int[][] retur = new int[n][n]; + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + int x = 99999; + if (i == j) { + x = 0; + } else if (getMachine().getModel().isPredecessor(allVertices.get(i), allVertices.get(j))) { + x = 1; + } + retur[i][j] = x; + } + } + return retur; + } - private int[] getFloydWarshall() { - int path[][] = getFloydWarshallMatrix(); - int n = path.length; - for (int k = 0; k < n; k++) { - for (int i = 0; i < n; i++) { - for (int j = 0; j < n; j++) { - path[i][j] = Math.min(path[i][j], path[i][k] + path[k][j]); - } - } - } - int startIndex = allVertices.indexOf(endVertex); - if (startIndex >= 0) { - return path[startIndex]; - } - throw new RuntimeException("vertex no longer in Graph!"); - } + private int[] getFloydWarshall() { + int path[][] = getFloydWarshallMatrix(); + int n = path.length; + for (int k = 0; k < n; k++) { + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + path[i][j] = Math.min(path[i][j], path[i][k] + path[k][j]); + } + } + } + int startIndex = allVertices.indexOf(endVertex); + if (startIndex >= 0) { + return path[startIndex]; + } + throw new RuntimeException("vertex no longer in Graph!"); + } - @Override - public String toString() { - return "VERTEX='" + endVertex + "'"; - } + @Override + public String toString() { + return "VERTEX='" + endVertex + "'"; + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java index 7f25c9dc..4b3a8a73 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java @@ -30,36 +30,36 @@ public class RequirementCoverage extends AbstractStopCondition { - private double limit; + private double limit; - public RequirementCoverage() { - this(1); - } + public RequirementCoverage() { + this(1); + } - public RequirementCoverage(double limit) { - Util.AbortIf((limit > 1 || limit < 0), "Requirement coverage must be between 0 and 100"); - this.limit = limit; - } + public RequirementCoverage(double limit) { + Util.AbortIf((limit > 1 || limit < 0), "Requirement coverage must be between 0 and 100"); + this.limit = limit; + } - @Override - public boolean isFulfilled() { - int stats[] = getMachine().getStatistics(); - double requirements = stats[5]; - double covered = stats[6]; - return (covered / requirements) >= limit; - } + @Override + public boolean isFulfilled() { + int stats[] = getMachine().getStatistics(); + double requirements = stats[5]; + double covered = stats[6]; + return (covered / requirements) >= limit; + } - @Override - public double getFulfilment() { - int stats[] = getMachine().getStatistics(); - double requirements = stats[5]; - double covered = stats[6]; - return (covered / requirements) / limit; - } + @Override + public double getFulfilment() { + int stats[] = getMachine().getStatistics(); + double requirements = stats[5]; + double covered = stats[6]; + return (covered / requirements) / limit; + } - @Override - public String toString() { - return "RC>=" + (int) (100 * limit); - } + @Override + public String toString() { + return "RC>=" + (int) (100 * limit); + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java index a83d66c9..932bb53a 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java @@ -31,17 +31,17 @@ public interface StopCondition { - FiniteStateMachine getMachine(); + FiniteStateMachine getMachine(); - void setMachine(FiniteStateMachine machine); + void setMachine(FiniteStateMachine machine); - /** - * @return true if the condition is fulfilled - */ - boolean isFulfilled(); + /** + * @return true if the condition is fulfilled + */ + boolean isFulfilled(); - /** - * @return the condition fulfilment - */ - double getFulfilment(); + /** + * @return the condition fulfilment + */ + double getFulfilment(); } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java index b4158636..9f44b6e1 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java @@ -28,25 +28,25 @@ public class TestCaseLength extends AbstractStopCondition { - private int numberOfEdges; - - @Override - public boolean isFulfilled() { - return getMachine().getNumberOfEdgesTravesed() >= numberOfEdges; - } - - public TestCaseLength(int numberOfEdges) { - this.numberOfEdges = numberOfEdges; - } - - @Override - public double getFulfilment() { - return getMachine().getNumberOfEdgesTravesed() / (double) numberOfEdges; - } - - @Override - public String toString() { - return "L=" + numberOfEdges; - } + private int numberOfEdges; + + @Override + public boolean isFulfilled() { + return getMachine().getNumberOfEdgesTravesed() >= numberOfEdges; + } + + public TestCaseLength(int numberOfEdges) { + this.numberOfEdges = numberOfEdges; + } + + @Override + public double getFulfilment() { + return getMachine().getNumberOfEdgesTravesed() / (double) numberOfEdges; + } + + @Override + public String toString() { + return "L=" + numberOfEdges; + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java index 0a6cb0e7..d8ca6173 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java @@ -28,37 +28,36 @@ /** * Stops test execution after a certain amount of time has passed. - * + * * @author Johan Tejle - * */ public class TimeDuration extends AbstractStopCondition { - private double duration; - private double start_time; + private double duration; + private double start_time; - @Override - public boolean isFulfilled() { - return getFulfilment() >= 0.99999; - } + @Override + public boolean isFulfilled() { + return getFulfilment() >= 0.99999; + } - public TimeDuration(long seconds) { - this.start_time = System.currentTimeMillis(); - this.duration = seconds * 1000; - } + public TimeDuration(long seconds) { + this.start_time = System.currentTimeMillis(); + this.duration = seconds * 1000; + } - @Override - public double getFulfilment() { - return (System.currentTimeMillis() - this.start_time) / this.duration; - } + @Override + public double getFulfilment() { + return (System.currentTimeMillis() - this.start_time) / this.duration; + } - @Override - public String toString() { - return "DURATION=" + (duration / 1000) + "s"; - } + @Override + public String toString() { + return "DURATION=" + (duration / 1000) + "s"; + } - public void restartTime() { - start_time = System.currentTimeMillis(); - } + public void restartTime() { + start_time = System.currentTimeMillis(); + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java index ee61aaf3..0c05900a 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java @@ -30,36 +30,36 @@ public class VertexCoverage extends AbstractStopCondition { - private double limit; + private double limit; - public VertexCoverage() throws StopConditionException { - this(1); - } + public VertexCoverage() throws StopConditionException { + this(1); + } - public VertexCoverage(double limit) throws StopConditionException { - if (limit > 1 || limit < 0) { - throw new StopConditionException("Excpeted a vertex coverage between 0 and 100. Actual: " + limit * 100); - } - this.limit = limit; - } + public VertexCoverage(double limit) throws StopConditionException { + if (limit > 1 || limit < 0) { + throw new StopConditionException("Excpeted a vertex coverage between 0 and 100. Actual: " + limit * 100); + } + this.limit = limit; + } - @Override - public boolean isFulfilled() { - double vertices = getMachine().getAllVertices().size(); - double covered = getMachine().getNumOfCoveredVertices(); - return (covered / vertices) >= limit; - } + @Override + public boolean isFulfilled() { + double vertices = getMachine().getAllVertices().size(); + double covered = getMachine().getNumOfCoveredVertices(); + return (covered / vertices) >= limit; + } - @Override - public double getFulfilment() { - double vertices = getMachine().getAllVertices().size(); - double covered = getMachine().getNumOfCoveredVertices(); - return (covered / vertices) / limit; - } + @Override + public double getFulfilment() { + double vertices = getMachine().getAllVertices().size(); + double covered = getMachine().getNumOfCoveredVertices(); + return (covered / vertices) / limit; + } - @Override - public String toString() { - return "SC>=" + (int) (100 * limit); - } + @Override + public String toString() { + return "SC>=" + (int) (100 * limit); + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java b/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java index 20281be5..e1bcf7e5 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java @@ -28,5 +28,5 @@ public interface AppEvent { - public void getLoadEvent(); + public void getLoadEvent(); } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java b/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java index ddda3daf..31301447 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java @@ -28,6 +28,6 @@ public interface MbtEvent { - public void getNextEvent(); + public void getNextEvent(); } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java index 259f09a1..3aadf41d 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java @@ -30,15 +30,14 @@ * This exception is thrown during test sequence generation, when no out edge is * found from a given vertex. This could be due to a cul-de-sac, which may or * may not be perfectly all right. - * */ public class FoundNoEdgeException extends Exception { - /** - * @param string - */ - public FoundNoEdgeException(String string) { - super(string); - } + /** + * @param string + */ + public FoundNoEdgeException(String string) { + super(string); + } - private static final long serialVersionUID = -2597269122921601356L; + private static final long serialVersionUID = -2597269122921601356L; } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java index 31faa05e..12f70885 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java @@ -27,9 +27,9 @@ package org.graphwalker.core.exceptions; public class GeneratorException extends Exception { - private static final long serialVersionUID = -6355062559015580205L; + private static final long serialVersionUID = -6355062559015580205L; - public GeneratorException(String message) { - super(message); - } + public GeneratorException(String message) { + super(message); + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java index 1850dc63..6aa2ac9a 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java @@ -28,9 +28,8 @@ /** * This exception indicats to MBT that GUI wants to stop execution of MBT - * */ public class GuiStoppedExecution extends RuntimeException { - private static final long serialVersionUID = -2445201301297201999L; + private static final long serialVersionUID = -2445201301297201999L; } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java index 88e96266..6c25ab7f 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java @@ -29,17 +29,15 @@ /** * This exception should be used whenever data extraction from the data space * from a EFSM machine fails. - * */ public class InvalidDataException extends Exception { - /** - * @param message - * A string containing a message describing the failure in detail. - */ - public InvalidDataException(String message) { - super(message); - } + /** + * @param message A string containing a message describing the failure in detail. + */ + public InvalidDataException(String message) { + super(message); + } - private static final long serialVersionUID = -2445201301297201999L; + private static final long serialVersionUID = -2445201301297201999L; } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java index e4b4c68c..fc658ba6 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java @@ -32,13 +32,12 @@ */ public class StopConditionException extends Exception { - /** - * @param message - * A string containing a message describing the failure in detail. - */ - public StopConditionException(String message) { - super(message); - } + /** + * @param message A string containing a message describing the failure in detail. + */ + public StopConditionException(String message) { + super(message); + } - private static final long serialVersionUID = -5843521571692420560L; + private static final long serialVersionUID = -5843521571692420560L; } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java b/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java index 23ddb540..0aca9ebd 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java @@ -26,56 +26,54 @@ package org.graphwalker.core.filters; -import javax.script.ScriptEngine; -import javax.script.ScriptException; - -import org.graphwalker.core.graph.Edge; - import bsh.EvalError; import bsh.Interpreter; +import org.graphwalker.core.graph.Edge; + +import javax.script.ScriptEngine; +import javax.script.ScriptException; /** * @author Johan Tejle - * */ public class AccessableEdgeFilter { - private ScriptEngine jsEngine = null; - private Interpreter beanShellEngine = null; + private ScriptEngine jsEngine = null; + private Interpreter beanShellEngine = null; - public AccessableEdgeFilter(ScriptEngine sciptEngine) { - this.jsEngine = sciptEngine; - } + public AccessableEdgeFilter(ScriptEngine sciptEngine) { + this.jsEngine = sciptEngine; + } - public AccessableEdgeFilter(Interpreter beanShellEngine) { - this.beanShellEngine = beanShellEngine; - } + public AccessableEdgeFilter(Interpreter beanShellEngine) { + this.beanShellEngine = beanShellEngine; + } - public boolean acceptEdge(org.graphwalker.core.graph.Graph graph, Edge edge) { - if (edge.getGuardKey().isEmpty()) { - return true; - } + public boolean acceptEdge(org.graphwalker.core.graph.Graph graph, Edge edge) { + if (edge.getGuardKey().isEmpty()) { + return true; + } - if (jsEngine != null) { - try { - return (Boolean) jsEngine.eval(edge.getGuardKey()); - } catch (ScriptException e) { - throw new RuntimeException("Malformed Edge guard\n\t" + edge + "\n\tGuard: " + edge.getGuardKey() - + "\n\tBeanShell error message: '" + e.getMessage() + "'"); - } - } else if (beanShellEngine != null) { - try { - return (Boolean) beanShellEngine.eval(edge.getGuardKey()); - } catch (EvalError e) { - throw new RuntimeException("Malformed Edge guard\n\t" + edge + "\n\tGuard: " + edge.getGuardKey() - + "\n\tBeanShell error message: '" + e.getMessage() + "'"); - } - } - return false; - } + if (jsEngine != null) { + try { + return (Boolean) jsEngine.eval(edge.getGuardKey()); + } catch (ScriptException e) { + throw new RuntimeException("Malformed Edge guard\n\t" + edge + "\n\tGuard: " + edge.getGuardKey() + + "\n\tBeanShell error message: '" + e.getMessage() + "'"); + } + } else if (beanShellEngine != null) { + try { + return (Boolean) beanShellEngine.eval(edge.getGuardKey()); + } catch (EvalError e) { + throw new RuntimeException("Malformed Edge guard\n\t" + edge + "\n\tGuard: " + edge.getGuardKey() + + "\n\tBeanShell error message: '" + e.getMessage() + "'"); + } + } + return false; + } - public String getName() { - return "AccessableEdgeFilter"; - } + public String getName() { + return "AccessableEdgeFilter"; + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java index 91f4b501..e70f2f0e 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java @@ -26,12 +26,6 @@ package org.graphwalker.core.generators; -import java.util.Comparator; -import java.util.PriorityQueue; -import java.util.Set; -import java.util.Stack; -import java.util.Vector; - import org.graphwalker.core.Util; import org.graphwalker.core.conditions.StopCondition; import org.graphwalker.core.exceptions.FoundNoEdgeException; @@ -39,191 +33,193 @@ import org.graphwalker.core.graph.Vertex; import org.graphwalker.core.machines.FiniteStateMachine; -public class A_StarPathGenerator extends PathGenerator { - - public A_StarPathGenerator(StopCondition stopCondition) { - super(stopCondition); - } - - private Stack preCalculatedPath = null; - private Vertex lastVertex; - - @Override - public void setMachine(FiniteStateMachine machine) { - super.setMachine(machine); - } - - public A_StarPathGenerator() { - super(); - } - - @Override - public String[] getNext() throws InterruptedException { - Util.AbortIf(!hasNext(), "Finished"); - if (lastVertex == null || lastVertex != getMachine().getCurrentVertex() || preCalculatedPath == null || preCalculatedPath.size() == 0) { - boolean oldCalculatingPathValue = getMachine().isCalculatingPath(); - getMachine().setCalculatingPath(true); - - preCalculatedPath = a_star(); - - getMachine().setCalculatingPath(oldCalculatingPathValue); - - if (preCalculatedPath == null) { - throw new RuntimeException("No path found to " + this.getStopCondition()); - } - - // reverse path - Stack temp = new Stack(); - while (preCalculatedPath.size() > 0) { - temp.push(preCalculatedPath.pop()); - } - preCalculatedPath = temp; - } - - Edge edge = preCalculatedPath.pop(); - getMachine().walkEdge(edge); - lastVertex = getMachine().getCurrentVertex(); - String[] retur = { getMachine().getEdgeName(edge), getMachine().getCurrentVertexName() }; - return retur; - } - - @SuppressWarnings("unchecked") - private Stack a_star() throws InterruptedException { - Vector closed = new Vector(); - - PriorityQueue a_starPath = new PriorityQueue(10, new Comparator() { - @Override - public int compare(WeightedPath arg0, WeightedPath arg1) { - int retur = Double.compare(arg0.getWeight(), arg1.getWeight()); - if (retur == 0) - retur = arg0.getPath().size() - arg1.getPath().size(); - return retur; - } - }); - - Set availableOutEdges; - try { - availableOutEdges = getMachine().getCurrentOutEdges(); - } catch (FoundNoEdgeException e) { - throw new RuntimeException("No available edges found at " + getMachine().getCurrentVertexName(), e); - } - for (Edge edge : availableOutEdges) { - Stack path = new Stack(); - path.push(edge); - a_starPath.add(getWeightedPath(path)); - } - double maxWeight = 0; - while (a_starPath.size() > 0) { - if (Thread.interrupted()) { - throw new InterruptedException(); - } - - WeightedPath path = a_starPath.poll(); - if (path.getWeight() > maxWeight) - maxWeight = path.getWeight(); - if (path.getWeight() > 0.99999) // are we done yet? - return path.getPath(); - - Edge possibleDuplicate = path.getPath().peek(); - - // have we been here before? - if (closed.contains(possibleDuplicate.hashCode() + "." + path.getSubState().hashCode() + "." + path.getWeight())) - continue; // ignore this and move on - - // We don't want to use this edge again as this path is - // the fastest, and if we come here again we have used more - // steps to get here than we used this time. - closed.add(possibleDuplicate.hashCode() + "." + path.getSubState().hashCode() + "." + path.getWeight()); - - availableOutEdges = getPathOutEdges(path.getPath()); - if (availableOutEdges != null && availableOutEdges.size() > 0) { - for (Edge edge : availableOutEdges) { - Stack newStack = (Stack) path.getPath().clone(); - newStack.push(edge); - a_starPath.add(getWeightedPath(newStack)); - } - } - } - throw new RuntimeException("No path found to satisfy stop condition " + getStopCondition() + ", best path satified only " - + (int) (maxWeight * 100) + "% of condition."); - } - - private WeightedPath getWeightedPath(Stack path) { - double weight = 0; - String subState = ""; - - getMachine().storeVertex(); - getMachine().walkPath(path); - weight = getConditionFulfilment(); - String currentState = getMachine().getCurrentVertexName(); - if (currentState.contains("/")) { - subState = currentState.split("/", 2)[1]; - } - getMachine().restoreVertex(); - - return new WeightedPath(path, weight, subState); - } - - private Set getPathOutEdges(Stack path) { - Set retur = null; - getMachine().storeVertex(); - getMachine().walkPath(path); - try { - retur = getMachine().getCurrentOutEdges(); - } catch (FoundNoEdgeException e) { - // no edges found? degrade gracefully and return the default value of - // null. - } - getMachine().restoreVertex(); - return retur; - } - - /** - * Will reset the generator to its initial vertex. - */ - @Override - public void reset() { - preCalculatedPath = null; - } - - @Override - public String toString() { - return "A_STAR{" + super.toString() + "}"; - } - - private static class WeightedPath { - private double weight; - private Stack path; - private String subState; - - public String getSubState() { - return subState; - } - - public void setSubState(String subState) { - this.subState = subState; - } - - public Stack getPath() { - return path; - } - - public void setPath(Stack path) { - this.path = path; - } - - public double getWeight() { - return weight; - } - - public void setWeight(double weight) { - this.weight = weight; - } - - public WeightedPath(Stack path, double weight, String subState) { - setPath(path); - setWeight(weight); - setSubState(subState); - } - } +import java.util.*; + +public class A_StarPathGenerator extends AbstractPathGenerator { + + public A_StarPathGenerator(StopCondition stopCondition) { + super(stopCondition); + } + + private Stack preCalculatedPath = null; + private Vertex lastVertex; + + @Override + public void setMachine(FiniteStateMachine machine) { + super.setMachine(machine); + } + + public A_StarPathGenerator() { + super(); + } + + @Override + public String[] getNext() throws InterruptedException { + Util.AbortIf(!hasNext(), "Finished"); + if (lastVertex == null || lastVertex != getMachine().getCurrentVertex() || preCalculatedPath == null || preCalculatedPath.size() == 0) { + boolean oldCalculatingPathValue = getMachine().isCalculatingPath(); + getMachine().setCalculatingPath(true); + + preCalculatedPath = a_star(); + + getMachine().setCalculatingPath(oldCalculatingPathValue); + + if (preCalculatedPath == null) { + throw new RuntimeException("No path found to " + this.getStopCondition()); + } + + // reverse path + Stack temp = new Stack(); + while (preCalculatedPath.size() > 0) { + temp.push(preCalculatedPath.pop()); + } + preCalculatedPath = temp; + } + + Edge edge = preCalculatedPath.pop(); + getMachine().walkEdge(edge); + lastVertex = getMachine().getCurrentVertex(); + String[] retur = {getMachine().getEdgeName(edge), getMachine().getCurrentVertexName()}; + return retur; + } + + @SuppressWarnings("unchecked") + private Stack a_star() throws InterruptedException { + Vector closed = new Vector(); + + PriorityQueue a_starPath = new PriorityQueue(10, new Comparator() { + @Override + public int compare(WeightedPath arg0, WeightedPath arg1) { + int retur = Double.compare(arg0.getWeight(), arg1.getWeight()); + if (retur == 0) + retur = arg0.getPath().size() - arg1.getPath().size(); + return retur; + } + }); + + Set availableOutEdges; + try { + availableOutEdges = getMachine().getCurrentOutEdges(); + } catch (FoundNoEdgeException e) { + throw new RuntimeException("No available edges found at " + getMachine().getCurrentVertexName(), e); + } + for (Edge edge : availableOutEdges) { + Stack path = new Stack(); + path.push(edge); + a_starPath.add(getWeightedPath(path)); + } + double maxWeight = 0; + while (a_starPath.size() > 0) { + if (Thread.interrupted()) { + throw new InterruptedException(); + } + + WeightedPath path = a_starPath.poll(); + if (path.getWeight() > maxWeight) + maxWeight = path.getWeight(); + if (path.getWeight() > 0.99999) // are we done yet? + return path.getPath(); + + Edge possibleDuplicate = path.getPath().peek(); + + // have we been here before? + if (closed.contains(possibleDuplicate.hashCode() + "." + path.getSubState().hashCode() + "." + path.getWeight())) + continue; // ignore this and move on + + // We don't want to use this edge again as this path is + // the fastest, and if we come here again we have used more + // steps to get here than we used this time. + closed.add(possibleDuplicate.hashCode() + "." + path.getSubState().hashCode() + "." + path.getWeight()); + + availableOutEdges = getPathOutEdges(path.getPath()); + if (availableOutEdges != null && availableOutEdges.size() > 0) { + for (Edge edge : availableOutEdges) { + Stack newStack = (Stack) path.getPath().clone(); + newStack.push(edge); + a_starPath.add(getWeightedPath(newStack)); + } + } + } + throw new RuntimeException("No path found to satisfy stop condition " + getStopCondition() + ", best path satified only " + + (int) (maxWeight * 100) + "% of condition."); + } + + private WeightedPath getWeightedPath(Stack path) { + double weight = 0; + String subState = ""; + + getMachine().storeVertex(); + getMachine().walkPath(path); + weight = getConditionFulfilment(); + String currentState = getMachine().getCurrentVertexName(); + if (currentState.contains("/")) { + subState = currentState.split("/", 2)[1]; + } + getMachine().restoreVertex(); + + return new WeightedPath(path, weight, subState); + } + + private Set getPathOutEdges(Stack path) { + Set retur = null; + getMachine().storeVertex(); + getMachine().walkPath(path); + try { + retur = getMachine().getCurrentOutEdges(); + } catch (FoundNoEdgeException e) { + // no edges found? degrade gracefully and return the default value of + // null. + } + getMachine().restoreVertex(); + return retur; + } + + /** + * Will reset the generator to its initial vertex. + */ + @Override + public void reset() { + preCalculatedPath = null; + } + + @Override + public String toString() { + return "A_STAR{" + super.toString() + "}"; + } + + private static class WeightedPath { + private double weight; + private Stack path; + private String subState; + + public String getSubState() { + return subState; + } + + public void setSubState(String subState) { + this.subState = subState; + } + + public Stack getPath() { + return path; + } + + public void setPath(Stack path) { + this.path = path; + } + + public double getWeight() { + return weight; + } + + public void setWeight(double weight) { + this.weight = weight; + } + + public WeightedPath(Stack path, double weight, String subState) { + setPath(path); + setWeight(weight); + setSubState(subState); + } + } } \ No newline at end of file diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/AbstractPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/AbstractPathGenerator.java new file mode 100644 index 00000000..caf6c1c0 --- /dev/null +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/AbstractPathGenerator.java @@ -0,0 +1,105 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker.core.generators; + +import org.graphwalker.core.conditions.StopCondition; +import org.graphwalker.core.exceptions.FoundNoEdgeException; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.machines.FiniteStateMachine; + +import java.util.Set; + +public abstract class AbstractPathGenerator implements PathGenerator { + + private FiniteStateMachine machine; + private StopCondition stopCondition; + + public abstract String[] getNext() throws InterruptedException; + + public AbstractPathGenerator() { + } + + public AbstractPathGenerator(StopCondition stopCondition) { + this.stopCondition = stopCondition; + } + + public boolean hasNext() { + return !stopCondition.isFulfilled(); + } + + public FiniteStateMachine getMachine() { + return machine; + } + + public void setMachine(FiniteStateMachine machine) { + this.machine = machine; + if (this.stopCondition != null) { + this.stopCondition.setMachine(machine); + } + } + + public void setStopCondition(StopCondition stopCondition) { + this.stopCondition = stopCondition; + if (this.machine != null) { + this.stopCondition.setMachine(this.machine); + } + } + + public StopCondition getStopCondition() { + return stopCondition; + } + + /** + * @return the condition fulfilment + */ + public double getConditionFulfilment() { + return stopCondition.getFulfilment(); + } + + /** + * Will reset the generator to its initial vertex. + */ + public void reset() { + } + + @Override + public String toString() { + if (getStopCondition() != null) + return getStopCondition().toString(); + return ""; + } + + public boolean isEdgeAvailable(Edge edge) { + Set availableEdges; + try { + availableEdges = getMachine().getCurrentOutEdges(); + } catch (FoundNoEdgeException e) { + throw new RuntimeException("No possible edges available for path", e); + } + return availableEdges.contains(edge); + + } +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java index bef495e6..123877b6 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java @@ -26,180 +26,175 @@ package org.graphwalker.core.generators; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Random; -import java.util.Set; - import org.apache.log4j.Logger; import org.graphwalker.core.Util; import org.graphwalker.core.conditions.StopCondition; import org.graphwalker.core.exceptions.FoundNoEdgeException; import org.graphwalker.core.graph.Edge; +import java.util.*; + /** * The generator generates paths through the model in a way that makes sure all * path permutations of ever increasing depth is tested. - * + *

* The first pass through the model finishes when a cycle in the model is found. * The second pass traverses the model until all edges have been visited twice * or more. The third pass traverses the model until all available combinations * of 2 edges have been visited twice or more . . . The n:th pass traverses the * model until all available combinations of n edges have been visited twice or * more - * + *

* The algorithm always tries the "path less traveled" where a path is a list of * n edges. If several paths are available with the same number of traversals on * is chosen by random. */ -public class AllPathPermutationsGenerator extends PathGenerator { - - private static Logger logger = Util.setupLogger(AllPathPermutationsGenerator.class); - - private final Random random = new Random(); - - /* Contains all walked paths for a specific depth */ - private final HashMap pathWalked = new HashMap(); - - /* List of edges comprising the current path */ - private final List savedEdges = new ArrayList(); - - private int currentDepth; - - public AllPathPermutationsGenerator(final StopCondition stopCondition) { - super(stopCondition); - currentDepth = 0; - } - - public AllPathPermutationsGenerator() { - super(); - currentDepth = 0; - } - - @Override - public String[] getNext() throws InterruptedException { - Set availableEdges; - - try { - availableEdges = getMachine().getCurrentOutEdges(); - } catch (FoundNoEdgeException e) { - throw new RuntimeException("No possible edges available for path", e); - } - - Set selectedEdges = new HashSet(); - int fewestVisits = -1; - - // Loop through available edges and pick the one which results in a path - // least traversed. - for (Edge edge : availableEdges) { - - // Add available edge to the current path - savedEdges.add(edge); - - // Has it been traversed before and if so how many times - Integer hashValue = pathWalked.get(savedEdges.hashCode()); - - // Never walked path - if (hashValue == null) { - fewestVisits = 0; - selectedEdges.add(edge); - - // Has been traversed but fewer times - } else if (hashValue < fewestVisits || fewestVisits == -1) { - fewestVisits = hashValue; - selectedEdges.clear(); - selectedEdges.add(edge); - - // Has been traversed but equal times - } else if (hashValue == fewestVisits) { - selectedEdges.add(edge); - } - - // Remove the edge from the current path - savedEdges.remove(edge); - } - Edge selectedEdge = getRandomEdge(selectedEdges); - - // Add the selected edge to the current path - savedEdges.add(selectedEdge); - - // Update number of traversals of this path - pathWalked.put(savedEdges.hashCode(), fewestVisits + 1); - - // Check if all paths have been traversed twice or more - // If so, increase the length of the path by 1 and clear the hash - if (checkCompletion()) { - currentDepth++; - AllPathPermutationsGenerator.logger.debug("All combinations done, changing look back depth to: " + currentDepth); - pathWalked.clear(); - } else if (currentDepth == 0 && checkCompletionFirst()) { - currentDepth++; - AllPathPermutationsGenerator.logger.debug("Cycle detected, starting algorithm with depth: " + currentDepth); - pathWalked.clear(); - savedEdges.remove(0); - - // If not, remove the first edge in the path - } else { - savedEdges.remove(0); - } - - getMachine().walkEdge(selectedEdge); - AllPathPermutationsGenerator.logger.debug(selectedEdge.getFullLabelKey()); - AllPathPermutationsGenerator.logger.debug(selectedEdge); - AllPathPermutationsGenerator.logger.trace("Current Path: " + printPath()); - AllPathPermutationsGenerator.logger.debug("Hash size: " + pathWalked.size()); - AllPathPermutationsGenerator.logger.trace("Hash: " + printHash()); - return new String[] { getMachine().getEdgeName(selectedEdge), getMachine().getCurrentVertexName() }; - } - - private boolean checkCompletionFirst() { - for (Integer value : pathWalked.values()) { - if (value == 2) { - return true; - } - } - return false; - } - - private boolean checkCompletion() { - for (Integer value : pathWalked.values()) { - if (value == 1) { - return false; - } - } - return true; - } - - private String printPath() { - StringBuilder stringBuilder = new StringBuilder(); - for (Edge edge : savedEdges) { - stringBuilder.append(edge.getFullLabelKey()); - } - return stringBuilder.toString(); - } - - private String printHash() { - StringBuilder stringBuilder = new StringBuilder(); - for (Integer value : pathWalked.values()) { - stringBuilder.append(value); - stringBuilder.append(" "); - } - return stringBuilder.toString(); - - } - - private Edge getRandomEdge(final Set availableEdges) { - return (Edge) availableEdges.toArray()[random.nextInt(availableEdges.size())]; - } - - @Override - public String toString() { - return "COMBINATIONS{" + super.toString() + "}"; - } - - public int getDepth() { - return currentDepth; - } +public class AllPathPermutationsGenerator extends AbstractPathGenerator { + + private static Logger logger = Util.setupLogger(AllPathPermutationsGenerator.class); + + private final Random random = new Random(); + + /* Contains all walked paths for a specific depth */ + private final HashMap pathWalked = new HashMap(); + + /* List of edges comprising the current path */ + private final List savedEdges = new ArrayList(); + + private int currentDepth; + + public AllPathPermutationsGenerator(final StopCondition stopCondition) { + super(stopCondition); + currentDepth = 0; + } + + public AllPathPermutationsGenerator() { + super(); + currentDepth = 0; + } + + @Override + public String[] getNext() throws InterruptedException { + Set availableEdges; + + try { + availableEdges = getMachine().getCurrentOutEdges(); + } catch (FoundNoEdgeException e) { + throw new RuntimeException("No possible edges available for path", e); + } + + Set selectedEdges = new HashSet(); + int fewestVisits = -1; + + // Loop through available edges and pick the one which results in a path + // least traversed. + for (Edge edge : availableEdges) { + + // Add available edge to the current path + savedEdges.add(edge); + + // Has it been traversed before and if so how many times + Integer hashValue = pathWalked.get(savedEdges.hashCode()); + + // Never walked path + if (hashValue == null) { + fewestVisits = 0; + selectedEdges.add(edge); + + // Has been traversed but fewer times + } else if (hashValue < fewestVisits || fewestVisits == -1) { + fewestVisits = hashValue; + selectedEdges.clear(); + selectedEdges.add(edge); + + // Has been traversed but equal times + } else if (hashValue == fewestVisits) { + selectedEdges.add(edge); + } + + // Remove the edge from the current path + savedEdges.remove(edge); + } + Edge selectedEdge = getRandomEdge(selectedEdges); + + // Add the selected edge to the current path + savedEdges.add(selectedEdge); + + // Update number of traversals of this path + pathWalked.put(savedEdges.hashCode(), fewestVisits + 1); + + // Check if all paths have been traversed twice or more + // If so, increase the length of the path by 1 and clear the hash + if (checkCompletion()) { + currentDepth++; + AllPathPermutationsGenerator.logger.debug("All combinations done, changing look back depth to: " + currentDepth); + pathWalked.clear(); + } else if (currentDepth == 0 && checkCompletionFirst()) { + currentDepth++; + AllPathPermutationsGenerator.logger.debug("Cycle detected, starting algorithm with depth: " + currentDepth); + pathWalked.clear(); + savedEdges.remove(0); + + // If not, remove the first edge in the path + } else { + savedEdges.remove(0); + } + + getMachine().walkEdge(selectedEdge); + AllPathPermutationsGenerator.logger.debug(selectedEdge.getFullLabelKey()); + AllPathPermutationsGenerator.logger.debug(selectedEdge); + AllPathPermutationsGenerator.logger.trace("Current Path: " + printPath()); + AllPathPermutationsGenerator.logger.debug("Hash size: " + pathWalked.size()); + AllPathPermutationsGenerator.logger.trace("Hash: " + printHash()); + return new String[]{getMachine().getEdgeName(selectedEdge), getMachine().getCurrentVertexName()}; + } + + private boolean checkCompletionFirst() { + for (Integer value : pathWalked.values()) { + if (value == 2) { + return true; + } + } + return false; + } + + private boolean checkCompletion() { + for (Integer value : pathWalked.values()) { + if (value == 1) { + return false; + } + } + return true; + } + + private String printPath() { + StringBuilder stringBuilder = new StringBuilder(); + for (Edge edge : savedEdges) { + stringBuilder.append(edge.getFullLabelKey()); + } + return stringBuilder.toString(); + } + + private String printHash() { + StringBuilder stringBuilder = new StringBuilder(); + for (Integer value : pathWalked.values()) { + stringBuilder.append(value); + stringBuilder.append(" "); + } + return stringBuilder.toString(); + + } + + private Edge getRandomEdge(final Set availableEdges) { + return (Edge) availableEdges.toArray()[random.nextInt(availableEdges.size())]; + } + + @Override + public String toString() { + return "COMBINATIONS{" + super.toString() + "}"; + } + + public int getDepth() { + return currentDepth; + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java index 8edf8e98..b435a9ec 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java @@ -40,7 +40,7 @@ * 'Vertex'.
*
* Below is an example of a template. - * + *

*

  * /**
  * * This method implements the {EDGE_VERTEX} '{LABEL}'
@@ -54,42 +54,42 @@
  */
 public class CodeGenerator extends ListGenerator {
 
-	public CodeGenerator(StopCondition stopCondition) {
-		super(stopCondition);
-	}
+    public CodeGenerator(StopCondition stopCondition) {
+        super(stopCondition);
+    }
 
-	public CodeGenerator() {
-		super();
-	}
+    public CodeGenerator() {
+        super();
+    }
 
-	private String[] template; // {HEADER, BODY, FOOTER}
-	private boolean first = true;
+    private String[] template; // {HEADER, BODY, FOOTER}
+    private boolean first = true;
 
-	public void setTemplate(String[] template) {
-		this.template = template.clone();
-	}
+    public void setTemplate(String[] template) {
+        this.template = template.clone();
+    }
 
-	@Override
-	public String[] getNext() {
-		String[] retur = super.getNext();
-		if (retur[0].isEmpty()) {
-			retur[1] = "";
-			return retur;
-		}
-		retur[0] = (first && template[0].length() > 0 ? template[0] + "\n" : "")
-		    + // HEADER
-		    template[1]
-		        // BODY
-		        .replaceAll("\\{LABEL\\}", retur[0]).replaceAll("\\{EDGE_VERTEX\\}", retur[1])
-		        .replaceAll("\\{DESCRIPTION\\}", retur[2].replaceAll("\n", "\n   * "))
-		    + (!hasNext() && template[2].length() > 0 ? "\n" + template[2] : ""); // FOOTER
-		retur[1] = "";
-		first = false;
-		return retur;
-	}
+    @Override
+    public String[] getNext() {
+        String[] retur = super.getNext();
+        if (retur[0].isEmpty()) {
+            retur[1] = "";
+            return retur;
+        }
+        retur[0] = (first && template[0].length() > 0 ? template[0] + "\n" : "")
+                + // HEADER
+                template[1]
+                        // BODY
+                        .replaceAll("\\{LABEL\\}", retur[0]).replaceAll("\\{EDGE_VERTEX\\}", retur[1])
+                        .replaceAll("\\{DESCRIPTION\\}", retur[2].replaceAll("\n", "\n   * "))
+                + (!hasNext() && template[2].length() > 0 ? "\n" + template[2] : ""); // FOOTER
+        retur[1] = "";
+        first = false;
+        return retur;
+    }
 
-	@Override
-	public String toString() {
-		return "CODE";
-	}
+    @Override
+    public String toString() {
+        return "CODE";
+    }
 }
diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java
index 4d246f56..a642225f 100644
--- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java
+++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java
@@ -26,93 +26,93 @@
 
 package org.graphwalker.core.generators;
 
-import java.util.Vector;
-
 import org.apache.log4j.Logger;
 import org.graphwalker.core.conditions.StopCondition;
 import org.graphwalker.core.machines.FiniteStateMachine;
 
-public class CombinedPathGenerator extends PathGenerator {
-
-	private static Logger logger = Logger.getLogger(CombinedPathGenerator.class);
-
-	private Vector generatorList = new Vector();
-	private int currentGenerator = 0;
-
-	public CombinedPathGenerator() {
-		super();
-	}
-
-	public CombinedPathGenerator(StopCondition stopCondition) {
-		super(stopCondition);
-	}
-
-	public void addPathGenerator(PathGenerator generator) {
-		logger.debug("Adding PathGenerator: " + generator);
-		generatorList.add(generator);
-	}
-
-	@Override
-	public void setMachine(FiniteStateMachine machine) {
-		for (PathGenerator aGeneratorList : generatorList) {
-			aGeneratorList.setMachine(machine);
-		}
-	}
-
-	@Override
-	public void setStopCondition(StopCondition stopCondition) {
-		for (PathGenerator aGeneratorList : generatorList) {
-			aGeneratorList.setStopCondition(stopCondition);
-		}
-	}
-
-	private PathGenerator getActivePathGenerator() {
-		return generatorList.get(currentGenerator);
-	}
-
-	private boolean hasPath() {
-		return generatorList.size() > currentGenerator;
-	}
-
-	private void scrapActivePathGenerator() {
-		logger.debug("Removing PathGenerator: " + getActivePathGenerator());
-		currentGenerator++;
-	}
-
-	@Override
-	public boolean hasNext() {
-		boolean nextIsAvailable = false;
-		while (hasPath() && !nextIsAvailable) {
-			nextIsAvailable = getActivePathGenerator().hasNext();
-			if (!nextIsAvailable)
-				scrapActivePathGenerator();
-		}
-		return nextIsAvailable;
-	}
-
-	@Override
-	public String[] getNext() throws InterruptedException {
-		String[] retur = { "", "" };
-
-		boolean nextIsAvailable = false;
-		while (hasPath() && !nextIsAvailable) {
-			nextIsAvailable = getActivePathGenerator().hasNext();
-			if (!nextIsAvailable)
-				scrapActivePathGenerator();
-		}
-		if (!nextIsAvailable)
-			return retur;
-		return getActivePathGenerator().getNext();
-	}
-
-	@Override
-	public String toString() {
-		StringBuilder stringBuilder = new StringBuilder();
-		for (PathGenerator aGeneratorList : generatorList) {
-			stringBuilder.append(aGeneratorList.toString());
-			stringBuilder.append(System.getProperty("line.separator"));
-		}
-		return stringBuilder.toString().trim();
-	}
+import java.util.Vector;
+
+public class CombinedPathGenerator extends AbstractPathGenerator {
+
+    private static Logger logger = Logger.getLogger(CombinedPathGenerator.class);
+
+    private Vector generatorList = new Vector();
+    private int currentGenerator = 0;
+
+    public CombinedPathGenerator() {
+        super();
+    }
+
+    public CombinedPathGenerator(StopCondition stopCondition) {
+        super(stopCondition);
+    }
+
+    public void addPathGenerator(PathGenerator generator) {
+        logger.debug("Adding PathGenerator: " + generator);
+        generatorList.add(generator);
+    }
+
+    @Override
+    public void setMachine(FiniteStateMachine machine) {
+        for (PathGenerator aGeneratorList : generatorList) {
+            aGeneratorList.setMachine(machine);
+        }
+    }
+
+    @Override
+    public void setStopCondition(StopCondition stopCondition) {
+        for (PathGenerator aGeneratorList : generatorList) {
+            aGeneratorList.setStopCondition(stopCondition);
+        }
+    }
+
+    private PathGenerator getActivePathGenerator() {
+        return generatorList.get(currentGenerator);
+    }
+
+    private boolean hasPath() {
+        return generatorList.size() > currentGenerator;
+    }
+
+    private void scrapActivePathGenerator() {
+        logger.debug("Removing PathGenerator: " + getActivePathGenerator());
+        currentGenerator++;
+    }
+
+    @Override
+    public boolean hasNext() {
+        boolean nextIsAvailable = false;
+        while (hasPath() && !nextIsAvailable) {
+            nextIsAvailable = getActivePathGenerator().hasNext();
+            if (!nextIsAvailable)
+                scrapActivePathGenerator();
+        }
+        return nextIsAvailable;
+    }
+
+    @Override
+    public String[] getNext() throws InterruptedException {
+        String[] retur = {"", ""};
+
+        boolean nextIsAvailable = false;
+        while (hasPath() && !nextIsAvailable) {
+            nextIsAvailable = getActivePathGenerator().hasNext();
+            if (!nextIsAvailable)
+                scrapActivePathGenerator();
+        }
+        if (!nextIsAvailable)
+            return retur;
+        return getActivePathGenerator().getNext();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder stringBuilder = new StringBuilder();
+        for (PathGenerator aGeneratorList : generatorList) {
+            stringBuilder.append(aGeneratorList.toString());
+            stringBuilder.append(System.getProperty("line.separator"));
+        }
+        return stringBuilder.toString().trim();
+    }
 
 }
diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java
index 2bc69b32..f3fccc6f 100644
--- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java
+++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java
@@ -26,66 +26,66 @@
 
 package org.graphwalker.core.generators;
 
-import java.util.Comparator;
-import java.util.Stack;
-import java.util.TreeSet;
-import java.util.Vector;
-
 import org.graphwalker.core.Keywords;
 import org.graphwalker.core.conditions.StopCondition;
 import org.graphwalker.core.graph.AbstractElement;
 import org.graphwalker.core.graph.Edge;
 
-public class ListGenerator extends PathGenerator {
+import java.util.Comparator;
+import java.util.Stack;
+import java.util.TreeSet;
+import java.util.Vector;
+
+public class ListGenerator extends AbstractPathGenerator {
 
-	private Stack list = null;
+    private Stack list = null;
 
-	public ListGenerator(StopCondition stopCondition) {
-		super(stopCondition);
-	}
+    public ListGenerator(StopCondition stopCondition) {
+        super(stopCondition);
+    }
 
-	public ListGenerator() {
-		super();
-	}
+    public ListGenerator() {
+        super();
+    }
 
-	@Override
-	public boolean hasNext() {
-		if (list == null)
-			generateList();
-		return !list.isEmpty();
-	}
+    @Override
+    public boolean hasNext() {
+        if (list == null)
+            generateList();
+        return !list.isEmpty();
+    }
 
-	@Override
-	public String[] getNext() {
-		if (list == null)
-			generateList();
-		return list.pop();
-	}
+    @Override
+    public String[] getNext() {
+        if (list == null)
+            generateList();
+        return list.pop();
+    }
 
-	private void generateList() {
-		list = new Stack();
-		TreeSet tempList = new TreeSet(new Comparator() {
-			@Override
-			public int compare(String[] arg0, String[] arg1) {
-				return (arg1)[0].compareTo((arg0)[0]);
-			}
-		});
+    private void generateList() {
+        list = new Stack();
+        TreeSet tempList = new TreeSet(new Comparator() {
+            @Override
+            public int compare(String[] arg0, String[] arg1) {
+                return (arg1)[0].compareTo((arg0)[0]);
+            }
+        });
 
-		Vector abstractElements = new Vector();
-		abstractElements.addAll(getMachine().getAllVertices());
-		abstractElements.addAll(getMachine().getAllEdges());
+        Vector abstractElements = new Vector();
+        abstractElements.addAll(getMachine().getAllVertices());
+        abstractElements.addAll(getMachine().getAllEdges());
 
-		for (AbstractElement ae : abstractElements) {
-			if (!ae.getLabelKey().equalsIgnoreCase(Keywords.START_NODE)) {
-				String[] value = { ae.getLabelKey(), (ae instanceof Edge ? "Edge" : "Vertex"), ae.getDescriptionKey() };
-				tempList.add(value);
-			}
-		}
-		list.addAll(tempList);
-	}
+        for (AbstractElement ae : abstractElements) {
+            if (!ae.getLabelKey().equalsIgnoreCase(Keywords.START_NODE)) {
+                String[] value = {ae.getLabelKey(), (ae instanceof Edge ? "Edge" : "Vertex"), ae.getDescriptionKey()};
+                tempList.add(value);
+            }
+        }
+        list.addAll(tempList);
+    }
 
-	@Override
-	public String toString() {
-		return "LIST";
-	}
+    @Override
+    public String toString() {
+        return "LIST";
+    }
 }
diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java
index f8a6e19c..a93619ba 100644
--- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java
+++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java
@@ -26,116 +26,115 @@
 
 package org.graphwalker.core.generators;
 
-import java.util.List;
-import java.util.Vector;
-
+import edu.uci.ics.jung.algorithms.shortestpath.DijkstraShortestPath;
 import org.apache.log4j.Logger;
 import org.graphwalker.core.Util;
 import org.graphwalker.core.conditions.StopCondition;
 import org.graphwalker.core.graph.Edge;
 import org.graphwalker.core.graph.Vertex;
 
-import edu.uci.ics.jung.algorithms.shortestpath.DijkstraShortestPath;
+import java.util.List;
+import java.util.Vector;
 
 public class NonOptimizedShortestPath extends RandomPathGenerator {
 
-	private boolean toggleAllOrUnvisited = true;
-
-	public NonOptimizedShortestPath(StopCondition stopCondition) {
-		super(stopCondition);
-	}
-
-	private static Logger logger = Util.setupLogger(NonOptimizedShortestPath.class);
-	private List dijkstraShortestPath;
-
-	public NonOptimizedShortestPath() {
-		super();
-	}
-
-	@Override
-	public String[] getNext() throws InterruptedException {
-		Util.AbortIf(!hasNext(), "Finished");
-
-		if (Thread.interrupted()) {
-			throw new InterruptedException();
-		}
-		Edge edge = null;
-		do {
-			if (!setDijkstraPath()) {
-				return super.getNext();
-			}
-			edge = dijkstraShortestPath.remove(0);
-		} while (!isEdgeAvailable(edge));
-
-		getMachine().walkEdge(edge);
-		return new String[] { getMachine().getEdgeName(edge), getMachine().getCurrentVertexName() };
-	}
-
-	private boolean setDijkstraPath() {
-		// Is there a path to walk, given from DijkstraShortestPath?
-		if (dijkstraShortestPath == null || dijkstraShortestPath.size() == 0) {
-			Vector unvisitedEdges = getMachine().getUncoveredEdges();
-			logger.debug("Number of unvisited edges: " + unvisitedEdges.size());
-
-			Edge e = null;
-			if (unvisitedEdges.size() == 0) {
-				return false;
-			} else {
-				Object[] shuffledList = null;
-				if (toggleAllOrUnvisited) {
-					shuffledList = Util.shuffle(unvisitedEdges.toArray());
-				} else {
-					shuffledList = Util.shuffle(getMachine().getAllEdgesExceptStartEdge().toArray());
-				}
-				toggleAllOrUnvisited = !toggleAllOrUnvisited;
-
-				e = (Edge) shuffledList[0];
-			}
-
-			logger.debug("Current vertex: " + getMachine().getCurrentVertex());
-			logger.debug("Will try to reach unvisited edge: " + e);
-
-			dijkstraShortestPath = new DijkstraShortestPath(getMachine().getModel()).getPath(getMachine().getCurrentVertex(),
-			    getMachine().getModel().getSource(e));
-
-			// DijkstraShortestPath.getPath returns 0 if there is no way to reach the
-			// destination. But,
-			// DijkstraShortestPath.getPath also returns 0 paths if the the source and
-			// destination vertex are the same, even if there is
-			// an edge there (self-loop). So we have to check for that.
-			if (dijkstraShortestPath.size() == 0) {
-				if (!getMachine().getCurrentVertex().getIndexKey().equals(getMachine().getModel().getSource(e).getIndexKey())) {
-					if (!toggleAllOrUnvisited) {
-						String msg = "There is no way to reach: " + e + ", from: " + getMachine().getCurrentVertex();
-						logger.error(msg);
-						throw new RuntimeException(msg);
-					}
-				}
-			}
-
-			dijkstraShortestPath.add(e);
-			logger.debug("Dijkstra path length to that edge: " + dijkstraShortestPath.size());
-			logger.debug("Dijksta path:");
-			for (Edge object : dijkstraShortestPath) {
-				logger.debug("  " + object);
-			}
-		}
-		return true;
-	}
-
-	public void emptyCurrentPath() {
-		if (dijkstraShortestPath == null || dijkstraShortestPath.size() == 0) {
-			return;
-		}
-		dijkstraShortestPath = null;
-	}
-
-	@Override
-	public String toString() {
-		if (getStopCondition() == null) {
-			return "SHORTESTNONOPT";
-		} else {
-			return "SHORTESTNONOPT{" + getStopCondition().toString() + "}";
-		}
-	}
+    private boolean toggleAllOrUnvisited = true;
+
+    public NonOptimizedShortestPath(StopCondition stopCondition) {
+        super(stopCondition);
+    }
+
+    private static Logger logger = Util.setupLogger(NonOptimizedShortestPath.class);
+    private List dijkstraShortestPath;
+
+    public NonOptimizedShortestPath() {
+        super();
+    }
+
+    @Override
+    public String[] getNext() throws InterruptedException {
+        Util.AbortIf(!hasNext(), "Finished");
+
+        if (Thread.interrupted()) {
+            throw new InterruptedException();
+        }
+        Edge edge = null;
+        do {
+            if (!setDijkstraPath()) {
+                return super.getNext();
+            }
+            edge = dijkstraShortestPath.remove(0);
+        } while (!isEdgeAvailable(edge));
+
+        getMachine().walkEdge(edge);
+        return new String[]{getMachine().getEdgeName(edge), getMachine().getCurrentVertexName()};
+    }
+
+    private boolean setDijkstraPath() {
+        // Is there a path to walk, given from DijkstraShortestPath?
+        if (dijkstraShortestPath == null || dijkstraShortestPath.size() == 0) {
+            Vector unvisitedEdges = getMachine().getUncoveredEdges();
+            logger.debug("Number of unvisited edges: " + unvisitedEdges.size());
+
+            Edge e = null;
+            if (unvisitedEdges.size() == 0) {
+                return false;
+            } else {
+                Object[] shuffledList = null;
+                if (toggleAllOrUnvisited) {
+                    shuffledList = Util.shuffle(unvisitedEdges.toArray());
+                } else {
+                    shuffledList = Util.shuffle(getMachine().getAllEdgesExceptStartEdge().toArray());
+                }
+                toggleAllOrUnvisited = !toggleAllOrUnvisited;
+
+                e = (Edge) shuffledList[0];
+            }
+
+            logger.debug("Current vertex: " + getMachine().getCurrentVertex());
+            logger.debug("Will try to reach unvisited edge: " + e);
+
+            dijkstraShortestPath = new DijkstraShortestPath(getMachine().getModel()).getPath(getMachine().getCurrentVertex(),
+                    getMachine().getModel().getSource(e));
+
+            // DijkstraShortestPath.getPath returns 0 if there is no way to reach the
+            // destination. But,
+            // DijkstraShortestPath.getPath also returns 0 paths if the the source and
+            // destination vertex are the same, even if there is
+            // an edge there (self-loop). So we have to check for that.
+            if (dijkstraShortestPath.size() == 0) {
+                if (!getMachine().getCurrentVertex().getIndexKey().equals(getMachine().getModel().getSource(e).getIndexKey())) {
+                    if (!toggleAllOrUnvisited) {
+                        String msg = "There is no way to reach: " + e + ", from: " + getMachine().getCurrentVertex();
+                        logger.error(msg);
+                        throw new RuntimeException(msg);
+                    }
+                }
+            }
+
+            dijkstraShortestPath.add(e);
+            logger.debug("Dijkstra path length to that edge: " + dijkstraShortestPath.size());
+            logger.debug("Dijksta path:");
+            for (Edge object : dijkstraShortestPath) {
+                logger.debug("  " + object);
+            }
+        }
+        return true;
+    }
+
+    public void emptyCurrentPath() {
+        if (dijkstraShortestPath == null || dijkstraShortestPath.size() == 0) {
+            return;
+        }
+        dijkstraShortestPath = null;
+    }
+
+    @Override
+    public String toString() {
+        if (getStopCondition() == null) {
+            return "SHORTESTNONOPT";
+        } else {
+            return "SHORTESTNONOPT{" + getStopCondition().toString() + "}";
+        }
+    }
 }
diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java
index c0279a8f..ee9025cd 100644
--- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java
+++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java
@@ -26,80 +26,33 @@
 
 package org.graphwalker.core.generators;
 
-import java.util.Set;
-
 import org.graphwalker.core.conditions.StopCondition;
-import org.graphwalker.core.exceptions.FoundNoEdgeException;
 import org.graphwalker.core.graph.Edge;
 import org.graphwalker.core.machines.FiniteStateMachine;
 
-public abstract class PathGenerator {
-	private FiniteStateMachine machine;
-	private StopCondition stopCondition;
-
-	public abstract String[] getNext() throws InterruptedException;
-
-	public PathGenerator(StopCondition stopCondition) {
-		this.stopCondition = stopCondition;
-	}
-
-	public boolean hasNext() {
-		return !stopCondition.isFulfilled();
-	}
-
-	public FiniteStateMachine getMachine() {
-		return machine;
-	}
+public interface PathGenerator {
 
-	public void setMachine(FiniteStateMachine machine) {
-		this.machine = machine;
-		if (this.stopCondition != null) {
-			this.stopCondition.setMachine(machine);
-		}
-	}
+    String[] getNext() throws InterruptedException;
 
-	public void setStopCondition(StopCondition stopCondition) {
-		this.stopCondition = stopCondition;
-		if (this.machine != null) {
-			this.stopCondition.setMachine(this.machine);
-		}
-	}
+    boolean hasNext();
 
-	public StopCondition getStopCondition() {
-		return stopCondition;
-	}
+    FiniteStateMachine getMachine();
 
-	/**
-	 * @return the condition fulfilment
-	 */
-	public double getConditionFulfilment() {
-		return stopCondition.getFulfilment();
-	}
+    void setMachine(FiniteStateMachine machine);
 
-	/**
-	 * Will reset the generator to its initial vertex.
-	 */
-	public void reset() {
-	}
+    void setStopCondition(StopCondition stopCondition);
 
-	PathGenerator() {
-	}
+    StopCondition getStopCondition();
 
-	@Override
-	public String toString() {
-		if (getStopCondition() != null)
-			return getStopCondition().toString();
-		return "";
-	}
+    /**
+     * @return the condition fulfilment
+     */
+    double getConditionFulfilment();
 
-	protected boolean isEdgeAvailable(Edge edge) {
-		Set availableEdges;
-		try {
-			availableEdges = getMachine().getCurrentOutEdges();
-		} catch (FoundNoEdgeException e) {
-			throw new RuntimeException("No possible edges available for path", e);
-		}
-		return availableEdges.contains(edge);
+    /**
+     * Will reset the generator to its initial vertex.
+     */
+    void reset();
 
-	}
+    boolean isEdgeAvailable(Edge edge);
 }
diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java
index 98376121..9b23c0cd 100644
--- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java
+++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java
@@ -26,97 +26,100 @@
 
 package org.graphwalker.core.generators;
 
-import java.util.*;
-
 import org.apache.log4j.Logger;
 import org.graphwalker.core.Util;
 import org.graphwalker.core.conditions.StopCondition;
 import org.graphwalker.core.exceptions.FoundNoEdgeException;
 import org.graphwalker.core.graph.Edge;
 
-public class RandomPathGenerator extends PathGenerator {
-
-	private static Logger logger = Util.setupLogger(RandomPathGenerator.class);
-
-	private Random random = new Random();
-
-	public RandomPathGenerator(StopCondition stopCondition) {
-		super(stopCondition);
-	}
-
-	public RandomPathGenerator() {
-		super();
-	}
-
-	@Override
-	public String[] getNext() throws InterruptedException {
-		Set availableEdges;
-		try {
-			availableEdges = getMachine().getCurrentOutEdges();
-		} catch (FoundNoEdgeException e) {
-			throw new RuntimeException("No possible edges available for path", e);
-		}
-		if (Thread.interrupted()) {
-			throw new InterruptedException();
-		}
-		Edge edge = (getMachine().isWeighted() ? getWeightedEdge(availableEdges) : getRandomEdge(availableEdges));
-		getMachine().walkEdge(edge);
-		logger.debug(edge.getFullLabelKey());
-		logger.debug(edge);
-		return new String[] { getMachine().getEdgeName(edge), getMachine().getCurrentVertexName() };
-	}
-
-	private Edge getWeightedEdge(Set availableEdges) {
-
-		Map probabilities = new HashMap();
-		int numberOfZeros = 0;
-		double sum = 0;
-
-		for (Edge edge : availableEdges) {
-			if (edge.getWeightKey() > 0) {
-				probabilities.put(edge, (double) edge.getWeightKey());
-				sum += edge.getWeightKey();
-				if (sum > 1) {
-					throw new RuntimeException("The sum of all weights in edges from vertex: '"
-					    + getMachine().getModel().getSource(edge).getLabelKey() + "', adds up to more than 1.00");
-				}
-			} else {
-				numberOfZeros++;
-				probabilities.put(edge, 0d);
-			}
-		}
-
-		double rest = (1 - sum) / numberOfZeros;
-		int index = random.nextInt(100);
-		logger.debug("Randomized integer index = " + index);
-
-		double weight = 0;
-
-		for (Edge edge : availableEdges) {
-
-			if (probabilities.get(edge) == 0) {
-				probabilities.put(edge, rest);
-			}
-
-			logger.debug("The edge: '" + edge.getLabelKey() + "' is given the probability of " + probabilities.get(edge) * 100 + "%");
-
-			weight = weight + probabilities.get(edge) * 100;
-			logger.debug("Current weight is: " + weight);
-			if (index < weight) {
-				logger.debug("Selected edge is: " + edge);
-				return edge;
-			}
-		}
-
-		throw new RuntimeException("No edge found");
-	}
-
-	private Edge getRandomEdge(Set availableEdges) {
-		return (Edge) availableEdges.toArray()[random.nextInt(availableEdges.size())];
-	}
-
-	@Override
-	public String toString() {
-		return "RANDOM{" + super.toString() + "}";
-	}
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Random;
+import java.util.Set;
+
+public class RandomPathGenerator extends AbstractPathGenerator {
+
+    private static Logger logger = Util.setupLogger(RandomPathGenerator.class);
+
+    private Random random = new Random();
+
+    public RandomPathGenerator(StopCondition stopCondition) {
+        super(stopCondition);
+    }
+
+    public RandomPathGenerator() {
+        super();
+    }
+
+    @Override
+    public String[] getNext() throws InterruptedException {
+        Set availableEdges;
+        try {
+            availableEdges = getMachine().getCurrentOutEdges();
+        } catch (FoundNoEdgeException e) {
+            throw new RuntimeException("No possible edges available for path", e);
+        }
+        if (Thread.interrupted()) {
+            throw new InterruptedException();
+        }
+        Edge edge = (getMachine().isWeighted() ? getWeightedEdge(availableEdges) : getRandomEdge(availableEdges));
+        getMachine().walkEdge(edge);
+        logger.debug(edge.getFullLabelKey());
+        logger.debug(edge);
+        return new String[]{getMachine().getEdgeName(edge), getMachine().getCurrentVertexName()};
+    }
+
+    private Edge getWeightedEdge(Set availableEdges) {
+
+        Map probabilities = new HashMap();
+        int numberOfZeros = 0;
+        double sum = 0;
+
+        for (Edge edge : availableEdges) {
+            if (edge.getWeightKey() > 0) {
+                probabilities.put(edge, (double) edge.getWeightKey());
+                sum += edge.getWeightKey();
+                if (sum > 1) {
+                    throw new RuntimeException("The sum of all weights in edges from vertex: '"
+                            + getMachine().getModel().getSource(edge).getLabelKey() + "', adds up to more than 1.00");
+                }
+            } else {
+                numberOfZeros++;
+                probabilities.put(edge, 0d);
+            }
+        }
+
+        double rest = (1 - sum) / numberOfZeros;
+        int index = random.nextInt(100);
+        logger.debug("Randomized integer index = " + index);
+
+        double weight = 0;
+
+        for (Edge edge : availableEdges) {
+
+            if (probabilities.get(edge) == 0) {
+                probabilities.put(edge, rest);
+            }
+
+            logger.debug("The edge: '" + edge.getLabelKey() + "' is given the probability of " + probabilities.get(edge) * 100 + "%");
+
+            weight = weight + probabilities.get(edge) * 100;
+            logger.debug("Current weight is: " + weight);
+            if (index < weight) {
+                logger.debug("Selected edge is: " + edge);
+                return edge;
+            }
+        }
+
+        throw new RuntimeException("No edge found");
+    }
+
+    private Edge getRandomEdge(Set availableEdges) {
+        return (Edge) availableEdges.toArray()[random.nextInt(availableEdges.size())];
+    }
+
+    @Override
+    public String toString() {
+        return "RANDOM{" + super.toString() + "}";
+    }
 }
diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java
index 58c0213c..8be837ca 100644
--- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java
+++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java
@@ -26,73 +26,69 @@
 
 package org.graphwalker.core.generators;
 
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.Stack;
-import java.util.TreeSet;
-import java.util.Vector;
-
 import org.graphwalker.core.conditions.StopCondition;
 import org.graphwalker.core.graph.AbstractElement;
 
-public class RequirementsGenerator extends PathGenerator {
+import java.util.*;
+
+public class RequirementsGenerator extends AbstractPathGenerator {
 
-	private Stack list = null;
+    private Stack list = null;
 
-	public RequirementsGenerator(StopCondition stopCondition) {
-		super(stopCondition);
-	}
+    public RequirementsGenerator(StopCondition stopCondition) {
+        super(stopCondition);
+    }
 
-	public RequirementsGenerator() {
-		super();
-	}
+    public RequirementsGenerator() {
+        super();
+    }
 
-	@Override
-	public boolean hasNext() {
-		if (list == null) {
-			generateList();
-		}
-		return !list.isEmpty();
-	}
+    @Override
+    public boolean hasNext() {
+        if (list == null) {
+            generateList();
+        }
+        return !list.isEmpty();
+    }
 
-	@Override
-	public String[] getNext() {
-		if (list == null) {
-			generateList();
-		}
-		return list.pop();
-	}
+    @Override
+    public String[] getNext() {
+        if (list == null) {
+            generateList();
+        }
+        return list.pop();
+    }
 
-	private void generateList() {
-		list = new Stack();
-		TreeSet tempList = new TreeSet(new Comparator() {
-			@Override
-			public int compare(String[] arg0, String[] arg1) {
-				return arg1[0].compareTo(arg0[0]);
-			}
-		});
+    private void generateList() {
+        list = new Stack();
+        TreeSet tempList = new TreeSet(new Comparator() {
+            @Override
+            public int compare(String[] arg0, String[] arg1) {
+                return arg1[0].compareTo(arg0[0]);
+            }
+        });
 
-		Vector abstractElements = new Vector();
-		abstractElements.addAll(getMachine().getAllVertices());
-		abstractElements.addAll(getMachine().getAllEdges());
+        Vector abstractElements = new Vector();
+        abstractElements.addAll(getMachine().getAllVertices());
+        abstractElements.addAll(getMachine().getAllEdges());
 
-		for (Iterator i = abstractElements.iterator(); i.hasNext();) {
-			AbstractElement ae = i.next();
-			String reqtags = ae.getReqTagKey();
-			if (!reqtags.isEmpty()) {
-				String[] tags = reqtags.split(",");
-				for (int j = 0; j < tags.length; j++) {
-					String[] value = { tags[j], "" };
-					tempList.add(value);
-				}
-			}
-		}
-		list.addAll(tempList);
-	}
+        for (Iterator i = abstractElements.iterator(); i.hasNext(); ) {
+            AbstractElement ae = i.next();
+            String reqtags = ae.getReqTagKey();
+            if (!reqtags.isEmpty()) {
+                String[] tags = reqtags.split(",");
+                for (int j = 0; j < tags.length; j++) {
+                    String[] value = {tags[j], ""};
+                    tempList.add(value);
+                }
+            }
+        }
+        list.addAll(tempList);
+    }
 
-	@Override
-	public String toString() {
-		return "REQUIREMENTS";
-	}
+    @Override
+    public String toString() {
+        return "REQUIREMENTS";
+    }
 
 }
diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java
index 95ad663c..df48bf0e 100644
--- a/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java
+++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java
@@ -26,374 +26,373 @@
 
 package org.graphwalker.core.graph;
 
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
 import org.apache.log4j.Logger;
 import org.graphwalker.core.Keywords;
 import org.graphwalker.core.Util;
 
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 public class AbstractElement {
 
-	static Logger logger = Util.setupLogger(AbstractElement.class);
-	private String labelKey = "";
-	private String fullLabelKey = "";
-	private String reqTagKey = "";
-	private Integer reqTagResult = 0;
-	private String parameterKey = "";
-	private Integer visitedKey = 0;
-	private String actionsKey = "";
-	private Integer indexKey = 0;
-	private String idKey = "";
-	private String fileKey = "";
-	private boolean mergeKey = false;
-	private boolean noMergeKey = false;
-	private boolean blockedKey = false;
-	private String imageKey = "";
-	private boolean mergedMbtKey = false;
-	private String manualInstructions = "";
-	private String descriptionKey = "";
-
-	public AbstractElement() {
-	}
-
-	protected AbstractElement(AbstractElement ae) {
-		this.labelKey = ae.labelKey;
-		this.fullLabelKey = ae.fullLabelKey;
-		this.reqTagKey = ae.reqTagKey;
-		this.reqTagResult = ae.reqTagResult;
-		this.parameterKey = ae.parameterKey;
-		this.visitedKey = ae.visitedKey;
-		this.actionsKey = ae.actionsKey;
-		this.indexKey = ae.indexKey;
-		this.idKey = ae.idKey;
-		this.fileKey = ae.fileKey;
-		this.mergeKey = ae.mergeKey;
-		this.noMergeKey = ae.noMergeKey;
-		this.blockedKey = ae.blockedKey;
-		this.imageKey = ae.imageKey;
-		this.mergedMbtKey = ae.mergedMbtKey;
-		this.manualInstructions = ae.manualInstructions;
-		this.descriptionKey = ae.descriptionKey;
-	}
-
-	protected AbstractElement(AbstractElement A, AbstractElement B) {
-		if (A.fullLabelKey.length() > B.fullLabelKey.length()) {
-			this.labelKey = A.labelKey;
-			this.fullLabelKey = A.fullLabelKey;
-			this.reqTagKey = A.reqTagKey;
-			this.reqTagResult = A.reqTagResult;
-			this.parameterKey = A.parameterKey;
-			this.visitedKey = A.visitedKey;
-			this.actionsKey = A.actionsKey;
-			this.indexKey = A.indexKey;
-			this.idKey = A.idKey;
-			this.fileKey = A.fileKey;
-			this.mergeKey = A.mergeKey;
-			this.noMergeKey = A.noMergeKey;
-			this.blockedKey = A.blockedKey;
-			this.imageKey = A.imageKey;
-			this.mergedMbtKey = A.mergedMbtKey;
-			this.manualInstructions = A.manualInstructions;
-			this.descriptionKey = A.descriptionKey;
-		} else {
-			this.labelKey = B.labelKey;
-			this.fullLabelKey = B.fullLabelKey;
-			this.reqTagKey = B.reqTagKey;
-			this.reqTagResult = B.reqTagResult;
-			this.parameterKey = B.parameterKey;
-			this.visitedKey = B.visitedKey;
-			this.actionsKey = B.actionsKey;
-			this.indexKey = B.indexKey;
-			this.idKey = B.idKey;
-			this.fileKey = B.fileKey;
-			this.mergeKey = B.mergeKey;
-			this.noMergeKey = B.noMergeKey;
-			this.blockedKey = B.blockedKey;
-			this.imageKey = B.imageKey;
-			this.mergedMbtKey = B.mergedMbtKey;
-			this.manualInstructions = B.manualInstructions;
-			this.descriptionKey = B.descriptionKey;
-		}
-	}
-
-	public boolean isMergedMbtKey() {
-		return mergedMbtKey;
-	}
-
-	public void setMergedMbtKey(boolean mergedMbtKey) {
-		this.mergedMbtKey = mergedMbtKey;
-	}
-
-	public String getImageKey() {
-		return imageKey;
-	}
-
-	public void setImageKey(String imageKey) {
-		this.imageKey = imageKey;
-	}
-
-	public boolean isBlockedKey() {
-		return blockedKey;
-	}
-
-	public void setBlockedKey(boolean blockedKey) {
-		this.blockedKey = blockedKey;
-	}
-
-	public boolean isNoMergeKey() {
-		return noMergeKey;
-	}
-
-	public void setNoMergeKey(boolean noMergeKey) {
-		this.noMergeKey = noMergeKey;
-	}
-
-	public boolean isMergeKey() {
-		return mergeKey;
-	}
-
-	public void setMergeKey(boolean mergeKey) {
-		this.mergeKey = mergeKey;
-	}
-
-	public String getFileKey() {
-		return fileKey;
-	}
-
-	public void setFileKey(String fileKey) {
-		this.fileKey = fileKey;
-	}
-
-	public String getIdKey() {
-		return idKey;
-	}
-
-	public void setIdKey(String idKey) {
-		this.idKey = idKey;
-	}
-
-	public Integer getIndexKey() {
-		return indexKey;
-	}
-
-	public void setIndexKey(Integer indexKey) {
-		this.indexKey = indexKey;
-	}
-
-	public String getActionsKey() {
-		return actionsKey;
-	}
-
-	public void setActionsKey(String actionsKey) {
-		this.actionsKey = actionsKey;
-	}
-
-	public Integer getVisitedKey() {
-		return visitedKey;
-	}
-
-	public void setVisitedKey(Integer visitedKey) {
-		this.visitedKey = visitedKey;
-	}
-
-	public String getParameterKey() {
-		return parameterKey;
-	}
-
-	public void setParameterKey(String parameterKey) {
-		this.parameterKey = parameterKey;
-	}
-
-	public String getReqTagKey() {
-		return reqTagKey;
-	}
-
-	/**
-	 * Associates a requirement to the edge/vertex.
-	 * 
-	 * @param reqTagKey
-	 *          The requirement. It can be one or many, if many that are comma
-	 *          separated.
-	 */
-	public void setReqTagKey(String reqTagKey) {
-		this.reqTagKey = reqTagKey;
-	}
-
-	/**
-	 * @return 0 is the requirement is untested.
- * 1 if requirement tested ok
- * 2 if the requirement has failed the test. - */ - public Integer getReqTagResult() { - return reqTagResult; - } - - public void setReqTagResult(Integer reqTagResult) { - this.reqTagResult = reqTagResult; - } - - public String getFullLabelKey() { - return fullLabelKey; - } - - public void setFullLabelKey(String fullLabelKey) { - this.fullLabelKey = fullLabelKey; - } - - public String getLabelKey() { - return labelKey; - } - - public void setLabelKey(String labelKey) { - this.labelKey = labelKey; - } - - @Override - public String toString() { - return Util.getCompleteName(this); - } - - public String getManualInstructions() { - return manualInstructions; - } - - public void setManualInstructions(String attributeValue) { - this.manualInstructions = attributeValue; - } - - /** - * Parses for the MERGE keyword. If merge is defined, find it... If defined, - * it means that the node will be merged with all other nodes wit the same - * name, but not replaced by any subgraphs - * - * @param str - * @return - */ - static public Boolean isMerged(String str) { - Pattern p = Pattern.compile("\\n(MERGE)", Pattern.MULTILINE); - Matcher m = p.matcher(str); - if (m.find()) { - logger.debug("Found keyword MERGE"); - return true; - } - return false; - } - - /** - * If no merge is defined, find it... If defined, it means that when merging - * graphs, this specific vertex will not be merged or replaced by any - * subgraphs - * - * @param str - * @return - */ - static public Boolean isNoMerge(String str) { - Pattern p = Pattern.compile("\\n(NO_MERGE)", Pattern.MULTILINE); - Matcher m = p.matcher(str); - if (m.find()) { - logger.debug("Found keyword NO_MERGE"); - return true; - } - return false; - } - - /** - * If BLOCKED is defined, find it... If defined, it means that this vertex - * will not be added to the graph. Sometimes it can be useful during testing - * to mark vertices as BLOCKED due to bugs in the system you test. When the - * bug is removed, the BLOCKED tag can be removed. - * - * @param str - * @return - */ - static public Boolean isBlocked(String str) { - Pattern p = Pattern.compile("\\n(BLOCKED)", Pattern.MULTILINE); - Matcher m = p.matcher(str); - if (m.find()) { - logger.debug("Found keyword BLOCKED"); - return true; - } - return false; - } - - /** - * If INDEX is defined, find it... If defined, it means that this vertex has - * already a unique id generated by mbt before, so we use this instead.. - * - * @param str - * @return - */ - static public Integer getIndex(String str) { - Pattern p = Pattern.compile("\\n(INDEX=(.*))", Pattern.MULTILINE); - Matcher m = p.matcher(str); - if (m.find()) { - String index_key = m.group(2); - logger.debug("Found INDEX: " + index_key); - return Integer.valueOf(index_key); - } - return 0; - } - - /** - * If the REQTAG is defined, find it... - * - * @param str - * @return - */ - static public String getReqTags(String str) { - Pattern p = Pattern.compile("\\n(REQTAG=(.*))", Pattern.MULTILINE); - Matcher m = p.matcher(str); - if (m.find()) { - String value = m.group(2); - p = Pattern.compile("([^,]+)", Pattern.MULTILINE); - m = p.matcher(value); - String reqtags = ""; - while (m.find()) { - String reqtag = m.group(1); - reqtag = reqtag.trim(); - if (reqtags.length() == 0) { - reqtags = reqtag; - } else { - reqtags += "," + reqtag; - } - } - logger.debug("Found REQTAG: " + reqtags); - return reqtags; - } - return ""; - } - - public void setDesctiptionKey(String str) { - this.descriptionKey = str; - } - - public String getDescriptionKey() { - return this.descriptionKey; - } - - public String getDescription(String str) { - Pattern p; - Matcher m; - String label = ""; - p = Pattern.compile("\\<\\!\\[CDATA\\[.*\\]\\]\\>\\", Pattern.MULTILINE); - { - m = p.matcher(str); - if (m.find()) { - label = m.group(1); - if (label.length() <= 0) { - throw new RuntimeException("Vertex is missing mandatory label"); - } - if (label.matches(".*[\\s].*")) { - throw new RuntimeException("Label of vertex: '" + label + "', containing whitespaces"); - } - if (Keywords.isKeyWord(label)) { - throw new RuntimeException("The label of vertex: '" + label + "', is a reserved keyword"); - } - } else { - throw new RuntimeException("Label must be defined for vertex"); - } - return label; - } - } + static Logger logger = Util.setupLogger(AbstractElement.class); + private String labelKey = ""; + private String fullLabelKey = ""; + private String reqTagKey = ""; + private Integer reqTagResult = 0; + private String parameterKey = ""; + private Integer visitedKey = 0; + private String actionsKey = ""; + private Integer indexKey = 0; + private String idKey = ""; + private String fileKey = ""; + private boolean mergeKey = false; + private boolean noMergeKey = false; + private boolean blockedKey = false; + private String imageKey = ""; + private boolean mergedMbtKey = false; + private String manualInstructions = ""; + private String descriptionKey = ""; + + public AbstractElement() { + } + + protected AbstractElement(AbstractElement ae) { + this.labelKey = ae.labelKey; + this.fullLabelKey = ae.fullLabelKey; + this.reqTagKey = ae.reqTagKey; + this.reqTagResult = ae.reqTagResult; + this.parameterKey = ae.parameterKey; + this.visitedKey = ae.visitedKey; + this.actionsKey = ae.actionsKey; + this.indexKey = ae.indexKey; + this.idKey = ae.idKey; + this.fileKey = ae.fileKey; + this.mergeKey = ae.mergeKey; + this.noMergeKey = ae.noMergeKey; + this.blockedKey = ae.blockedKey; + this.imageKey = ae.imageKey; + this.mergedMbtKey = ae.mergedMbtKey; + this.manualInstructions = ae.manualInstructions; + this.descriptionKey = ae.descriptionKey; + } + + protected AbstractElement(AbstractElement A, AbstractElement B) { + if (A.fullLabelKey.length() > B.fullLabelKey.length()) { + this.labelKey = A.labelKey; + this.fullLabelKey = A.fullLabelKey; + this.reqTagKey = A.reqTagKey; + this.reqTagResult = A.reqTagResult; + this.parameterKey = A.parameterKey; + this.visitedKey = A.visitedKey; + this.actionsKey = A.actionsKey; + this.indexKey = A.indexKey; + this.idKey = A.idKey; + this.fileKey = A.fileKey; + this.mergeKey = A.mergeKey; + this.noMergeKey = A.noMergeKey; + this.blockedKey = A.blockedKey; + this.imageKey = A.imageKey; + this.mergedMbtKey = A.mergedMbtKey; + this.manualInstructions = A.manualInstructions; + this.descriptionKey = A.descriptionKey; + } else { + this.labelKey = B.labelKey; + this.fullLabelKey = B.fullLabelKey; + this.reqTagKey = B.reqTagKey; + this.reqTagResult = B.reqTagResult; + this.parameterKey = B.parameterKey; + this.visitedKey = B.visitedKey; + this.actionsKey = B.actionsKey; + this.indexKey = B.indexKey; + this.idKey = B.idKey; + this.fileKey = B.fileKey; + this.mergeKey = B.mergeKey; + this.noMergeKey = B.noMergeKey; + this.blockedKey = B.blockedKey; + this.imageKey = B.imageKey; + this.mergedMbtKey = B.mergedMbtKey; + this.manualInstructions = B.manualInstructions; + this.descriptionKey = B.descriptionKey; + } + } + + public boolean isMergedMbtKey() { + return mergedMbtKey; + } + + public void setMergedMbtKey(boolean mergedMbtKey) { + this.mergedMbtKey = mergedMbtKey; + } + + public String getImageKey() { + return imageKey; + } + + public void setImageKey(String imageKey) { + this.imageKey = imageKey; + } + + public boolean isBlockedKey() { + return blockedKey; + } + + public void setBlockedKey(boolean blockedKey) { + this.blockedKey = blockedKey; + } + + public boolean isNoMergeKey() { + return noMergeKey; + } + + public void setNoMergeKey(boolean noMergeKey) { + this.noMergeKey = noMergeKey; + } + + public boolean isMergeKey() { + return mergeKey; + } + + public void setMergeKey(boolean mergeKey) { + this.mergeKey = mergeKey; + } + + public String getFileKey() { + return fileKey; + } + + public void setFileKey(String fileKey) { + this.fileKey = fileKey; + } + + public String getIdKey() { + return idKey; + } + + public void setIdKey(String idKey) { + this.idKey = idKey; + } + + public Integer getIndexKey() { + return indexKey; + } + + public void setIndexKey(Integer indexKey) { + this.indexKey = indexKey; + } + + public String getActionsKey() { + return actionsKey; + } + + public void setActionsKey(String actionsKey) { + this.actionsKey = actionsKey; + } + + public Integer getVisitedKey() { + return visitedKey; + } + + public void setVisitedKey(Integer visitedKey) { + this.visitedKey = visitedKey; + } + + public String getParameterKey() { + return parameterKey; + } + + public void setParameterKey(String parameterKey) { + this.parameterKey = parameterKey; + } + + public String getReqTagKey() { + return reqTagKey; + } + + /** + * Associates a requirement to the edge/vertex. + * + * @param reqTagKey The requirement. It can be one or many, if many that are comma + * separated. + */ + public void setReqTagKey(String reqTagKey) { + this.reqTagKey = reqTagKey; + } + + /** + * @return 0 is the requirement is untested.
+ * 1 if requirement tested ok
+ * 2 if the requirement has failed the test. + */ + public Integer getReqTagResult() { + return reqTagResult; + } + + public void setReqTagResult(Integer reqTagResult) { + this.reqTagResult = reqTagResult; + } + + public String getFullLabelKey() { + return fullLabelKey; + } + + public void setFullLabelKey(String fullLabelKey) { + this.fullLabelKey = fullLabelKey; + } + + public String getLabelKey() { + return labelKey; + } + + public void setLabelKey(String labelKey) { + this.labelKey = labelKey; + } + + @Override + public String toString() { + return Util.getCompleteName(this); + } + + public String getManualInstructions() { + return manualInstructions; + } + + public void setManualInstructions(String attributeValue) { + this.manualInstructions = attributeValue; + } + + /** + * Parses for the MERGE keyword. If merge is defined, find it... If defined, + * it means that the node will be merged with all other nodes wit the same + * name, but not replaced by any subgraphs + * + * @param str + * @return + */ + static public Boolean isMerged(String str) { + Pattern p = Pattern.compile("\\n(MERGE)", Pattern.MULTILINE); + Matcher m = p.matcher(str); + if (m.find()) { + logger.debug("Found keyword MERGE"); + return true; + } + return false; + } + + /** + * If no merge is defined, find it... If defined, it means that when merging + * graphs, this specific vertex will not be merged or replaced by any + * subgraphs + * + * @param str + * @return + */ + static public Boolean isNoMerge(String str) { + Pattern p = Pattern.compile("\\n(NO_MERGE)", Pattern.MULTILINE); + Matcher m = p.matcher(str); + if (m.find()) { + logger.debug("Found keyword NO_MERGE"); + return true; + } + return false; + } + + /** + * If BLOCKED is defined, find it... If defined, it means that this vertex + * will not be added to the graph. Sometimes it can be useful during testing + * to mark vertices as BLOCKED due to bugs in the system you test. When the + * bug is removed, the BLOCKED tag can be removed. + * + * @param str + * @return + */ + static public Boolean isBlocked(String str) { + Pattern p = Pattern.compile("\\n(BLOCKED)", Pattern.MULTILINE); + Matcher m = p.matcher(str); + if (m.find()) { + logger.debug("Found keyword BLOCKED"); + return true; + } + return false; + } + + /** + * If INDEX is defined, find it... If defined, it means that this vertex has + * already a unique id generated by mbt before, so we use this instead.. + * + * @param str + * @return + */ + static public Integer getIndex(String str) { + Pattern p = Pattern.compile("\\n(INDEX=(.*))", Pattern.MULTILINE); + Matcher m = p.matcher(str); + if (m.find()) { + String index_key = m.group(2); + logger.debug("Found INDEX: " + index_key); + return Integer.valueOf(index_key); + } + return 0; + } + + /** + * If the REQTAG is defined, find it... + * + * @param str + * @return + */ + static public String getReqTags(String str) { + Pattern p = Pattern.compile("\\n(REQTAG=(.*))", Pattern.MULTILINE); + Matcher m = p.matcher(str); + if (m.find()) { + String value = m.group(2); + p = Pattern.compile("([^,]+)", Pattern.MULTILINE); + m = p.matcher(value); + String reqtags = ""; + while (m.find()) { + String reqtag = m.group(1); + reqtag = reqtag.trim(); + if (reqtags.length() == 0) { + reqtags = reqtag; + } else { + reqtags += "," + reqtag; + } + } + logger.debug("Found REQTAG: " + reqtags); + return reqtags; + } + return ""; + } + + public void setDesctiptionKey(String str) { + this.descriptionKey = str; + } + + public String getDescriptionKey() { + return this.descriptionKey; + } + + public String getDescription(String str) { + Pattern p; + Matcher m; + String label = ""; + p = Pattern.compile("\\<\\!\\[CDATA\\[.*\\]\\]\\>\\", Pattern.MULTILINE); + { + m = p.matcher(str); + if (m.find()) { + label = m.group(1); + if (label.length() <= 0) { + throw new RuntimeException("Vertex is missing mandatory label"); + } + if (label.matches(".*[\\s].*")) { + throw new RuntimeException("Label of vertex: '" + label + "', containing whitespaces"); + } + if (Keywords.isKeyWord(label)) { + throw new RuntimeException("The label of vertex: '" + label + "', is a reserved keyword"); + } + } else { + throw new RuntimeException("Label must be defined for vertex"); + } + return label; + } + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java index a710acbb..77d85d2e 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java @@ -26,155 +26,155 @@ package org.graphwalker.core.graph; +import org.graphwalker.core.Keywords; + import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.graphwalker.core.Keywords; - public class Edge extends AbstractElement { - private String guardKey = ""; - private Float weightKey = 0f; - - public Edge() { - super(); - } - - public Edge(Edge edge) { - super(edge); - this.guardKey = edge.guardKey; - this.weightKey = edge.weightKey; - } - - public Edge(Edge A, Edge B) { - super(A, B); - if (A.getFullLabelKey().length() > B.getFullLabelKey().length()) { - this.guardKey = A.guardKey; - this.weightKey = A.weightKey; - } else { - this.guardKey = B.guardKey; - this.weightKey = B.weightKey; - } - } - - public float getWeightKey() { - return weightKey; - } - - public void setWeightKey(float weightKey) { - if (weightKey < 0 || weightKey > 1) - throw new RuntimeException("The value of weight, must be between 0 <= weight <= 1"); - this.weightKey = weightKey; - } - - public String getGuardKey() { - return guardKey; - } - - public void setGuardKey(String guardKey) { - this.guardKey = guardKey; - } - - /** - * The label of an edge has the following format: Label Parameter [Guard] / - * Action1;Action2;ActionN; Keyword Where the Label, Parameter. Guard, Actions - * and Keyword are optional. - * - * @param str - * @return - */ - static public String[] getGuardAndActions(String str) { - Pattern p = Pattern.compile("(.*)", Pattern.MULTILINE); - Matcher m = p.matcher(str); - String label = null; - String[] guardAndAction = { "", "" }; - if (m.find()) { - label = m.group(1); - - // Look for a Guard - Pattern firstLinePattern = Pattern.compile("\\[(.*)\\]\\s*/|\\[(.*)\\]\\s*$", Pattern.MULTILINE); - Matcher firstLineMatcher = firstLinePattern.matcher(label); - if (firstLineMatcher.find()) { - // Since we have 2 groups in the pattern, we have to check which - // one is valid. - String guard = firstLineMatcher.group(1); - if (guard == null) { - guard = firstLineMatcher.group(2); - } - guardAndAction[0] = guard; - } - - // Look for Actions - // To simplify this we wash the string by removing the guard - // from a temporary string and make the search. - String washedLabel = label.replace(guardAndAction[0], ""); - Pattern actionPattern = Pattern.compile("/\\s*(.*)\\s*$", Pattern.MULTILINE); - Matcher actionMatcher = actionPattern.matcher(washedLabel); - if (actionMatcher.find()) { - guardAndAction[1] = actionMatcher.group(1); - } - } - return guardAndAction; - } - - /** - * The label of an edge has the following format: Label Parameter [Guard] / - * Action1;Action2;ActionN; Keyword Where the Label, Parameter. Guard, Actions - * and Keyword are optional. - * - * @param str - * @return - */ - static public String[] getLabelAndParameter(String str) { - Pattern p = Pattern.compile("(.*)", Pattern.MULTILINE); - Matcher m = p.matcher(str); - String label = null; - String[] labelAndParameter = { "", "" }; - if (m.find()) { - label = m.group(1); - - // Look for the Label and Parameter - Pattern firstLinePattern = Pattern.compile("^([\\w\\.]+)\\s?([^/^\\[]+)?", Pattern.MULTILINE); - Matcher firstLineMatcher = firstLinePattern.matcher(label); - if (firstLineMatcher.find()) { - String label_key = firstLineMatcher.group(1); - if (Keywords.isKeyWord(label_key)) { - throw new RuntimeException("Edge has a label '" + label + "', which is a reserved keyword"); - } - labelAndParameter[0] = label_key; - - String parameter = firstLineMatcher.group(2); - if (parameter != null) { - parameter = parameter.trim(); - labelAndParameter[1] = parameter; - } - } - } else { - throw new RuntimeException("Label for edge must be defined"); - } - return labelAndParameter; - } - - /** - * If weight is defined, find it... weight must be associated with a value, - * which depicts the probability for the edge to be executed. A value of 0.05 - * is the same as 5% chance of going down this road. - * - * @param str - * @return - */ - static public float getWeight(String str) { - Pattern p = Pattern.compile("\\n(weight\\s*=\\s*(.*))", Pattern.MULTILINE); - Matcher m = p.matcher(str); - Float weight = 0f; - if (m.find()) { - String value = m.group(2); - try { - weight = Float.valueOf(value.trim()); - } catch (NumberFormatException error) { - throw new RuntimeException("For label: " + str + ", weight is not a correct float value: " + error.toString()); - } - } - return weight; - } + private String guardKey = ""; + private Float weightKey = 0f; + + public Edge() { + super(); + } + + public Edge(Edge edge) { + super(edge); + this.guardKey = edge.guardKey; + this.weightKey = edge.weightKey; + } + + public Edge(Edge A, Edge B) { + super(A, B); + if (A.getFullLabelKey().length() > B.getFullLabelKey().length()) { + this.guardKey = A.guardKey; + this.weightKey = A.weightKey; + } else { + this.guardKey = B.guardKey; + this.weightKey = B.weightKey; + } + } + + public float getWeightKey() { + return weightKey; + } + + public void setWeightKey(float weightKey) { + if (weightKey < 0 || weightKey > 1) + throw new RuntimeException("The value of weight, must be between 0 <= weight <= 1"); + this.weightKey = weightKey; + } + + public String getGuardKey() { + return guardKey; + } + + public void setGuardKey(String guardKey) { + this.guardKey = guardKey; + } + + /** + * The label of an edge has the following format: Label Parameter [Guard] / + * Action1;Action2;ActionN; Keyword Where the Label, Parameter. Guard, Actions + * and Keyword are optional. + * + * @param str + * @return + */ + static public String[] getGuardAndActions(String str) { + Pattern p = Pattern.compile("(.*)", Pattern.MULTILINE); + Matcher m = p.matcher(str); + String label = null; + String[] guardAndAction = {"", ""}; + if (m.find()) { + label = m.group(1); + + // Look for a Guard + Pattern firstLinePattern = Pattern.compile("\\[(.*)\\]\\s*/|\\[(.*)\\]\\s*$", Pattern.MULTILINE); + Matcher firstLineMatcher = firstLinePattern.matcher(label); + if (firstLineMatcher.find()) { + // Since we have 2 groups in the pattern, we have to check which + // one is valid. + String guard = firstLineMatcher.group(1); + if (guard == null) { + guard = firstLineMatcher.group(2); + } + guardAndAction[0] = guard; + } + + // Look for Actions + // To simplify this we wash the string by removing the guard + // from a temporary string and make the search. + String washedLabel = label.replace(guardAndAction[0], ""); + Pattern actionPattern = Pattern.compile("/\\s*(.*)\\s*$", Pattern.MULTILINE); + Matcher actionMatcher = actionPattern.matcher(washedLabel); + if (actionMatcher.find()) { + guardAndAction[1] = actionMatcher.group(1); + } + } + return guardAndAction; + } + + /** + * The label of an edge has the following format: Label Parameter [Guard] / + * Action1;Action2;ActionN; Keyword Where the Label, Parameter. Guard, Actions + * and Keyword are optional. + * + * @param str + * @return + */ + static public String[] getLabelAndParameter(String str) { + Pattern p = Pattern.compile("(.*)", Pattern.MULTILINE); + Matcher m = p.matcher(str); + String label = null; + String[] labelAndParameter = {"", ""}; + if (m.find()) { + label = m.group(1); + + // Look for the Label and Parameter + Pattern firstLinePattern = Pattern.compile("^([\\w\\.]+)\\s?([^/^\\[]+)?", Pattern.MULTILINE); + Matcher firstLineMatcher = firstLinePattern.matcher(label); + if (firstLineMatcher.find()) { + String label_key = firstLineMatcher.group(1); + if (Keywords.isKeyWord(label_key)) { + throw new RuntimeException("Edge has a label '" + label + "', which is a reserved keyword"); + } + labelAndParameter[0] = label_key; + + String parameter = firstLineMatcher.group(2); + if (parameter != null) { + parameter = parameter.trim(); + labelAndParameter[1] = parameter; + } + } + } else { + throw new RuntimeException("Label for edge must be defined"); + } + return labelAndParameter; + } + + /** + * If weight is defined, find it... weight must be associated with a value, + * which depicts the probability for the edge to be executed. A value of 0.05 + * is the same as 5% chance of going down this road. + * + * @param str + * @return + */ + static public float getWeight(String str) { + Pattern p = Pattern.compile("\\n(weight\\s*=\\s*(.*))", Pattern.MULTILINE); + Matcher m = p.matcher(str); + Float weight = 0f; + if (m.find()) { + String value = m.group(2); + try { + weight = Float.valueOf(value.trim()); + } catch (NumberFormatException error) { + throw new RuntimeException("For label: " + str + ", weight is not a correct float value: " + error.toString()); + } + } + return weight; + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java index 339fc71c..13228b60 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java @@ -33,66 +33,66 @@ public class Graph extends SparseMultigraph { - private static final long serialVersionUID = 4744840850614032582L; - private static Logger logger = Util.setupLogger(Graph.class); + private static final long serialVersionUID = 4744840850614032582L; + private static Logger logger = Util.setupLogger(Graph.class); - private String fileKey = ""; - private String labelKey = ""; + private String fileKey = ""; + private String labelKey = ""; - public String getLabelKey() { - return labelKey; - } + public String getLabelKey() { + return labelKey; + } - public void setLabelKey(String labelKey) { - this.labelKey = labelKey; - } + public void setLabelKey(String labelKey) { + this.labelKey = labelKey; + } - public String getFileKey() { - return fileKey; - } + public String getFileKey() { + return fileKey; + } - public void setFileKey(String fileKey) { - this.fileKey = fileKey; - } + public void setFileKey(String fileKey) { + this.fileKey = fileKey; + } - @Override - public String toString() { - String str = ""; - if (!getFileKey().isEmpty()) - str += "File: " + getFileKey() + ", "; - if (!getLabelKey().isEmpty()) - str += "Label: " + getLabelKey() + ", "; - str += "Num of vertices: " + getVertexCount() + ", "; - str += "Num of edges: " + getEdgeCount(); - return str; - } + @Override + public String toString() { + String str = ""; + if (!getFileKey().isEmpty()) + str += "File: " + getFileKey() + ", "; + if (!getLabelKey().isEmpty()) + str += "Label: " + getLabelKey() + ", "; + str += "Num of vertices: " + getVertexCount() + ", "; + str += "Num of edges: " + getEdgeCount(); + return str; + } - @Override - public boolean addEdge(Edge e, Vertex source, Vertex dest) { - return super.addEdge(e, source, dest, EdgeType.DIRECTED); - } + @Override + public boolean addEdge(Edge e, Vertex source, Vertex dest) { + return super.addEdge(e, source, dest, EdgeType.DIRECTED); + } - public Vertex findVertex(String vertexName) { - logger.debug("Looking for vertex: " + vertexName + ", in model: " + this.toString()); - for (Vertex vertex : getVertices()) { - logger.debug(" " + vertex.getLabelKey()); - if ((vertex.getLabelKey()).equals(vertexName)) { - logger.debug(" Found it: " + vertex); - return vertex; - } - } - return null; - } + public Vertex findVertex(String vertexName) { + logger.debug("Looking for vertex: " + vertexName + ", in model: " + this.toString()); + for (Vertex vertex : getVertices()) { + logger.debug(" " + vertex.getLabelKey()); + if ((vertex.getLabelKey()).equals(vertexName)) { + logger.debug(" Found it: " + vertex); + return vertex; + } + } + return null; + } - public Edge findEdge(String edgeName) { - logger.debug("Looking for edge: " + edgeName + ", in model: " + this.toString()); - for (Edge edge : getEdges()) { - logger.debug(" " + edge.getLabelKey()); - if ((edge.getLabelKey()).equals(edgeName)) { - logger.debug(" Found it: " + edge); - return edge; - } - } - return null; - } + public Edge findEdge(String edgeName) { + logger.debug("Looking for edge: " + edgeName + ", in model: " + this.toString()); + for (Edge edge : getEdges()) { + logger.debug(" " + edge.getLabelKey()); + if ((edge.getLabelKey()).equals(edgeName)) { + logger.debug(" Found it: " + edge); + return edge; + } + } + return null; + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java index 50dbba16..bd9e5d18 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java @@ -26,153 +26,153 @@ package org.graphwalker.core.graph; -import java.awt.Color; -import java.awt.geom.Point2D; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - import org.apache.log4j.Logger; import org.graphwalker.core.Keywords; import org.graphwalker.core.Util; +import java.awt.*; +import java.awt.geom.Point2D; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + public class Vertex extends AbstractElement { - static Logger logger = Util.setupLogger(Vertex.class); - private String motherStartVertexKey = ""; - private String subGraphStartVertexKey = ""; - private Color fillColor = new Color(0); - private Point2D location = new Point2D.Float(); - private float width = 0; - private float height = 0; - private boolean switchModelKey = false; - private boolean graphVertex = false; - - public float getWidth() { - return width; - } - - public void setWidth(float width) { - this.width = width; - } - - public float getHeight() { - return height; - } - - public void setHeight(float height) { - this.height = height; - } - - public void setLocation(Point2D location) { - this.location = location; - } - - public Point2D getLocation() { - return location; - } - - public Color getFillColor() { - return fillColor; - } - - public void setFillColor(Color fillColor) { - this.fillColor = fillColor; - } - - public Vertex() { - super(); - } - - public Vertex(Vertex vertex) { - super(vertex); - this.motherStartVertexKey = vertex.motherStartVertexKey; - this.subGraphStartVertexKey = vertex.subGraphStartVertexKey; - this.fillColor = vertex.fillColor; - this.location = vertex.location; - this.width = vertex.width; - this.height = vertex.height; - this.switchModelKey = vertex.switchModelKey; - this.graphVertex = vertex.graphVertex; - } - - /** - * If SWITCH_MODEL is defined, find it... If defined, it means that the vertex - * can be a point for switching to another model using the same label, see - * org.graphwalker.graph.Graph.getLabelKey(). - * - * @param str - * @return - */ - static public Boolean isSwitchModel(String str) { - Pattern p = Pattern.compile("\\n(SWITCH_MODEL)", Pattern.MULTILINE); - Matcher m = p.matcher(str); - if (m.find()) { - logger.debug("Found keyword SWITCH_MODEL"); - return true; - } - return false; - } - - public String getSubGraphStartVertexKey() { - return subGraphStartVertexKey; - } - - public void setSubGraphStartVertexKey(String subGraphStartVertexKey) { - this.subGraphStartVertexKey = subGraphStartVertexKey; - } - - public String getMotherStartVertexKey() { - return motherStartVertexKey; - } - - public void setMotherStartVertexKey(String motherStartVertexKey) { - this.motherStartVertexKey = motherStartVertexKey; - } - - /** - * @param str - * @return - */ - static public String getLabel(String str) { - Pattern p; - Matcher m; - String label = ""; - if (str.split("/").length > 1 || str.split("\\[").length > 1) { - p = Pattern.compile("^([\\w\\.]+)\\s?([^/^\\[]+)?", Pattern.MULTILINE); - } else { - p = Pattern.compile("(.*)", Pattern.MULTILINE); - } - m = p.matcher(str); - if (m.find()) { - label = m.group(1); - if (label.length() <= 0) { - throw new RuntimeException("Vertex is missing mandatory label"); - } - if (label.matches(".*[\\s].*")) { - throw new RuntimeException("Label of vertex: '" + label + "', containing whitespaces"); - } - if (Keywords.isKeyWord(label)) { - throw new RuntimeException("The label of vertex: '" + label + "', is a reserved keyword"); - } - } else { - throw new RuntimeException("Label must be defined for vertex"); - } - return label; - } - - public boolean isSwitchModelKey() { - return switchModelKey; - } - - public void setSwitchModelKey(Boolean switchModel) { - this.switchModelKey = switchModel; - } - - public boolean isGraphVertex() { - return graphVertex; - } - - public void setGraphVertex(boolean graphVertex) { - this.graphVertex = graphVertex; - } + static Logger logger = Util.setupLogger(Vertex.class); + private String motherStartVertexKey = ""; + private String subGraphStartVertexKey = ""; + private Color fillColor = new Color(0); + private Point2D location = new Point2D.Float(); + private float width = 0; + private float height = 0; + private boolean switchModelKey = false; + private boolean graphVertex = false; + + public float getWidth() { + return width; + } + + public void setWidth(float width) { + this.width = width; + } + + public float getHeight() { + return height; + } + + public void setHeight(float height) { + this.height = height; + } + + public void setLocation(Point2D location) { + this.location = location; + } + + public Point2D getLocation() { + return location; + } + + public Color getFillColor() { + return fillColor; + } + + public void setFillColor(Color fillColor) { + this.fillColor = fillColor; + } + + public Vertex() { + super(); + } + + public Vertex(Vertex vertex) { + super(vertex); + this.motherStartVertexKey = vertex.motherStartVertexKey; + this.subGraphStartVertexKey = vertex.subGraphStartVertexKey; + this.fillColor = vertex.fillColor; + this.location = vertex.location; + this.width = vertex.width; + this.height = vertex.height; + this.switchModelKey = vertex.switchModelKey; + this.graphVertex = vertex.graphVertex; + } + + /** + * If SWITCH_MODEL is defined, find it... If defined, it means that the vertex + * can be a point for switching to another model using the same label, see + * org.graphwalker.graph.Graph.getLabelKey(). + * + * @param str + * @return + */ + static public Boolean isSwitchModel(String str) { + Pattern p = Pattern.compile("\\n(SWITCH_MODEL)", Pattern.MULTILINE); + Matcher m = p.matcher(str); + if (m.find()) { + logger.debug("Found keyword SWITCH_MODEL"); + return true; + } + return false; + } + + public String getSubGraphStartVertexKey() { + return subGraphStartVertexKey; + } + + public void setSubGraphStartVertexKey(String subGraphStartVertexKey) { + this.subGraphStartVertexKey = subGraphStartVertexKey; + } + + public String getMotherStartVertexKey() { + return motherStartVertexKey; + } + + public void setMotherStartVertexKey(String motherStartVertexKey) { + this.motherStartVertexKey = motherStartVertexKey; + } + + /** + * @param str + * @return + */ + static public String getLabel(String str) { + Pattern p; + Matcher m; + String label = ""; + if (str.split("/").length > 1 || str.split("\\[").length > 1) { + p = Pattern.compile("^([\\w\\.]+)\\s?([^/^\\[]+)?", Pattern.MULTILINE); + } else { + p = Pattern.compile("(.*)", Pattern.MULTILINE); + } + m = p.matcher(str); + if (m.find()) { + label = m.group(1); + if (label.length() <= 0) { + throw new RuntimeException("Vertex is missing mandatory label"); + } + if (label.matches(".*[\\s].*")) { + throw new RuntimeException("Label of vertex: '" + label + "', containing whitespaces"); + } + if (Keywords.isKeyWord(label)) { + throw new RuntimeException("The label of vertex: '" + label + "', is a reserved keyword"); + } + } else { + throw new RuntimeException("Label must be defined for vertex"); + } + return label; + } + + public boolean isSwitchModelKey() { + return switchModelKey; + } + + public void setSwitchModelKey(Boolean switchModel) { + this.switchModelKey = switchModel; + } + + public boolean isGraphVertex() { + return graphVertex; + } + + public void setGraphVertex(boolean graphVertex) { + this.graphVertex = graphVertex; + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java index f936be92..f20d178c 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java @@ -26,23 +26,23 @@ package org.graphwalker.core.io; -import java.io.PrintStream; - import org.graphwalker.core.graph.Graph; +import java.io.PrintStream; + public abstract class AbstractModelHandler { - protected Graph graph; + protected Graph graph; - public abstract void load(String fileName); + public abstract void load(String fileName); - public abstract void save(PrintStream ps, boolean printIndex); + public abstract void save(PrintStream ps, boolean printIndex); - public Graph getModel() { - return graph; - } + public Graph getModel() { + return graph; + } - public void setModel(Graph graph) { - this.graph = graph; - } + public void setModel(Graph graph) { + this.graph = graph; + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java index d4cd81e1..f78c502d 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java @@ -26,16 +26,7 @@ package org.graphwalker.core.io; -import java.awt.Color; -import java.awt.geom.Point2D; -import java.io.File; -import java.io.FilenameFilter; -import java.io.IOException; -import java.io.PrintStream; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Vector; - +import edu.uci.ics.jung.graph.util.Pair; import org.apache.log4j.Logger; import org.graphwalker.core.Keywords; import org.graphwalker.core.Util; @@ -47,7 +38,15 @@ import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; -import edu.uci.ics.jung.graph.util.Pair; +import java.awt.*; +import java.awt.geom.Point2D; +import java.io.File; +import java.io.FilenameFilter; +import java.io.IOException; +import java.io.PrintStream; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Vector; /** * A file reader for GraphML files. The reader can read one single graphml file @@ -62,1027 +61,1024 @@ * Example: Folder containing several graphml files
* GraphML graphML = new GraphML();
* Graph graph = graphML.load( "/home/user/graphml_folder/" );
- * */ public class GraphML extends AbstractModelHandler { - /** - * Indicator if the graph list needs to be merged - */ - private boolean merged; - - /** - * List of parsed graphs - */ - private Vector parsedGraphList; - - /** - * A counter for creating unique indexes for edges and vertices. - */ - private int vertexAndEdgeIndex; - - /** - * The logger - */ - private Logger logger; - - /** - * Default constructor. Initializes the default logger. - */ - public GraphML() { - logger = Util.setupLogger(GraphML.class); - - parsedGraphList = new Vector(); - vertexAndEdgeIndex = 0; - } - - /** - * Reads one single graph, or a folder containing several graphs to be merged - * into one graph. - * - * @see org.graphwalker.core.io.AbstractModelHandler#load(java.lang.String) - * @param fileOrfolder - * The gramphml file or folder. - */ - @Override - public void load(String fileOrfolder) { - if (!"".equals(fileOrfolder)) { - File file = Util.getFile(fileOrfolder); - if (file.isFile()) { - parsedGraphList.add(parseFile(fileOrfolder)); - setMerged(false); - } else if (file.isDirectory()) { - // Only accepts files which suffix is .graphml - FilenameFilter graphmlFilter = new FilenameFilter() { - @Override - public boolean accept(File dir, String name) { - return name.endsWith(".graphml"); - } - }; - - File[] allChildren = file.listFiles(graphmlFilter); - for (File anAllChildren : allChildren) { - parsedGraphList.add(parseFile(anAllChildren.getAbsolutePath())); - setMerged(false); - } - } else { - throw new RuntimeException("'" + fileOrfolder - + "' is not a file or a directory. Please specify a valid .graphml file or a directory containing .graphml files"); - } - } - mergeAllGraphs(); - } - - /** - * Parses the graphml file, and returns the model as a - * edu.uci.ics.jung.graph.impl.Graph - * - * @param fileName - * The graphml file - * @return The graph - */ - @SuppressWarnings("unchecked") - private Graph parseFile(String fileName) { - Graph graph = new Graph(); - graph.setFileKey(fileName); - SAXBuilder parser = new SAXBuilder(); - - try { - logger.debug("Parsing file: " + fileName); - Document doc = parser.build(Util.getFile(fileName)); - - // Parse all vertices (nodes) - Iterator iter_node = doc.getDescendants(new org.jdom.filter.ElementFilter("node")); - while (iter_node.hasNext()) { - Object o = iter_node.next(); - if (o instanceof org.jdom.Element) { - org.jdom.Element element = (org.jdom.Element) o; - if (element.getAttributeValue("yfiles.foldertype") != null) { - logger.debug(" Excluded node: " + element.getAttributeValue("yfiles.foldertype")); - continue; - } - Iterator iterUMLNoteIter = element.getDescendants(new org.jdom.filter.ElementFilter("UMLNoteNode")); - if (iterUMLNoteIter.hasNext()) { - logger.debug(" Excluded node: UMLNoteNode"); - continue; - } - logger.debug(" id: " + element.getAttributeValue("id")); - - // Used to remember which vertex to store the image location. - Vertex currentVertex = null; - - Iterator iterNodeLabel = element.getDescendants(new org.jdom.filter.ElementFilter("NodeLabel")); - while (iterNodeLabel.hasNext()) { - Object o2 = iterNodeLabel.next(); - if (o2 instanceof org.jdom.Element) { - org.jdom.Element nodeLabel = (org.jdom.Element) o2; - logger.debug(" Full name: '" + nodeLabel.getQualifiedName() + "'"); - logger.debug(" Name: '" + nodeLabel.getTextTrim() + "'"); - String str = nodeLabel.getTextTrim(); - - Vertex v = new Vertex(); - graph.addVertex(v); - currentVertex = v; - - // Parse description - Iterator iter_data = element.getDescendants(new org.jdom.filter.ElementFilter("data")); - while (iter_data.hasNext()) { - Object o3 = iter_data.next(); - if (o instanceof org.jdom.Element) { - org.jdom.Element data = (org.jdom.Element) o3; - if (!data.getAttributeValue("key").equals("d5")) - continue; - v.setDesctiptionKey(data.getText()); - break; - } - } - - v.setIdKey(element.getAttributeValue("id")); - v.setVisitedKey(0); - v.setFileKey(fileName); - v.setFullLabelKey(str); - v.setIndexKey(getNewVertexAndEdgeIndex()); - v.setLabelKey(Vertex.getLabel(str)); - v.setMergeKey(AbstractElement.isMerged(str)); - v.setNoMergeKey(AbstractElement.isNoMerge(str)); - v.setBlockedKey(AbstractElement.isBlocked(str)); - v.setSwitchModelKey(Vertex.isSwitchModel(str)); - - Integer index = AbstractElement.getIndex(str); - if (index != 0) { - v.setIndexKey(index); - } - - v.setReqTagKey(AbstractElement.getReqTags(str)); - } - } - - // Extract any manual test instructions - Iterator iterData = element.getDescendants(new org.jdom.filter.ElementFilter("data")); - while (iterData.hasNext() && currentVertex != null) { - Object o2 = iterData.next(); - if (o2 instanceof org.jdom.Element) { - org.jdom.Element data = (org.jdom.Element) o2; - if (!data.getContent().isEmpty() && data.getContent(0) != null) { - String text = data.getContent(0).getValue().trim(); - if (!text.isEmpty()) { - logger.debug(" Data: '" + text + "'"); - currentVertex.setManualInstructions(text); - } - } - } - } - - // Using the yEd editor, an image can be used to depict the vertex. - // When merging multiple - // graphs into one, the code below, stores the image location, which - // will be used when - // writing that merged graphml file. - Iterator iterImage = element.getDescendants(new org.jdom.filter.ElementFilter("Image")); - while (iterImage.hasNext() && currentVertex != null) { - Object o2 = iterImage.next(); - if (o2 instanceof org.jdom.Element) { - org.jdom.Element image = (org.jdom.Element) o2; - if (image.getAttributeValue("href") != null) { - logger.debug(" Image: '" + image.getAttributeValue("href") + "'"); - currentVertex.setImageKey(image.getAttributeValue("href")); - } - } - } - Iterator iterGeometry = element.getDescendants(new org.jdom.filter.ElementFilter("Geometry")); - while (iterGeometry.hasNext() && currentVertex != null) { - Object o2 = iterGeometry.next(); - if (o2 instanceof org.jdom.Element) { - org.jdom.Element geometry = (org.jdom.Element) o2; - logger.debug(" width: '" + geometry.getAttributeValue("width") + "'"); - logger.debug(" height: '" + geometry.getAttributeValue("height") + "'"); - logger.debug(" x position: '" + geometry.getAttributeValue("x") + "'"); - logger.debug(" y position: '" + geometry.getAttributeValue("y") + "'"); - currentVertex.setWidth(Float.parseFloat(geometry.getAttributeValue("width"))); - currentVertex.setHeight(Float.parseFloat(geometry.getAttributeValue("height"))); - currentVertex.setLocation(new Point2D.Float(Float.parseFloat(geometry.getAttributeValue("x")), Float.parseFloat(geometry - .getAttributeValue("y")))); - } - } - Iterator iterFill = element.getDescendants(new org.jdom.filter.ElementFilter("Fill")); - while (iterFill.hasNext() && currentVertex != null) { - Object o2 = iterFill.next(); - if (o2 instanceof org.jdom.Element) { - org.jdom.Element fill = (org.jdom.Element) o2; - logger.debug(" fill color: '" + fill.getAttributeValue("color") + "'"); - currentVertex.setFillColor(new Color(Integer.parseInt(fill.getAttributeValue("color").replace("#", ""), 16))); - } - } - } - } - - Object[] vertices = graph.getVertices().toArray(); - - // Parse all edges (arrows or transitions) - Iterator iter_edge = doc.getDescendants(new org.jdom.filter.ElementFilter("edge")); - while (iter_edge.hasNext()) { - Object o = iter_edge.next(); - if (o instanceof org.jdom.Element) { - org.jdom.Element element = (org.jdom.Element) o; - logger.debug(" id: " + element.getAttributeValue("id")); - - Iterator iter2 = element.getDescendants(new org.jdom.filter.ElementFilter("EdgeLabel")); - org.jdom.Element edgeLabel = null; - if (iter2.hasNext()) { - Object o2 = iter2.next(); - if (o2 instanceof org.jdom.Element) { - edgeLabel = (org.jdom.Element) o2; - logger.debug(" Full name: '" + edgeLabel.getQualifiedName() + "'"); - logger.debug(" Name: '" + edgeLabel.getTextTrim() + "'"); - } - } - logger.debug(" source: " + element.getAttributeValue("source")); - logger.debug(" target: " + element.getAttributeValue("target")); - - Vertex source = null; - Vertex dest = null; - - for (Object vertice : vertices) { - Vertex vertex = (Vertex) vertice; - - // Find source vertex - if (vertex.getIdKey().equals(element.getAttributeValue("source")) && vertex.getFileKey().equals(fileName)) { - source = vertex; - } - if (vertex.getIdKey().equals(element.getAttributeValue("target")) && vertex.getFileKey().equals(fileName)) { - dest = vertex; - } - } - if (source == null) { - String msg = "Could not find starting node for edge. Name: '" + element.getAttributeValue("source") + "' In file '" + fileName - + "'"; - logger.error(msg); - throw new RuntimeException(msg); - } - if (dest == null) { - String msg = "Could not find end node for edge. Name: '" + element.getAttributeValue("target") + "' In file '" + fileName + "'"; - logger.error(msg); - throw new RuntimeException(msg); - } - - Edge e = new Edge(); - e.setIdKey(element.getAttributeValue("id")); - e.setFileKey(fileName); - e.setIndexKey(getNewVertexAndEdgeIndex()); - - // Parse description - Iterator iter_data = element.getDescendants(new org.jdom.filter.ElementFilter("data")); - while (iter_data.hasNext()) { - Object o3 = iter_data.next(); - if (o instanceof org.jdom.Element) { - org.jdom.Element data = (org.jdom.Element) o3; - if (!data.getAttributeValue("key").equals("d9")) - continue; - e.setDesctiptionKey(data.getText()); - break; - } - } - - if (!graph.addEdge(e, source, dest)) { - String msg = "Failed adding edge: " + e + ", to graph: " + graph; - logger.error(msg); - throw new RuntimeException(msg); - } - - if (edgeLabel != null) { - // The label of an edge has the following format: - // Label Parameter [Guard] / Action1;Action2;ActionN; - // Keyword - // Where the Label, Parameter. Guard, Actions and Keyword are - // optional. - - String str = edgeLabel.getText(); - - e.setFullLabelKey(str); - String[] guardAndAction = Edge.getGuardAndActions(str); - String[] labelAndParameter = Edge.getLabelAndParameter(str); - e.setGuardKey(guardAndAction[0]); - e.setActionsKey(guardAndAction[1]); - e.setLabelKey(labelAndParameter[0]); - e.setParameterKey(labelAndParameter[1]); - e.setWeightKey(Edge.getWeight(str)); - e.setBlockedKey(AbstractElement.isBlocked(str)); - - Integer index = AbstractElement.getIndex(str); - if (index != 0) { - e.setIndexKey(index); - } - - e.setReqTagKey(AbstractElement.getReqTags(str)); - } - e.setVisitedKey(0); - logger.debug(" Added edge: '" + e.getLabelKey() + "', with id: " + e.getIndexKey()); - - // Extract any manual test instructions - Iterator iterData = element.getDescendants(new org.jdom.filter.ElementFilter("data")); - while (iterData.hasNext() && e != null) { - Object o2 = iterData.next(); - if (o2 instanceof org.jdom.Element) { - org.jdom.Element data = (org.jdom.Element) o2; - if (!data.getContent().isEmpty() && data.getContent(0) != null) { - String text = data.getContent(0).getValue().trim(); - if (!text.isEmpty()) { - logger.debug(" Data: '" + text + "'"); - e.setManualInstructions(text); - } - } - } - } - } - } - } catch (RuntimeException e) { - throw new RuntimeException("Could not parse file: '" + fileName + "'. " + e.getMessage()); - } catch (JDOMException e) { - throw new RuntimeException("Could not parse file: '" + fileName + "'. " + e.getMessage()); - } catch (IOException e) { - throw new RuntimeException("Could not parse file: '" + fileName + "'. " + e.getMessage()); - } - - logger.debug("Finished parsing graph: " + graph); - removeBlockedEntities(graph); - logger.debug("Graph after removing BLOCKED entities: " + graph); - - return graph; - } - - /** - * Increment and return the unique index for a vertex or edge. - * - * @return - */ - private int getNewVertexAndEdgeIndex() { - return ++vertexAndEdgeIndex; - } - - /** - * Removes any edges, and any vertices that contains the key word BLOCKED - * - * @param graph - */ - private void removeBlockedEntities(Graph graph) { - Object[] vertices = graph.getVertices().toArray(); - for (Object vertice : vertices) { - Vertex v = (Vertex) vertice; - if (v.isBlockedKey()) { - logger.debug("Removing this vertex because it is BLOCKED: '" + v.getLabelKey() + "'"); - graph.removeVertex(v); - } - } - Object[] edges = graph.getEdges().toArray(); - for (Object edge : edges) { - Edge e = (Edge) edge; - if (e.isBlockedKey()) { - logger.debug("Removing this edge because it is BLOCKED: '" + e.getLabelKey() + "'"); - graph.removeEdge(e); - } - } - } - - /** - * Merge all file graphs into one graph. - */ - private void mergeAllGraphs() { - if (!isMerged()) { - findMotherAndSubgraphs(); - checkForDuplicateVerticesInSubgraphs(); - mergeSubgraphs(); - mergeVerticesMarked_MERGE(); - checkForVerticesWithZeroInEdges(); - - logger.info("Done merging"); - setMerged(true); - } - setGraphName(); - } - - private void setGraphName() { - for (Vertex v : graph.getVertices()) { - if (v.getLabelKey().equalsIgnoreCase(Keywords.START_NODE)) { - Edge e = (Edge) graph.getOutEdges(v).toArray()[0]; - graph.setLabelKey(graph.getDest(e).getLabelKey()); - graph.getDest(e).setGraphVertex(true); - } - } - } - - private void setMerged(boolean merged) { - this.merged = merged; - } - - private boolean isMerged() { - return this.merged; - } - - /** - * Search for the mother graph, and all subgraphs - */ - private void findMotherAndSubgraphs() { - boolean foundMotherStartGraph = false; - boolean foundSubStartGraph = false; - graph = null; - - for (Iterator iter = parsedGraphList.iterator(); iter.hasNext();) { - Graph g = iter.next(); - foundSubStartGraph = false; - - logger.debug("Analyzing graph: " + g.getFileKey()); - - Object[] vertices = g.getVertices().toArray(); - for (Object vertice : vertices) { - Vertex v = (Vertex) vertice; - - // Find all vertices that are start nodes (START_NODE) - if (v.getLabelKey().equalsIgnoreCase(Keywords.START_NODE)) { - if (g.getOutEdges(v).size() != 1) { - throw new RuntimeException("A Start vertex can only have one out edge, look in file: " + g.getFileKey()); - } - Edge edge = (Edge) g.getOutEdges(v).toArray()[0]; - if (!edge.getLabelKey().isEmpty()) { - if (foundMotherStartGraph) { - if (graph.getFileKey().equals(g.getFileKey())) { - throw new RuntimeException("Only one Start vertex can exist in one file, see file '" + graph.getFileKey() + "'"); - } else { - throw new RuntimeException("Only one Start vertex can exist in one file, see files " + graph.getFileKey() + ", and " - + g.getFileKey()); - } - } - if (foundSubStartGraph) { - throw new RuntimeException("Only one Start vertex can exist in one file, see file '" + g.getFileKey() + "'"); - } - - foundMotherStartGraph = true; - graph = g; - g.getDest(edge).setMotherStartVertexKey(Keywords.MOTHER_GRAPH_START_VERTEX); - logger.debug("Found the mother graph in the file: " + graph.getFileKey()); - } else { - if (foundSubStartGraph) { - throw new RuntimeException("Only one Start vertex can exist in one file, see file '" + g.getFileKey() + "'"); - } - - // Verify that current subgraph is not already defined - for (Iterator iter_g = parsedGraphList.iterator(); iter_g.hasNext();) { - if (iter.hashCode() == iter_g.hashCode()) { - continue; - } - - Graph tmp_graph = iter_g.next(); - if (!tmp_graph.getLabelKey().isEmpty()) { - String name = tmp_graph.getLabelKey(); - if (name.equals(g.getDest(edge).getLabelKey())) { - throw new RuntimeException("Found 2 subgraphs using the same name: '" + g.getDest(edge).getLabelKey() - + "', they are defined in files: '" + g.getFileKey() + "', and :'" + tmp_graph.getFileKey() + "'"); - } - } - } - - if (foundMotherStartGraph) { - if (graph.getFileKey().equals(g.getFileKey())) { - throw new RuntimeException("Only one Start vertex can exist in one file, see file '" + graph.getFileKey() + "'"); - } - } - - // Since the edge does not contain a label, this is a subgraph - // Mark the destination node of the edge to a subgraph starting node - foundSubStartGraph = true; - g.getDest(edge).setSubGraphStartVertexKey(Keywords.SUBGRAPH_START_VERTEX); - g.setLabelKey(g.getDest(edge).getLabelKey()); - logger.debug("Found sub-graph: '" + g.getLabelKey() + "', in file '" + g.getFileKey() + "'"); - logger.debug("Added SUBGRAPH_START_VERTEX to vertex: " + g.getDest(edge).getIndexKey()); - } - } - } - } - - if (graph == null) { - throw new RuntimeException("Did not find a Start vertex with an out edge with a label."); - } - } - - /** - * Look for duplicated vertices in each sub-graph. If a vertex is found, which - * represents the name of the sub-graph (the vertex which the Start vertex - * points to) is duplicated in the same sub-graph, this will lead to an - * infinite recursive loop. - */ - private void checkForDuplicateVerticesInSubgraphs() { - for (int i = 0; i < parsedGraphList.size(); i++) { - Graph g = parsedGraphList.elementAt(i); - - // Exclude the mother graph - if (graph.hashCode() == g.hashCode()) { - continue; - } - - logger.debug("Looking for infinit recursive loop in file: " + g.getFileKey()); - - String subgraph_label = g.getLabelKey(); - Object[] vertices = g.getVertices().toArray(); - for (Object vertice : vertices) { - Vertex v = (Vertex) vertice; - String label = v.getLabelKey(); - if (label.equals(subgraph_label)) { - if (!v.getSubGraphStartVertexKey().isEmpty()) { - continue; - } - if (v.isNoMergeKey()) { - continue; - } - - logger.error("Vertex: " + label + ", with id: " + v.getIndexKey() + ", is a duplicate in a subgraph"); - throw new RuntimeException("Found a subgraph containing a duplicate vertex with name: '" + v.getLabelKey() + "', in file: '" - + g.getFileKey() + "'"); - - } - } - logger.debug("Nope! Did not find any infinit recursive loops."); - } - } - - private void mergeSubgraphs() { - for (int i = 0; i < parsedGraphList.size(); i++) { - Graph g = parsedGraphList.elementAt(i); - - if (graph.hashCode() == g.hashCode()) { - continue; - } - logger.debug("Analysing graph in file: " + g.getFileKey()); - - Object[] vertices = graph.getVertices().toArray(); - for (int j = 0; j < vertices.length; j++) { - Vertex v1 = (Vertex) vertices[j]; - logger.debug("Investigating vertex(" + v1.getIndexKey() + "): '" + v1.getLabelKey() + "'"); - - if (v1.getLabelKey().equals(g.getLabelKey())) { - if (v1.isMergeKey()) { - logger.debug("The vertex is marked MERGE, and will not be replaced by a subgraph."); - continue; - } - if (v1.isNoMergeKey()) { - logger.debug("The vertex is marked NO_MERGE, and will not be replaced by a subgraph."); - continue; - } - if (v1.isMergedMbtKey()) { - logger.debug("The vertex is marked MERGED_BY_MBT, and will not be replaced by a subgraph."); - continue; - } - - logger.debug("A subgraph'ed vertex: '" + v1.getLabelKey() + "' in graph: " + g.getFileKey() - + ", equals a node in the graph in file: '" + graph.getFileKey() + "'"); - - appendGraph(graph, g); - copySubGraphs(graph, g, v1); - - vertices = graph.getVertices().toArray(); - i = -1; - j = -1; - } - } - } - } - - /** - * Merge all vertices marked MERGE - */ - private void mergeVerticesMarked_MERGE() { - Object[] list1 = graph.getVertices().toArray(); - for (Object aList1 : list1) { - Vertex v1 = (Vertex) aList1; - - if (!v1.isMergeKey()) { - continue; - } - - Object[] list2 = graph.getVertices().toArray(); - Vector mergedVertices = new Vector(); - for (Object aList2 : list2) { - Vertex v2 = (Vertex) aList2; - - if (!v1.getLabelKey().equals(v2.getLabelKey())) { - continue; - } - if (v2.isNoMergeKey()) { - continue; - } - if (v1.getIndexKey().equals(v2.getIndexKey())) { - continue; - } - if (mergedVertices.contains(v1)) { - continue; - } - - logger.debug("Merging vertex(" + v1.getIndexKey() + "): '" + v1.getLabelKey() + "' with vertex (" + v2.getIndexKey() + ")"); - - Object[] inEdges = graph.getInEdges(v1).toArray(); - for (Object inEdge : inEdges) { - Edge edge = (Edge) inEdge; - Edge new_edge = new Edge(edge); - new_edge.setIndexKey(getNewVertexAndEdgeIndex()); - graph.addEdge(new_edge, graph.getSource(edge), v2); - } - Object[] outEdges = graph.getOutEdges(v1).toArray(); - for (Object outEdge : outEdges) { - Edge edge = (Edge) outEdge; - Edge new_edge = new Edge(edge); - new_edge.setIndexKey(getNewVertexAndEdgeIndex()); - graph.addEdge(new_edge, v2, graph.getDest(edge)); - } - mergedVertices.add(v1); - } - - if (!mergedVertices.isEmpty()) { - logger.debug("Remvoing merged vertex(" + v1.getIndexKey() + ")"); - graph.removeVertex(v1); - } - } - } - - /** - * Search for any vertices with no in edges - * - * @throws RuntimeException - */ - private void checkForVerticesWithZeroInEdges() throws RuntimeException { - Object[] vs = graph.getVertices().toArray(); - for (Object v1 : vs) { - Vertex v = (Vertex) v1; - if (!v.getLabelKey().equalsIgnoreCase(Keywords.START_NODE)) { - if (graph.getInEdges(v).toArray().length == 0) { - String msg = "No in-edges! " + v + " is not reachable," + " from file: '" + v.getFileKey() + "'"; - logger.error(msg); - throw new RuntimeException(msg); - } - } - } - } - - /** - * Copies the graph src, into the graph dst - * - * @param dst - * @param src - */ - private void appendGraph(Graph dst, Graph src) { - HashMap map = new HashMap(); - Object[] vertices = src.getVertices().toArray(); - for (Object vertice : vertices) { - Vertex v = (Vertex) vertice; - if (v.getLabelKey().equalsIgnoreCase(Keywords.START_NODE)) { - continue; - } - Vertex new_v = new Vertex(v); - new_v.setIndexKey(getNewVertexAndEdgeIndex()); - dst.addVertex(new_v); - logger.debug("Associated vertex: " + v + " to new vertex: " + new_v); - map.put(v.getIndexKey(), new_v); - } - Object[] edges = src.getEdges().toArray(); - for (Object edge : edges) { - Edge e = (Edge) edge; - Vertex v1 = map.get(src.getSource(e).getIndexKey()); - Vertex v2 = map.get(src.getDest(e).getIndexKey()); - if (v1 == null || v2 == null) { - continue; - } - Edge new_e = new Edge(e); - dst.addEdge(new_e, v1, v2); - new_e.setIndexKey(getNewVertexAndEdgeIndex()); - } - } - - /** - * Replaces the vertex targetVertex and all its in and out edges, in the graph - * g, with all other vertices with the same name. - * - * @param mainGraph - * @param subGraph - * @param targetVertex - */ - private void copySubGraphs(Graph mainGraph, Graph subGraph, Vertex targetVertex) { - // Save the target vertex out-edge list - Vector targetVertexOutEdgeList = new Vector(); - logger.debug("Target vertex (" + targetVertex + ") out-edge list"); - for (Edge element : mainGraph.getOutEdges(targetVertex)) { - logger.debug(" " + element); - targetVertexOutEdgeList.add(element); - } - - Vertex sourceVertex = null; - Object[] vertices = mainGraph.getVertices().toArray(); - for (Object vertice : vertices) { - Vertex v = (Vertex) vertice; - if (v.getLabelKey().equals(targetVertex.getLabelKey())) { - if (v.getSubGraphStartVertexKey().isEmpty()) { - continue; - } - if (v.isMergeKey()) { - continue; - } - if (v.isNoMergeKey()) { - continue; - } - if (v.isMergedMbtKey()) { - continue; - } - if (v.getIndexKey().equals(targetVertex.getIndexKey())) { - continue; - } - - sourceVertex = v; - break; - } - } - - if (sourceVertex == null) { - return; - } - - logger.debug("Start merging target vertex: " + targetVertex + " with source vertex: " + sourceVertex); - - Object[] inEdges = mainGraph.getInEdges(sourceVertex).toArray(); - for (Object inEdge : inEdges) { - Edge edge = (Edge) inEdge; - Edge new_edge = new Edge(edge); - mainGraph.addEdge(new_edge, mainGraph.getSource(edge), targetVertex); - new_edge.setIndexKey(getNewVertexAndEdgeIndex()); - } - Object[] outEdges = mainGraph.getOutEdges(sourceVertex).toArray(); - for (Object outEdge : outEdges) { - Edge edge = (Edge) outEdge; - Edge new_edge = new Edge(edge); - mainGraph.addEdge(new_edge, targetVertex, mainGraph.getDest(edge)); - new_edge.setIndexKey(getNewVertexAndEdgeIndex()); - } - logger.debug("Remvoing source vertex: " + sourceVertex); - mainGraph.removeVertex(sourceVertex); - targetVertex.setMergedMbtKey(true); - - // Check if there exists a Stop vertex. - // Also check if there is only one. - Vertex stopVertex = null; - vertices = mainGraph.getVertices().toArray(); - for (Object vertice : vertices) { - Vertex v = (Vertex) vertice; - if (v.getLabelKey().equalsIgnoreCase(Keywords.STOP_NODE)) { - if (stopVertex != null) { - throw new RuntimeException("Found more than 1 Stop vertex in file (Only one Stop vertex per file is allowed): '" - + mainGraph.getFileKey() + "'"); - } - stopVertex = v; - } - } - - // All edges going to the Stop vertex, needs to be merged to the destination - // vertex. - // The destination vertex, is pointed to by the vertex which is expanded by - // the sub graph. - if (stopVertex != null) { - Vector edgesToBeRemoved = new Vector(); - inEdges = mainGraph.getInEdges(stopVertex).toArray(); - - logger.debug("Stop vertex in-edge list"); - for (Edge element : mainGraph.getInEdges(stopVertex)) { - logger.debug(" " + element); - } - logger.debug("Target vertex (" + targetVertex + ") out-edge list"); - for (Edge element : targetVertexOutEdgeList) { - logger.debug(" " + element); - } - - Vector> mergeList = MergeList(targetVertexOutEdgeList.toArray(), inEdges); - for (Pair pair : mergeList) { - MergeOutEdgeAndInEdge(pair.getFirst(), pair.getSecond(), edgesToBeRemoved, mainGraph); - } - - // Now remove the edges that has been copied. - Object[] list = edgesToBeRemoved.toArray(); - for (Object aList : list) { - Edge element = (Edge) aList; - if (mainGraph.containsEdge(element)) { - try { - logger.debug("Removing edge: " + element); - logger.debug(element + ", was found and removed from graph,: '" + mainGraph.getFileKey() + "'"); - mainGraph.removeEdge(element); - } catch (IllegalArgumentException e) { - logger.debug(element + ", was not found in graph: '" + mainGraph.getFileKey() - + "', this is ok, since it probably been removed before. (I know, not ver good progamming practice here)"); - } - } - } - logger.debug("Removing the Stop vertex: " + stopVertex.getIndexKey()); - mainGraph.removeVertex(stopVertex); - } - } - - private Vector> MergeList(Object[] array_A, Object[] array_B) { - logger.debug("Vector twoLists( Object[] array_A, Object[] array_B )"); - Vector> matches = new Vector>(); - logger.debug(" Looking for exact matches"); - for (Object anArray_A : array_A) { - Edge a = (Edge) anArray_A; - String aLabel = a.getLabelKey(); - for (Object anArray_B : array_B) { - Edge b = (Edge) anArray_B; - String bLabel = b.getLabelKey(); - if (aLabel != null && aLabel.length() == 0) { - aLabel = null; - } - if (bLabel != null && bLabel.length() == 0) { - bLabel = null; - } - if (aLabel == null && bLabel == null) { - logger.debug(" adding: " + a + " and " + b); - matches.add(new Pair(a, b)); - } else if (aLabel != null && bLabel != null) { - if (aLabel.equals(bLabel)) { - logger.debug(" adding: " + a + " and " + b); - matches.add(new Pair(a, b)); - } - } - } - } - - Vector> null_matches_from_A_list = new Vector>(); - logger.debug(" Matching nulls from the A list with non-matched items in the second list"); - for (Object anArray_A : array_A) { - Edge a = (Edge) anArray_A; - String aLabel = a.getLabelKey(); - if (aLabel == null || aLabel.length() == 0) { - for (Object anArray_B : array_B) { - Edge b = (Edge) anArray_B; - String bLabel = b.getLabelKey(); - if (bLabel != null) { - boolean alreadyMatched = false; - for (Pair element : matches) { - if (b.equals(element.getSecond())) { - alreadyMatched = true; - break; - } - } - - if (!alreadyMatched) { - logger.debug(" adding: " + a + " and " + b); - null_matches_from_A_list.add(new Pair(a, b)); - } - } - } - } - } - - Vector> null_matches_from_B_list = new Vector>(); - logger.debug(" Matching nulls from the B list with non-matched items in the first list"); - for (Object anArray_B : array_B) { - Edge b = (Edge) anArray_B; - String bLabel = b.getLabelKey(); - if (bLabel == null || bLabel.length() == 0) { - for (Object anArray_A : array_A) { - Edge a = (Edge) anArray_A; - String aLabel = a.getLabelKey(); - if (aLabel != null) { - boolean alreadyMatched = false; - for (Pair element : matches) { - if (a.equals(element.getFirst())) { - alreadyMatched = true; - break; - } - } - - if (!alreadyMatched) { - logger.debug(" adding: " + a + " and " + b); - null_matches_from_B_list.add(new Pair(a, b)); - } - } - } - } - } - matches.addAll(null_matches_from_A_list); - matches.addAll(null_matches_from_B_list); - return matches; - } - - private void MergeOutEdgeAndInEdge(Edge outEdge, Edge inEdge, Vector edgesToBeRemoved, Graph graph) { - logger.debug("MergeOutEdgeAndInEdge"); - - if (outEdge == null) { - throw new RuntimeException("Internal progamming error"); - } - if (inEdge == null) { - throw new RuntimeException("Internal progamming error"); - } - - logger.debug(" outEdge: " + outEdge); - logger.debug(" inEdge: " + inEdge); - - Edge new_edge = new Edge(inEdge, outEdge); - graph.addEdge(new_edge, graph.getSource(inEdge), graph.getDest(outEdge)); - - new_edge.setIndexKey(getNewVertexAndEdgeIndex()); - logger.debug(" Replacing the target vertex out-edge: " + outEdge + " (old) with: " + new_edge + "(new), using: " + inEdge); - - edgesToBeRemoved.add(inEdge); - edgesToBeRemoved.add(outEdge); - } - - /** - * Writes the graph to a PrintStream, using GraphML format. - */ - @Override - public void save(PrintStream ps, boolean printIndex) { - Graph g = getModel(); - - ps.println(""); - ps.println(""); - ps.println(" "); - ps.println(" "); - ps.println(" "); - - for (Vertex v : g.getVertices()) { - ps.println(" "); - ps.println(" "); - - if (!v.getImageKey().isEmpty()) { - ps.println(" "); - ps.println(" "); - } else { - ps.println(" "); - ps.println(" "); - } - - ps.println(" "); - ps.println(" "); - ps.print(" " - + v.getFullLabelKey()); - if (printIndex) { - ps.print(" INDEX=" + v.getIndexKey()); - } - - ps.println(""); - - if (!v.getImageKey().isEmpty()) { - ps.println(" "); - ps.println(" "); - } else { - ps.println(" "); - ps.println(" "); - } - - ps.println(" "); - ps.println(" "); - } - - for (Edge e : g.getEdges()) { - Pair p = graph.getEndpoints(e); - Vertex src = p.getFirst(); - Vertex dest = p.getSecond(); - - ps.println(" "); - ps.println(" "); - ps.println(" "); - ps.println(" "); - ps.println(" "); - ps.println(" "); - ps.println(" "); - ps.println(" "); - ps.println(" "); - ps.println(" "); - ps.println(" "); - - if (!e.getFullLabelKey().isEmpty()) { - String label = e.getFullLabelKey(); - label = label.replaceAll("&", "&"); - label = label.replaceAll("<", "<"); - label = label.replaceAll(">", ">"); - label = label.replaceAll("'", "'"); - label = label.replaceAll("\"", """); - - ps.println(" " + label); - if (printIndex) { - ps.print(" INDEX=" + e.getIndexKey()); - } - ps.println(""); - } - - ps.println(" "); - ps.println(" "); - ps.println(" "); - ps.println(" "); - - } - - ps.println(" "); - ps.println(""); - - } + /** + * Indicator if the graph list needs to be merged + */ + private boolean merged; + + /** + * List of parsed graphs + */ + private Vector parsedGraphList; + + /** + * A counter for creating unique indexes for edges and vertices. + */ + private int vertexAndEdgeIndex; + + /** + * The logger + */ + private Logger logger; + + /** + * Default constructor. Initializes the default logger. + */ + public GraphML() { + logger = Util.setupLogger(GraphML.class); + + parsedGraphList = new Vector(); + vertexAndEdgeIndex = 0; + } + + /** + * Reads one single graph, or a folder containing several graphs to be merged + * into one graph. + * + * @param fileOrfolder The gramphml file or folder. + * @see org.graphwalker.core.io.AbstractModelHandler#load(java.lang.String) + */ + @Override + public void load(String fileOrfolder) { + if (!"".equals(fileOrfolder)) { + File file = Util.getFile(fileOrfolder); + if (file.isFile()) { + parsedGraphList.add(parseFile(fileOrfolder)); + setMerged(false); + } else if (file.isDirectory()) { + // Only accepts files which suffix is .graphml + FilenameFilter graphmlFilter = new FilenameFilter() { + @Override + public boolean accept(File dir, String name) { + return name.endsWith(".graphml"); + } + }; + + File[] allChildren = file.listFiles(graphmlFilter); + for (File anAllChildren : allChildren) { + parsedGraphList.add(parseFile(anAllChildren.getAbsolutePath())); + setMerged(false); + } + } else { + throw new RuntimeException("'" + fileOrfolder + + "' is not a file or a directory. Please specify a valid .graphml file or a directory containing .graphml files"); + } + } + mergeAllGraphs(); + } + + /** + * Parses the graphml file, and returns the model as a + * edu.uci.ics.jung.graph.impl.Graph + * + * @param fileName The graphml file + * @return The graph + */ + @SuppressWarnings("unchecked") + private Graph parseFile(String fileName) { + Graph graph = new Graph(); + graph.setFileKey(fileName); + SAXBuilder parser = new SAXBuilder(); + + try { + logger.debug("Parsing file: " + fileName); + Document doc = parser.build(Util.getFile(fileName)); + + // Parse all vertices (nodes) + Iterator iter_node = doc.getDescendants(new org.jdom.filter.ElementFilter("node")); + while (iter_node.hasNext()) { + Object o = iter_node.next(); + if (o instanceof org.jdom.Element) { + org.jdom.Element element = (org.jdom.Element) o; + if (element.getAttributeValue("yfiles.foldertype") != null) { + logger.debug(" Excluded node: " + element.getAttributeValue("yfiles.foldertype")); + continue; + } + Iterator iterUMLNoteIter = element.getDescendants(new org.jdom.filter.ElementFilter("UMLNoteNode")); + if (iterUMLNoteIter.hasNext()) { + logger.debug(" Excluded node: UMLNoteNode"); + continue; + } + logger.debug(" id: " + element.getAttributeValue("id")); + + // Used to remember which vertex to store the image location. + Vertex currentVertex = null; + + Iterator iterNodeLabel = element.getDescendants(new org.jdom.filter.ElementFilter("NodeLabel")); + while (iterNodeLabel.hasNext()) { + Object o2 = iterNodeLabel.next(); + if (o2 instanceof org.jdom.Element) { + org.jdom.Element nodeLabel = (org.jdom.Element) o2; + logger.debug(" Full name: '" + nodeLabel.getQualifiedName() + "'"); + logger.debug(" Name: '" + nodeLabel.getTextTrim() + "'"); + String str = nodeLabel.getTextTrim(); + + Vertex v = new Vertex(); + graph.addVertex(v); + currentVertex = v; + + // Parse description + Iterator iter_data = element.getDescendants(new org.jdom.filter.ElementFilter("data")); + while (iter_data.hasNext()) { + Object o3 = iter_data.next(); + if (o instanceof org.jdom.Element) { + org.jdom.Element data = (org.jdom.Element) o3; + if (!data.getAttributeValue("key").equals("d5")) + continue; + v.setDesctiptionKey(data.getText()); + break; + } + } + + v.setIdKey(element.getAttributeValue("id")); + v.setVisitedKey(0); + v.setFileKey(fileName); + v.setFullLabelKey(str); + v.setIndexKey(getNewVertexAndEdgeIndex()); + v.setLabelKey(Vertex.getLabel(str)); + v.setMergeKey(AbstractElement.isMerged(str)); + v.setNoMergeKey(AbstractElement.isNoMerge(str)); + v.setBlockedKey(AbstractElement.isBlocked(str)); + v.setSwitchModelKey(Vertex.isSwitchModel(str)); + + Integer index = AbstractElement.getIndex(str); + if (index != 0) { + v.setIndexKey(index); + } + + v.setReqTagKey(AbstractElement.getReqTags(str)); + } + } + + // Extract any manual test instructions + Iterator iterData = element.getDescendants(new org.jdom.filter.ElementFilter("data")); + while (iterData.hasNext() && currentVertex != null) { + Object o2 = iterData.next(); + if (o2 instanceof org.jdom.Element) { + org.jdom.Element data = (org.jdom.Element) o2; + if (!data.getContent().isEmpty() && data.getContent(0) != null) { + String text = data.getContent(0).getValue().trim(); + if (!text.isEmpty()) { + logger.debug(" Data: '" + text + "'"); + currentVertex.setManualInstructions(text); + } + } + } + } + + // Using the yEd editor, an image can be used to depict the vertex. + // When merging multiple + // graphs into one, the code below, stores the image location, which + // will be used when + // writing that merged graphml file. + Iterator iterImage = element.getDescendants(new org.jdom.filter.ElementFilter("Image")); + while (iterImage.hasNext() && currentVertex != null) { + Object o2 = iterImage.next(); + if (o2 instanceof org.jdom.Element) { + org.jdom.Element image = (org.jdom.Element) o2; + if (image.getAttributeValue("href") != null) { + logger.debug(" Image: '" + image.getAttributeValue("href") + "'"); + currentVertex.setImageKey(image.getAttributeValue("href")); + } + } + } + Iterator iterGeometry = element.getDescendants(new org.jdom.filter.ElementFilter("Geometry")); + while (iterGeometry.hasNext() && currentVertex != null) { + Object o2 = iterGeometry.next(); + if (o2 instanceof org.jdom.Element) { + org.jdom.Element geometry = (org.jdom.Element) o2; + logger.debug(" width: '" + geometry.getAttributeValue("width") + "'"); + logger.debug(" height: '" + geometry.getAttributeValue("height") + "'"); + logger.debug(" x position: '" + geometry.getAttributeValue("x") + "'"); + logger.debug(" y position: '" + geometry.getAttributeValue("y") + "'"); + currentVertex.setWidth(Float.parseFloat(geometry.getAttributeValue("width"))); + currentVertex.setHeight(Float.parseFloat(geometry.getAttributeValue("height"))); + currentVertex.setLocation(new Point2D.Float(Float.parseFloat(geometry.getAttributeValue("x")), Float.parseFloat(geometry + .getAttributeValue("y")))); + } + } + Iterator iterFill = element.getDescendants(new org.jdom.filter.ElementFilter("Fill")); + while (iterFill.hasNext() && currentVertex != null) { + Object o2 = iterFill.next(); + if (o2 instanceof org.jdom.Element) { + org.jdom.Element fill = (org.jdom.Element) o2; + logger.debug(" fill color: '" + fill.getAttributeValue("color") + "'"); + currentVertex.setFillColor(new Color(Integer.parseInt(fill.getAttributeValue("color").replace("#", ""), 16))); + } + } + } + } + + Object[] vertices = graph.getVertices().toArray(); + + // Parse all edges (arrows or transitions) + Iterator iter_edge = doc.getDescendants(new org.jdom.filter.ElementFilter("edge")); + while (iter_edge.hasNext()) { + Object o = iter_edge.next(); + if (o instanceof org.jdom.Element) { + org.jdom.Element element = (org.jdom.Element) o; + logger.debug(" id: " + element.getAttributeValue("id")); + + Iterator iter2 = element.getDescendants(new org.jdom.filter.ElementFilter("EdgeLabel")); + org.jdom.Element edgeLabel = null; + if (iter2.hasNext()) { + Object o2 = iter2.next(); + if (o2 instanceof org.jdom.Element) { + edgeLabel = (org.jdom.Element) o2; + logger.debug(" Full name: '" + edgeLabel.getQualifiedName() + "'"); + logger.debug(" Name: '" + edgeLabel.getTextTrim() + "'"); + } + } + logger.debug(" source: " + element.getAttributeValue("source")); + logger.debug(" target: " + element.getAttributeValue("target")); + + Vertex source = null; + Vertex dest = null; + + for (Object vertice : vertices) { + Vertex vertex = (Vertex) vertice; + + // Find source vertex + if (vertex.getIdKey().equals(element.getAttributeValue("source")) && vertex.getFileKey().equals(fileName)) { + source = vertex; + } + if (vertex.getIdKey().equals(element.getAttributeValue("target")) && vertex.getFileKey().equals(fileName)) { + dest = vertex; + } + } + if (source == null) { + String msg = "Could not find starting node for edge. Name: '" + element.getAttributeValue("source") + "' In file '" + fileName + + "'"; + logger.error(msg); + throw new RuntimeException(msg); + } + if (dest == null) { + String msg = "Could not find end node for edge. Name: '" + element.getAttributeValue("target") + "' In file '" + fileName + "'"; + logger.error(msg); + throw new RuntimeException(msg); + } + + Edge e = new Edge(); + e.setIdKey(element.getAttributeValue("id")); + e.setFileKey(fileName); + e.setIndexKey(getNewVertexAndEdgeIndex()); + + // Parse description + Iterator iter_data = element.getDescendants(new org.jdom.filter.ElementFilter("data")); + while (iter_data.hasNext()) { + Object o3 = iter_data.next(); + if (o instanceof org.jdom.Element) { + org.jdom.Element data = (org.jdom.Element) o3; + if (!data.getAttributeValue("key").equals("d9")) + continue; + e.setDesctiptionKey(data.getText()); + break; + } + } + + if (!graph.addEdge(e, source, dest)) { + String msg = "Failed adding edge: " + e + ", to graph: " + graph; + logger.error(msg); + throw new RuntimeException(msg); + } + + if (edgeLabel != null) { + // The label of an edge has the following format: + // Label Parameter [Guard] / Action1;Action2;ActionN; + // Keyword + // Where the Label, Parameter. Guard, Actions and Keyword are + // optional. + + String str = edgeLabel.getText(); + + e.setFullLabelKey(str); + String[] guardAndAction = Edge.getGuardAndActions(str); + String[] labelAndParameter = Edge.getLabelAndParameter(str); + e.setGuardKey(guardAndAction[0]); + e.setActionsKey(guardAndAction[1]); + e.setLabelKey(labelAndParameter[0]); + e.setParameterKey(labelAndParameter[1]); + e.setWeightKey(Edge.getWeight(str)); + e.setBlockedKey(AbstractElement.isBlocked(str)); + + Integer index = AbstractElement.getIndex(str); + if (index != 0) { + e.setIndexKey(index); + } + + e.setReqTagKey(AbstractElement.getReqTags(str)); + } + e.setVisitedKey(0); + logger.debug(" Added edge: '" + e.getLabelKey() + "', with id: " + e.getIndexKey()); + + // Extract any manual test instructions + Iterator iterData = element.getDescendants(new org.jdom.filter.ElementFilter("data")); + while (iterData.hasNext() && e != null) { + Object o2 = iterData.next(); + if (o2 instanceof org.jdom.Element) { + org.jdom.Element data = (org.jdom.Element) o2; + if (!data.getContent().isEmpty() && data.getContent(0) != null) { + String text = data.getContent(0).getValue().trim(); + if (!text.isEmpty()) { + logger.debug(" Data: '" + text + "'"); + e.setManualInstructions(text); + } + } + } + } + } + } + } catch (RuntimeException e) { + throw new RuntimeException("Could not parse file: '" + fileName + "'. " + e.getMessage()); + } catch (JDOMException e) { + throw new RuntimeException("Could not parse file: '" + fileName + "'. " + e.getMessage()); + } catch (IOException e) { + throw new RuntimeException("Could not parse file: '" + fileName + "'. " + e.getMessage()); + } + + logger.debug("Finished parsing graph: " + graph); + removeBlockedEntities(graph); + logger.debug("Graph after removing BLOCKED entities: " + graph); + + return graph; + } + + /** + * Increment and return the unique index for a vertex or edge. + * + * @return + */ + private int getNewVertexAndEdgeIndex() { + return ++vertexAndEdgeIndex; + } + + /** + * Removes any edges, and any vertices that contains the key word BLOCKED + * + * @param graph + */ + private void removeBlockedEntities(Graph graph) { + Object[] vertices = graph.getVertices().toArray(); + for (Object vertice : vertices) { + Vertex v = (Vertex) vertice; + if (v.isBlockedKey()) { + logger.debug("Removing this vertex because it is BLOCKED: '" + v.getLabelKey() + "'"); + graph.removeVertex(v); + } + } + Object[] edges = graph.getEdges().toArray(); + for (Object edge : edges) { + Edge e = (Edge) edge; + if (e.isBlockedKey()) { + logger.debug("Removing this edge because it is BLOCKED: '" + e.getLabelKey() + "'"); + graph.removeEdge(e); + } + } + } + + /** + * Merge all file graphs into one graph. + */ + private void mergeAllGraphs() { + if (!isMerged()) { + findMotherAndSubgraphs(); + checkForDuplicateVerticesInSubgraphs(); + mergeSubgraphs(); + mergeVerticesMarked_MERGE(); + checkForVerticesWithZeroInEdges(); + + logger.info("Done merging"); + setMerged(true); + } + setGraphName(); + } + + private void setGraphName() { + for (Vertex v : graph.getVertices()) { + if (v.getLabelKey().equalsIgnoreCase(Keywords.START_NODE)) { + Edge e = (Edge) graph.getOutEdges(v).toArray()[0]; + graph.setLabelKey(graph.getDest(e).getLabelKey()); + graph.getDest(e).setGraphVertex(true); + } + } + } + + private void setMerged(boolean merged) { + this.merged = merged; + } + + private boolean isMerged() { + return this.merged; + } + + /** + * Search for the mother graph, and all subgraphs + */ + private void findMotherAndSubgraphs() { + boolean foundMotherStartGraph = false; + boolean foundSubStartGraph = false; + graph = null; + + for (Iterator iter = parsedGraphList.iterator(); iter.hasNext(); ) { + Graph g = iter.next(); + foundSubStartGraph = false; + + logger.debug("Analyzing graph: " + g.getFileKey()); + + Object[] vertices = g.getVertices().toArray(); + for (Object vertice : vertices) { + Vertex v = (Vertex) vertice; + + // Find all vertices that are start nodes (START_NODE) + if (v.getLabelKey().equalsIgnoreCase(Keywords.START_NODE)) { + if (g.getOutEdges(v).size() != 1) { + throw new RuntimeException("A Start vertex can only have one out edge, look in file: " + g.getFileKey()); + } + Edge edge = (Edge) g.getOutEdges(v).toArray()[0]; + if (!edge.getLabelKey().isEmpty()) { + if (foundMotherStartGraph) { + if (graph.getFileKey().equals(g.getFileKey())) { + throw new RuntimeException("Only one Start vertex can exist in one file, see file '" + graph.getFileKey() + "'"); + } else { + throw new RuntimeException("Only one Start vertex can exist in one file, see files " + graph.getFileKey() + ", and " + + g.getFileKey()); + } + } + if (foundSubStartGraph) { + throw new RuntimeException("Only one Start vertex can exist in one file, see file '" + g.getFileKey() + "'"); + } + + foundMotherStartGraph = true; + graph = g; + g.getDest(edge).setMotherStartVertexKey(Keywords.MOTHER_GRAPH_START_VERTEX); + logger.debug("Found the mother graph in the file: " + graph.getFileKey()); + } else { + if (foundSubStartGraph) { + throw new RuntimeException("Only one Start vertex can exist in one file, see file '" + g.getFileKey() + "'"); + } + + // Verify that current subgraph is not already defined + for (Iterator iter_g = parsedGraphList.iterator(); iter_g.hasNext(); ) { + if (iter.hashCode() == iter_g.hashCode()) { + continue; + } + + Graph tmp_graph = iter_g.next(); + if (!tmp_graph.getLabelKey().isEmpty()) { + String name = tmp_graph.getLabelKey(); + if (name.equals(g.getDest(edge).getLabelKey())) { + throw new RuntimeException("Found 2 subgraphs using the same name: '" + g.getDest(edge).getLabelKey() + + "', they are defined in files: '" + g.getFileKey() + "', and :'" + tmp_graph.getFileKey() + "'"); + } + } + } + + if (foundMotherStartGraph) { + if (graph.getFileKey().equals(g.getFileKey())) { + throw new RuntimeException("Only one Start vertex can exist in one file, see file '" + graph.getFileKey() + "'"); + } + } + + // Since the edge does not contain a label, this is a subgraph + // Mark the destination node of the edge to a subgraph starting node + foundSubStartGraph = true; + g.getDest(edge).setSubGraphStartVertexKey(Keywords.SUBGRAPH_START_VERTEX); + g.setLabelKey(g.getDest(edge).getLabelKey()); + logger.debug("Found sub-graph: '" + g.getLabelKey() + "', in file '" + g.getFileKey() + "'"); + logger.debug("Added SUBGRAPH_START_VERTEX to vertex: " + g.getDest(edge).getIndexKey()); + } + } + } + } + + if (graph == null) { + throw new RuntimeException("Did not find a Start vertex with an out edge with a label."); + } + } + + /** + * Look for duplicated vertices in each sub-graph. If a vertex is found, which + * represents the name of the sub-graph (the vertex which the Start vertex + * points to) is duplicated in the same sub-graph, this will lead to an + * infinite recursive loop. + */ + private void checkForDuplicateVerticesInSubgraphs() { + for (int i = 0; i < parsedGraphList.size(); i++) { + Graph g = parsedGraphList.elementAt(i); + + // Exclude the mother graph + if (graph.hashCode() == g.hashCode()) { + continue; + } + + logger.debug("Looking for infinit recursive loop in file: " + g.getFileKey()); + + String subgraph_label = g.getLabelKey(); + Object[] vertices = g.getVertices().toArray(); + for (Object vertice : vertices) { + Vertex v = (Vertex) vertice; + String label = v.getLabelKey(); + if (label.equals(subgraph_label)) { + if (!v.getSubGraphStartVertexKey().isEmpty()) { + continue; + } + if (v.isNoMergeKey()) { + continue; + } + + logger.error("Vertex: " + label + ", with id: " + v.getIndexKey() + ", is a duplicate in a subgraph"); + throw new RuntimeException("Found a subgraph containing a duplicate vertex with name: '" + v.getLabelKey() + "', in file: '" + + g.getFileKey() + "'"); + + } + } + logger.debug("Nope! Did not find any infinit recursive loops."); + } + } + + private void mergeSubgraphs() { + for (int i = 0; i < parsedGraphList.size(); i++) { + Graph g = parsedGraphList.elementAt(i); + + if (graph.hashCode() == g.hashCode()) { + continue; + } + logger.debug("Analysing graph in file: " + g.getFileKey()); + + Object[] vertices = graph.getVertices().toArray(); + for (int j = 0; j < vertices.length; j++) { + Vertex v1 = (Vertex) vertices[j]; + logger.debug("Investigating vertex(" + v1.getIndexKey() + "): '" + v1.getLabelKey() + "'"); + + if (v1.getLabelKey().equals(g.getLabelKey())) { + if (v1.isMergeKey()) { + logger.debug("The vertex is marked MERGE, and will not be replaced by a subgraph."); + continue; + } + if (v1.isNoMergeKey()) { + logger.debug("The vertex is marked NO_MERGE, and will not be replaced by a subgraph."); + continue; + } + if (v1.isMergedMbtKey()) { + logger.debug("The vertex is marked MERGED_BY_MBT, and will not be replaced by a subgraph."); + continue; + } + + logger.debug("A subgraph'ed vertex: '" + v1.getLabelKey() + "' in graph: " + g.getFileKey() + + ", equals a node in the graph in file: '" + graph.getFileKey() + "'"); + + appendGraph(graph, g); + copySubGraphs(graph, g, v1); + + vertices = graph.getVertices().toArray(); + i = -1; + j = -1; + } + } + } + } + + /** + * Merge all vertices marked MERGE + */ + private void mergeVerticesMarked_MERGE() { + Object[] list1 = graph.getVertices().toArray(); + for (Object aList1 : list1) { + Vertex v1 = (Vertex) aList1; + + if (!v1.isMergeKey()) { + continue; + } + + Object[] list2 = graph.getVertices().toArray(); + Vector mergedVertices = new Vector(); + for (Object aList2 : list2) { + Vertex v2 = (Vertex) aList2; + + if (!v1.getLabelKey().equals(v2.getLabelKey())) { + continue; + } + if (v2.isNoMergeKey()) { + continue; + } + if (v1.getIndexKey().equals(v2.getIndexKey())) { + continue; + } + if (mergedVertices.contains(v1)) { + continue; + } + + logger.debug("Merging vertex(" + v1.getIndexKey() + "): '" + v1.getLabelKey() + "' with vertex (" + v2.getIndexKey() + ")"); + + Object[] inEdges = graph.getInEdges(v1).toArray(); + for (Object inEdge : inEdges) { + Edge edge = (Edge) inEdge; + Edge new_edge = new Edge(edge); + new_edge.setIndexKey(getNewVertexAndEdgeIndex()); + graph.addEdge(new_edge, graph.getSource(edge), v2); + } + Object[] outEdges = graph.getOutEdges(v1).toArray(); + for (Object outEdge : outEdges) { + Edge edge = (Edge) outEdge; + Edge new_edge = new Edge(edge); + new_edge.setIndexKey(getNewVertexAndEdgeIndex()); + graph.addEdge(new_edge, v2, graph.getDest(edge)); + } + mergedVertices.add(v1); + } + + if (!mergedVertices.isEmpty()) { + logger.debug("Remvoing merged vertex(" + v1.getIndexKey() + ")"); + graph.removeVertex(v1); + } + } + } + + /** + * Search for any vertices with no in edges + * + * @throws RuntimeException + */ + private void checkForVerticesWithZeroInEdges() throws RuntimeException { + Object[] vs = graph.getVertices().toArray(); + for (Object v1 : vs) { + Vertex v = (Vertex) v1; + if (!v.getLabelKey().equalsIgnoreCase(Keywords.START_NODE)) { + if (graph.getInEdges(v).toArray().length == 0) { + String msg = "No in-edges! " + v + " is not reachable," + " from file: '" + v.getFileKey() + "'"; + logger.error(msg); + throw new RuntimeException(msg); + } + } + } + } + + /** + * Copies the graph src, into the graph dst + * + * @param dst + * @param src + */ + private void appendGraph(Graph dst, Graph src) { + HashMap map = new HashMap(); + Object[] vertices = src.getVertices().toArray(); + for (Object vertice : vertices) { + Vertex v = (Vertex) vertice; + if (v.getLabelKey().equalsIgnoreCase(Keywords.START_NODE)) { + continue; + } + Vertex new_v = new Vertex(v); + new_v.setIndexKey(getNewVertexAndEdgeIndex()); + dst.addVertex(new_v); + logger.debug("Associated vertex: " + v + " to new vertex: " + new_v); + map.put(v.getIndexKey(), new_v); + } + Object[] edges = src.getEdges().toArray(); + for (Object edge : edges) { + Edge e = (Edge) edge; + Vertex v1 = map.get(src.getSource(e).getIndexKey()); + Vertex v2 = map.get(src.getDest(e).getIndexKey()); + if (v1 == null || v2 == null) { + continue; + } + Edge new_e = new Edge(e); + dst.addEdge(new_e, v1, v2); + new_e.setIndexKey(getNewVertexAndEdgeIndex()); + } + } + + /** + * Replaces the vertex targetVertex and all its in and out edges, in the graph + * g, with all other vertices with the same name. + * + * @param mainGraph + * @param subGraph + * @param targetVertex + */ + private void copySubGraphs(Graph mainGraph, Graph subGraph, Vertex targetVertex) { + // Save the target vertex out-edge list + Vector targetVertexOutEdgeList = new Vector(); + logger.debug("Target vertex (" + targetVertex + ") out-edge list"); + for (Edge element : mainGraph.getOutEdges(targetVertex)) { + logger.debug(" " + element); + targetVertexOutEdgeList.add(element); + } + + Vertex sourceVertex = null; + Object[] vertices = mainGraph.getVertices().toArray(); + for (Object vertice : vertices) { + Vertex v = (Vertex) vertice; + if (v.getLabelKey().equals(targetVertex.getLabelKey())) { + if (v.getSubGraphStartVertexKey().isEmpty()) { + continue; + } + if (v.isMergeKey()) { + continue; + } + if (v.isNoMergeKey()) { + continue; + } + if (v.isMergedMbtKey()) { + continue; + } + if (v.getIndexKey().equals(targetVertex.getIndexKey())) { + continue; + } + + sourceVertex = v; + break; + } + } + + if (sourceVertex == null) { + return; + } + + logger.debug("Start merging target vertex: " + targetVertex + " with source vertex: " + sourceVertex); + + Object[] inEdges = mainGraph.getInEdges(sourceVertex).toArray(); + for (Object inEdge : inEdges) { + Edge edge = (Edge) inEdge; + Edge new_edge = new Edge(edge); + mainGraph.addEdge(new_edge, mainGraph.getSource(edge), targetVertex); + new_edge.setIndexKey(getNewVertexAndEdgeIndex()); + } + Object[] outEdges = mainGraph.getOutEdges(sourceVertex).toArray(); + for (Object outEdge : outEdges) { + Edge edge = (Edge) outEdge; + Edge new_edge = new Edge(edge); + mainGraph.addEdge(new_edge, targetVertex, mainGraph.getDest(edge)); + new_edge.setIndexKey(getNewVertexAndEdgeIndex()); + } + logger.debug("Remvoing source vertex: " + sourceVertex); + mainGraph.removeVertex(sourceVertex); + targetVertex.setMergedMbtKey(true); + + // Check if there exists a Stop vertex. + // Also check if there is only one. + Vertex stopVertex = null; + vertices = mainGraph.getVertices().toArray(); + for (Object vertice : vertices) { + Vertex v = (Vertex) vertice; + if (v.getLabelKey().equalsIgnoreCase(Keywords.STOP_NODE)) { + if (stopVertex != null) { + throw new RuntimeException("Found more than 1 Stop vertex in file (Only one Stop vertex per file is allowed): '" + + mainGraph.getFileKey() + "'"); + } + stopVertex = v; + } + } + + // All edges going to the Stop vertex, needs to be merged to the destination + // vertex. + // The destination vertex, is pointed to by the vertex which is expanded by + // the sub graph. + if (stopVertex != null) { + Vector edgesToBeRemoved = new Vector(); + inEdges = mainGraph.getInEdges(stopVertex).toArray(); + + logger.debug("Stop vertex in-edge list"); + for (Edge element : mainGraph.getInEdges(stopVertex)) { + logger.debug(" " + element); + } + logger.debug("Target vertex (" + targetVertex + ") out-edge list"); + for (Edge element : targetVertexOutEdgeList) { + logger.debug(" " + element); + } + + Vector> mergeList = MergeList(targetVertexOutEdgeList.toArray(), inEdges); + for (Pair pair : mergeList) { + MergeOutEdgeAndInEdge(pair.getFirst(), pair.getSecond(), edgesToBeRemoved, mainGraph); + } + + // Now remove the edges that has been copied. + Object[] list = edgesToBeRemoved.toArray(); + for (Object aList : list) { + Edge element = (Edge) aList; + if (mainGraph.containsEdge(element)) { + try { + logger.debug("Removing edge: " + element); + logger.debug(element + ", was found and removed from graph,: '" + mainGraph.getFileKey() + "'"); + mainGraph.removeEdge(element); + } catch (IllegalArgumentException e) { + logger.debug(element + ", was not found in graph: '" + mainGraph.getFileKey() + + "', this is ok, since it probably been removed before. (I know, not ver good progamming practice here)"); + } + } + } + logger.debug("Removing the Stop vertex: " + stopVertex.getIndexKey()); + mainGraph.removeVertex(stopVertex); + } + } + + private Vector> MergeList(Object[] array_A, Object[] array_B) { + logger.debug("Vector twoLists( Object[] array_A, Object[] array_B )"); + Vector> matches = new Vector>(); + logger.debug(" Looking for exact matches"); + for (Object anArray_A : array_A) { + Edge a = (Edge) anArray_A; + String aLabel = a.getLabelKey(); + for (Object anArray_B : array_B) { + Edge b = (Edge) anArray_B; + String bLabel = b.getLabelKey(); + if (aLabel != null && aLabel.length() == 0) { + aLabel = null; + } + if (bLabel != null && bLabel.length() == 0) { + bLabel = null; + } + if (aLabel == null && bLabel == null) { + logger.debug(" adding: " + a + " and " + b); + matches.add(new Pair(a, b)); + } else if (aLabel != null && bLabel != null) { + if (aLabel.equals(bLabel)) { + logger.debug(" adding: " + a + " and " + b); + matches.add(new Pair(a, b)); + } + } + } + } + + Vector> null_matches_from_A_list = new Vector>(); + logger.debug(" Matching nulls from the A list with non-matched items in the second list"); + for (Object anArray_A : array_A) { + Edge a = (Edge) anArray_A; + String aLabel = a.getLabelKey(); + if (aLabel == null || aLabel.length() == 0) { + for (Object anArray_B : array_B) { + Edge b = (Edge) anArray_B; + String bLabel = b.getLabelKey(); + if (bLabel != null) { + boolean alreadyMatched = false; + for (Pair element : matches) { + if (b.equals(element.getSecond())) { + alreadyMatched = true; + break; + } + } + + if (!alreadyMatched) { + logger.debug(" adding: " + a + " and " + b); + null_matches_from_A_list.add(new Pair(a, b)); + } + } + } + } + } + + Vector> null_matches_from_B_list = new Vector>(); + logger.debug(" Matching nulls from the B list with non-matched items in the first list"); + for (Object anArray_B : array_B) { + Edge b = (Edge) anArray_B; + String bLabel = b.getLabelKey(); + if (bLabel == null || bLabel.length() == 0) { + for (Object anArray_A : array_A) { + Edge a = (Edge) anArray_A; + String aLabel = a.getLabelKey(); + if (aLabel != null) { + boolean alreadyMatched = false; + for (Pair element : matches) { + if (a.equals(element.getFirst())) { + alreadyMatched = true; + break; + } + } + + if (!alreadyMatched) { + logger.debug(" adding: " + a + " and " + b); + null_matches_from_B_list.add(new Pair(a, b)); + } + } + } + } + } + matches.addAll(null_matches_from_A_list); + matches.addAll(null_matches_from_B_list); + return matches; + } + + private void MergeOutEdgeAndInEdge(Edge outEdge, Edge inEdge, Vector edgesToBeRemoved, Graph graph) { + logger.debug("MergeOutEdgeAndInEdge"); + + if (outEdge == null) { + throw new RuntimeException("Internal progamming error"); + } + if (inEdge == null) { + throw new RuntimeException("Internal progamming error"); + } + + logger.debug(" outEdge: " + outEdge); + logger.debug(" inEdge: " + inEdge); + + Edge new_edge = new Edge(inEdge, outEdge); + graph.addEdge(new_edge, graph.getSource(inEdge), graph.getDest(outEdge)); + + new_edge.setIndexKey(getNewVertexAndEdgeIndex()); + logger.debug(" Replacing the target vertex out-edge: " + outEdge + " (old) with: " + new_edge + "(new), using: " + inEdge); + + edgesToBeRemoved.add(inEdge); + edgesToBeRemoved.add(outEdge); + } + + /** + * Writes the graph to a PrintStream, using GraphML format. + */ + @Override + public void save(PrintStream ps, boolean printIndex) { + Graph g = getModel(); + + ps.println(""); + ps.println(""); + ps.println(" "); + ps.println(" "); + ps.println(" "); + + for (Vertex v : g.getVertices()) { + ps.println(" "); + ps.println(" "); + + if (!v.getImageKey().isEmpty()) { + ps.println(" "); + ps.println(" "); + } else { + ps.println(" "); + ps.println(" "); + } + + ps.println(" "); + ps.println(" "); + ps.print(" " + + v.getFullLabelKey()); + if (printIndex) { + ps.print(" INDEX=" + v.getIndexKey()); + } + + ps.println(""); + + if (!v.getImageKey().isEmpty()) { + ps.println(" "); + ps.println(" "); + } else { + ps.println(" "); + ps.println(" "); + } + + ps.println(" "); + ps.println(" "); + } + + for (Edge e : g.getEdges()) { + Pair p = graph.getEndpoints(e); + Vertex src = p.getFirst(); + Vertex dest = p.getSecond(); + + ps.println(" "); + ps.println(" "); + ps.println(" "); + ps.println(" "); + ps.println(" "); + ps.println(" "); + ps.println(" "); + ps.println(" "); + ps.println(" "); + ps.println(" "); + ps.println(" "); + + if (!e.getFullLabelKey().isEmpty()) { + String label = e.getFullLabelKey(); + label = label.replaceAll("&", "&"); + label = label.replaceAll("<", "<"); + label = label.replaceAll(">", ">"); + label = label.replaceAll("'", "'"); + label = label.replaceAll("\"", """); + + ps.println(" " + label); + if (printIndex) { + ps.print(" INDEX=" + e.getIndexKey()); + } + ps.println(""); + } + + ps.println(" "); + ps.println(" "); + ps.println(" "); + ps.println(" "); + + } + + ps.println(" "); + ps.println(""); + + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java index 8af3cbb8..c7bbfb32 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java @@ -38,40 +38,40 @@ public class ParseLog { - public static class LoggedItem { - public Integer index = null; - public String data = null; - } + public static class LoggedItem { + public Integer index = null; + public String data = null; + } - public static Vector readLog(File logFile) throws IOException { - Vector list = new Vector(); - FileReader reader = null; - try { - reader = new FileReader(logFile); - BufferedReader file = new BufferedReader(reader); - String line; - while ((line = file.readLine()) != null) { - Pattern p = Pattern.compile("INFO - (Vertex|Edge): '(\\S*)', INDEX=(\\d+) "); - Matcher m = p.matcher(line); - if (m.find()) { - LoggedItem item = new LoggedItem(); - item.index = Integer.valueOf(m.group(3)); - if (m.group(1).equals("Vertex")) { - p = Pattern.compile("DATA: (.*)"); - m = p.matcher(line); - if (m.find()) { - item.data = m.group(1); - } - } - list.add(item); - } - } - file.close(); - } catch (IOException e) { - throw e; // TODO: - } finally { - Util.closeQuietly(reader); - } - return list; - } + public static Vector readLog(File logFile) throws IOException { + Vector list = new Vector(); + FileReader reader = null; + try { + reader = new FileReader(logFile); + BufferedReader file = new BufferedReader(reader); + String line; + while ((line = file.readLine()) != null) { + Pattern p = Pattern.compile("INFO - (Vertex|Edge): '(\\S*)', INDEX=(\\d+) "); + Matcher m = p.matcher(line); + if (m.find()) { + LoggedItem item = new LoggedItem(); + item.index = Integer.valueOf(m.group(3)); + if (m.group(1).equals("Vertex")) { + p = Pattern.compile("DATA: (.*)"); + m = p.matcher(line); + if (m.find()) { + item.data = m.group(1); + } + } + list.add(item); + } + } + file.close(); + } catch (IOException e) { + throw e; // TODO: + } finally { + Util.closeQuietly(reader); + } + return list; + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java index fcbe1fa0..b344f294 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java @@ -31,64 +31,64 @@ public class PrintHTMLTestSequence { - public PrintHTMLTestSequence(Vector testSequence, PrintStream out) { - writeHTML(testSequence, out); - } + public PrintHTMLTestSequence(Vector testSequence, PrintStream out) { + writeHTML(testSequence, out); + } - private void writeHTML(Vector testSequence, PrintStream out) { + private void writeHTML(Vector testSequence, PrintStream out) { - header(out); + header(out); - int index = 1; - for (String[] string : testSequence) { + int index = 1; + for (String[] string : testSequence) { - out.println("

"); - out.println(""); - out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println("
"); - out.println("

" + string[0] + "

"); - out.println(""); + out.println("

"); + out.println("

"); + out.println("
"); + out.println("

" + string[0] + "

"); + out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println("
StepActionExpected Result
" + index++ + "" + string[1] + "" + string[2] + "
"); - out.println("
"); - out.println("

"); - } + out.println("
StepActionExpected Result
" + index++ + "" + string[1] + "" + string[2] + "
"); + out.println(""); + out.println("

"); + } - footer(out); - } + footer(out); + } - private void header(PrintStream out) { - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println("Test Sequence made by MBT"); - out.println(""); - out.println(""); - out.println(""); + private void header(PrintStream out) { + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println("Test Sequence made by MBT"); + out.println(""); + out.println(""); + out.println(""); - out.println(""); - } + out.println(""); + } - private void footer(PrintStream out) { - out.println(""); - out.println(""); - } + private void footer(PrintStream out) { + out.println(""); + out.println(""); + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java b/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java index f8b31b1e..4c692c6f 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java @@ -26,26 +26,7 @@ package org.graphwalker.core.machines; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.PrintStream; -import java.util.Arrays; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.Set; -import java.util.Stack; -import java.util.Map.Entry; - -import javax.script.Bindings; -import javax.script.ScriptContext; -import javax.script.ScriptEngine; -import javax.script.ScriptEngineManager; -import javax.script.ScriptException; - +import bsh.*; import org.apache.log4j.Logger; import org.graphwalker.core.Util; import org.graphwalker.core.exceptions.FoundNoEdgeException; @@ -53,322 +34,319 @@ import org.graphwalker.core.filters.AccessableEdgeFilter; import org.graphwalker.core.graph.Edge; -import bsh.EvalError; -import bsh.Interpreter; -import bsh.NameSpace; -import bsh.Primitive; -import bsh.UtilEvalError; +import javax.script.*; +import java.io.*; +import java.util.*; +import java.util.Map.Entry; public class ExtendedFiniteStateMachine extends FiniteStateMachine { - private PrintStream Void; - - private static Logger logger = Util.setupLogger(ExtendedFiniteStateMachine.class); - - private Interpreter beanShellEngine = null; - private AccessableEdgeFilter accessableFilter; - - private ScriptEngineManager mgr = null; - private ScriptEngine jsEngine = null; - - private Stack namespaceStack; - - private PrintStream oldPrintStream; - - public ExtendedFiniteStateMachine(boolean usingJsEngine) { - super(); - namespaceStack = new Stack(); - if (usingJsEngine) { - mgr = new ScriptEngineManager(); - jsEngine = mgr.getEngineByExtension("js"); - accessableFilter = new AccessableEdgeFilter(jsEngine); - } else { - beanShellEngine = new Interpreter(); - accessableFilter = new AccessableEdgeFilter(beanShellEngine); - } - Void = new VoidPrintStream(); - } - - public void eval(String script) { - if (jsEngine != null) { - try { - jsEngine.eval(script); - } catch (ScriptException e) { - logger.error("Problem when running: '" + script + "' in BeanShell"); - logger.error("EvalError: " + e); - logger.error(e.getCause()); - throw new RuntimeException("Execution of startup script generated an error.", e); - } - } else if (beanShellEngine != null) { - try { - beanShellEngine.eval(script); - } catch (EvalError e) { - logger.error("Problem when running: '" + script + "' in BeanShell"); - logger.error("EvalError: " + e); - logger.error(e.getCause()); - throw new RuntimeException("Execution of startup script generated an error.", e); - } - } - } - - @Override - public String getCurrentVertexName() { - return super.getCurrentVertexName() + (hasInternalVariables() ? "/" + getCurrentDataString() : ""); - } - - @Override - public Set getCurrentOutEdges() throws FoundNoEdgeException { - Set retur = super.getCurrentOutEdges(); - for (Iterator i = retur.iterator(); i.hasNext();) { - Edge e = i.next(); - if (!accessableFilter.acceptEdge(getModel(), e)) { - logger.debug("Not accessable: " + e + " from " + getCurrentVertexName()); - i.remove(); - } else { - logger.debug("Accessable: " + e + " from " + getCurrentVertexName()); - } - } - if (retur.size() == 0) { - throw new FoundNoEdgeException("Cul-De-Sac, dead end found in '" + getCurrentVertex() + "'"); - } - return retur; - } - - @Override - public boolean hasInternalVariables() { - if (jsEngine != null) { - return !jsEngine.getBindings(ScriptContext.ENGINE_SCOPE).isEmpty(); - } else if (beanShellEngine != null) { - return beanShellEngine.getNameSpace().getVariableNames().length > 1; - } - return false; - } - - public Set> getCurrentJsEngineData() { - Bindings bindings = jsEngine.getBindings(ScriptContext.ENGINE_SCOPE); - return bindings.entrySet(); - } - - public Hashtable getCurrentBeanShellData() { - Hashtable retur = new Hashtable(); - if (!hasInternalVariables()) - return retur; - - int i = 0; - NameSpace ns = beanShellEngine.getNameSpace(); - String[] variableNames = beanShellEngine.getNameSpace().getVariableNames(); - try { - for (; i < variableNames.length; i++) { - if (!variableNames[i].equals("bsh")) { - retur.put(variableNames[i], Primitive.unwrap(ns.getVariable(variableNames[i]))); - } - } - } catch (UtilEvalError e) { - throw new RuntimeException("Malformed model data: " + variableNames[i] + "\nBeanShell error message: '" + e.getMessage() + "'"); - } catch (NullPointerException e) { - logger.warn("Did not get data/value for: " + variableNames[i]); - return retur; - } - return retur; - } - - /** - * Walks the data space, and return the value of the data, if found. - * - * @param dataName - * @return - * @throws InvalidDataException - * is thrown if the data is not found in the data space - */ - public String getDataValue(String dataName) { - if (jsEngine != null) { - return jsEngine.get(dataName).toString(); - } else if (beanShellEngine != null) { - Hashtable dataTable = getCurrentBeanShellData(); - if (dataTable.containsKey(dataName)) { - if (dataTable.get(dataName) instanceof Object[]) { - return Arrays.deepToString((Object[]) dataTable.get(dataName)); - } else { - return dataTable.get(dataName).toString(); - } - } - } - return ""; - } - - /** - * Executes an action, and returns any outcome as a string. - * - * @param action - * @return - * @throws InvalidDataException - * is thrown if the data is not found in the data space - */ - public String execAction(String action) throws InvalidDataException { - logger.debug("Will try to execute: " + action); - Object res = null; - if (jsEngine != null) { - try { - res = jsEngine.eval(action); - } catch (ScriptException e) { - throw new InvalidDataException("The action: '" + action + "', does not evaluate correctly. Detail: " + e.getMessage()); - } - } else if (beanShellEngine != null) { - try { - res = beanShellEngine.eval(action); - } catch (EvalError e) { - throw new InvalidDataException("The action: '" + action + "', does not evaluate correctly. Detail: " + e.getMessage()); - } - } - return res.toString(); - } - - @Override - public String getCurrentDataString() { - String retur = ""; - - if (jsEngine != null) { - Set> dataTable = getCurrentJsEngineData(); - for (Entry entry : dataTable) { - if (!entry.getKey().equals("println") && !entry.getKey().equals("print") && !entry.getKey().equals("context")) - retur += entry.getKey() + "=" + entry.getValue() + ";"; - } - } else if (beanShellEngine != null) { - Hashtable dataTable = getCurrentBeanShellData(); - Enumeration e = dataTable.keys(); - while (e.hasMoreElements()) { - String key = e.nextElement(); - String data = ""; - if (dataTable.get(key) instanceof Object[]) { - data = Arrays.deepToString((Object[]) dataTable.get(key)); - } else { - data = dataTable.get(key).toString(); - } - retur += key + "=" + data + ";"; - } - } - return retur; - } - - @Override - public boolean walkEdge(Edge edge) { - boolean hasWalkedEdge = super.walkEdge(edge); - if (hasWalkedEdge) { - if (hasAction(edge)) { - PrintStream ps = System.out; - System.setOut(Void); - - if (jsEngine != null) { - try { - jsEngine.eval(getAction(edge)); - } catch (ScriptException e) { - logger.error("Problem when running: '" + getAction(edge) + "' in Java Script engine"); - logger.error("EvalError: " + e); - logger.error(e.getCause()); - throw new RuntimeException("Malformed action sequence\n\t" + edge + "\n\tAction sequence: " + edge.getActionsKey() - + "\n\tJava Script error message: '" + e.getMessage() + "'\nDetails: " + e.getCause()); - } finally { - System.setOut(ps); - } - } else if (beanShellEngine != null) { - try { - beanShellEngine.eval(getAction(edge)); - } catch (EvalError e) { - logger.error("Problem when running: '" + getAction(edge) + "' in BeanShell"); - logger.error("EvalError: " + e); - logger.error(e.getCause()); - throw new RuntimeException("Malformed action sequence\n\t" + edge + "\n\tAction sequence: " + edge.getActionsKey() - + "\n\tBeanShell error message: '" + e.getMessage() + "'\nDetails: " + e.getCause()); - } finally { - System.setOut(ps); - } - } - } - } - return hasWalkedEdge; - } - - private String getAction(Edge edge) { - return (edge == null ? "" : edge.getActionsKey()); - } - - private boolean hasAction(Edge edge) { - return (edge == null ? false : !edge.getActionsKey().isEmpty()); - } - - @Override - protected void track() { - super.track(); - if (jsEngine != null) { - } else if (beanShellEngine != null) { - namespaceStack.push(new CannedNameSpace(beanShellEngine.getNameSpace())); - } - } - - @Override - protected void popVertex() { - super.popVertex(); - if (jsEngine != null) { - } else if (beanShellEngine != null) { - beanShellEngine.setNameSpace((namespaceStack.pop()).unpack()); - } - } - - private class CannedNameSpace { - byte[] store; - - public CannedNameSpace(NameSpace objNameSpace) { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - ObjectOutputStream oos; - try { - oos = new ObjectOutputStream(baos); - oos.writeObject(objNameSpace); - } catch (IOException e) { - throw new RuntimeException("Unable to store backtrack information due to a IOException.", e); - } - store = baos.toByteArray(); - } - - public NameSpace unpack() { - ByteArrayInputStream bais = new ByteArrayInputStream(store); - ObjectInputStream ois; - try { - ois = new ObjectInputStream(bais); - return (NameSpace) ois.readObject(); - } catch (IOException e) { - throw new RuntimeException("Unable to restore backtrack information due to a IOException.", e); - } catch (ClassNotFoundException e) { - throw new RuntimeException("Unable to restore backtrack information as the NameSpace Class could not be found.", e); - } - } - } - - @Override - public void setCalculatingPath(boolean calculatingPath) { - super.setCalculatingPath(calculatingPath); - if (calculatingPath && this.oldPrintStream != System.out) { - this.oldPrintStream = System.out; - System.setOut(new VoidPrintStream()); - } else if (!calculatingPath && this.oldPrintStream != System.out) { - System.setOut(this.oldPrintStream); - } - } - - private class VoidPrintStream extends PrintStream { - public VoidPrintStream() { - super(System.out); - } - - @Override - public void write(byte[] buf, int off, int len) { - } - } - - public boolean isJsEnabled() { - return jsEngine != null; - } - - public boolean isBeanShellEnabled() { - return beanShellEngine != null; - } + private PrintStream Void; + + private static Logger logger = Util.setupLogger(ExtendedFiniteStateMachine.class); + + private Interpreter beanShellEngine = null; + private AccessableEdgeFilter accessableFilter; + + private ScriptEngineManager mgr = null; + private ScriptEngine jsEngine = null; + + private Stack namespaceStack; + + private PrintStream oldPrintStream; + + public ExtendedFiniteStateMachine(boolean usingJsEngine) { + super(); + namespaceStack = new Stack(); + if (usingJsEngine) { + mgr = new ScriptEngineManager(); + jsEngine = mgr.getEngineByExtension("js"); + accessableFilter = new AccessableEdgeFilter(jsEngine); + } else { + beanShellEngine = new Interpreter(); + accessableFilter = new AccessableEdgeFilter(beanShellEngine); + } + Void = new VoidPrintStream(); + } + + public void eval(String script) { + if (jsEngine != null) { + try { + jsEngine.eval(script); + } catch (ScriptException e) { + logger.error("Problem when running: '" + script + "' in BeanShell"); + logger.error("EvalError: " + e); + logger.error(e.getCause()); + throw new RuntimeException("Execution of startup script generated an error.", e); + } + } else if (beanShellEngine != null) { + try { + beanShellEngine.eval(script); + } catch (EvalError e) { + logger.error("Problem when running: '" + script + "' in BeanShell"); + logger.error("EvalError: " + e); + logger.error(e.getCause()); + throw new RuntimeException("Execution of startup script generated an error.", e); + } + } + } + + @Override + public String getCurrentVertexName() { + return super.getCurrentVertexName() + (hasInternalVariables() ? "/" + getCurrentDataString() : ""); + } + + @Override + public Set getCurrentOutEdges() throws FoundNoEdgeException { + Set retur = super.getCurrentOutEdges(); + for (Iterator i = retur.iterator(); i.hasNext(); ) { + Edge e = i.next(); + if (!accessableFilter.acceptEdge(getModel(), e)) { + logger.debug("Not accessable: " + e + " from " + getCurrentVertexName()); + i.remove(); + } else { + logger.debug("Accessable: " + e + " from " + getCurrentVertexName()); + } + } + if (retur.size() == 0) { + throw new FoundNoEdgeException("Cul-De-Sac, dead end found in '" + getCurrentVertex() + "'"); + } + return retur; + } + + @Override + public boolean hasInternalVariables() { + if (jsEngine != null) { + return !jsEngine.getBindings(ScriptContext.ENGINE_SCOPE).isEmpty(); + } else if (beanShellEngine != null) { + return beanShellEngine.getNameSpace().getVariableNames().length > 1; + } + return false; + } + + public Set> getCurrentJsEngineData() { + Bindings bindings = jsEngine.getBindings(ScriptContext.ENGINE_SCOPE); + return bindings.entrySet(); + } + + public Hashtable getCurrentBeanShellData() { + Hashtable retur = new Hashtable(); + if (!hasInternalVariables()) + return retur; + + int i = 0; + NameSpace ns = beanShellEngine.getNameSpace(); + String[] variableNames = beanShellEngine.getNameSpace().getVariableNames(); + try { + for (; i < variableNames.length; i++) { + if (!variableNames[i].equals("bsh")) { + retur.put(variableNames[i], Primitive.unwrap(ns.getVariable(variableNames[i]))); + } + } + } catch (UtilEvalError e) { + throw new RuntimeException("Malformed model data: " + variableNames[i] + "\nBeanShell error message: '" + e.getMessage() + "'"); + } catch (NullPointerException e) { + logger.warn("Did not get data/value for: " + variableNames[i]); + return retur; + } + return retur; + } + + /** + * Walks the data space, and return the value of the data, if found. + * + * @param dataName + * @return + * @throws InvalidDataException is thrown if the data is not found in the data space + */ + public String getDataValue(String dataName) { + if (jsEngine != null) { + return jsEngine.get(dataName).toString(); + } else if (beanShellEngine != null) { + Hashtable dataTable = getCurrentBeanShellData(); + if (dataTable.containsKey(dataName)) { + if (dataTable.get(dataName) instanceof Object[]) { + return Arrays.deepToString((Object[]) dataTable.get(dataName)); + } else { + return dataTable.get(dataName).toString(); + } + } + } + return ""; + } + + /** + * Executes an action, and returns any outcome as a string. + * + * @param action + * @return + * @throws InvalidDataException is thrown if the data is not found in the data space + */ + public String execAction(String action) throws InvalidDataException { + logger.debug("Will try to execute: " + action); + Object res = null; + if (jsEngine != null) { + try { + res = jsEngine.eval(action); + } catch (ScriptException e) { + throw new InvalidDataException("The action: '" + action + "', does not evaluate correctly. Detail: " + e.getMessage()); + } + } else if (beanShellEngine != null) { + try { + res = beanShellEngine.eval(action); + } catch (EvalError e) { + throw new InvalidDataException("The action: '" + action + "', does not evaluate correctly. Detail: " + e.getMessage()); + } + } + return res.toString(); + } + + @Override + public String getCurrentDataString() { + String retur = ""; + + if (jsEngine != null) { + Set> dataTable = getCurrentJsEngineData(); + for (Entry entry : dataTable) { + if (!entry.getKey().equals("println") && !entry.getKey().equals("print") && !entry.getKey().equals("context")) + retur += entry.getKey() + "=" + entry.getValue() + ";"; + } + } else if (beanShellEngine != null) { + Hashtable dataTable = getCurrentBeanShellData(); + Enumeration e = dataTable.keys(); + while (e.hasMoreElements()) { + String key = e.nextElement(); + String data = ""; + if (dataTable.get(key) instanceof Object[]) { + data = Arrays.deepToString((Object[]) dataTable.get(key)); + } else { + data = dataTable.get(key).toString(); + } + retur += key + "=" + data + ";"; + } + } + return retur; + } + + @Override + public boolean walkEdge(Edge edge) { + boolean hasWalkedEdge = super.walkEdge(edge); + if (hasWalkedEdge) { + if (hasAction(edge)) { + PrintStream ps = System.out; + System.setOut(Void); + + if (jsEngine != null) { + try { + jsEngine.eval(getAction(edge)); + } catch (ScriptException e) { + logger.error("Problem when running: '" + getAction(edge) + "' in Java Script engine"); + logger.error("EvalError: " + e); + logger.error(e.getCause()); + throw new RuntimeException("Malformed action sequence\n\t" + edge + "\n\tAction sequence: " + edge.getActionsKey() + + "\n\tJava Script error message: '" + e.getMessage() + "'\nDetails: " + e.getCause()); + } finally { + System.setOut(ps); + } + } else if (beanShellEngine != null) { + try { + beanShellEngine.eval(getAction(edge)); + } catch (EvalError e) { + logger.error("Problem when running: '" + getAction(edge) + "' in BeanShell"); + logger.error("EvalError: " + e); + logger.error(e.getCause()); + throw new RuntimeException("Malformed action sequence\n\t" + edge + "\n\tAction sequence: " + edge.getActionsKey() + + "\n\tBeanShell error message: '" + e.getMessage() + "'\nDetails: " + e.getCause()); + } finally { + System.setOut(ps); + } + } + } + } + return hasWalkedEdge; + } + + private String getAction(Edge edge) { + return (edge == null ? "" : edge.getActionsKey()); + } + + private boolean hasAction(Edge edge) { + return (edge == null ? false : !edge.getActionsKey().isEmpty()); + } + + @Override + protected void track() { + super.track(); + if (jsEngine != null) { + } else if (beanShellEngine != null) { + namespaceStack.push(new CannedNameSpace(beanShellEngine.getNameSpace())); + } + } + + @Override + protected void popVertex() { + super.popVertex(); + if (jsEngine != null) { + } else if (beanShellEngine != null) { + beanShellEngine.setNameSpace((namespaceStack.pop()).unpack()); + } + } + + private class CannedNameSpace { + byte[] store; + + public CannedNameSpace(NameSpace objNameSpace) { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ObjectOutputStream oos; + try { + oos = new ObjectOutputStream(baos); + oos.writeObject(objNameSpace); + } catch (IOException e) { + throw new RuntimeException("Unable to store backtrack information due to a IOException.", e); + } + store = baos.toByteArray(); + } + + public NameSpace unpack() { + ByteArrayInputStream bais = new ByteArrayInputStream(store); + ObjectInputStream ois; + try { + ois = new ObjectInputStream(bais); + return (NameSpace) ois.readObject(); + } catch (IOException e) { + throw new RuntimeException("Unable to restore backtrack information due to a IOException.", e); + } catch (ClassNotFoundException e) { + throw new RuntimeException("Unable to restore backtrack information as the NameSpace Class could not be found.", e); + } + } + } + + @Override + public void setCalculatingPath(boolean calculatingPath) { + super.setCalculatingPath(calculatingPath); + if (calculatingPath && this.oldPrintStream != System.out) { + this.oldPrintStream = System.out; + System.setOut(new VoidPrintStream()); + } else if (!calculatingPath && this.oldPrintStream != System.out) { + System.setOut(this.oldPrintStream); + } + } + + private class VoidPrintStream extends PrintStream { + public VoidPrintStream() { + super(System.out); + } + + @Override + public void write(byte[] buf, int off, int len) { + } + } + + public boolean isJsEnabled() { + return jsEngine != null; + } + + public boolean isBeanShellEnabled() { + return beanShellEngine != null; + } } \ No newline at end of file diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java b/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java index d6a32d11..4de868fa 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java @@ -26,17 +26,6 @@ package org.graphwalker.core.machines; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.Map.Entry; -import java.util.Set; -import java.util.Stack; -import java.util.Vector; - import org.apache.log4j.Logger; import org.graphwalker.core.Keywords; import org.graphwalker.core.Util; @@ -46,644 +35,645 @@ import org.graphwalker.core.graph.Graph; import org.graphwalker.core.graph.Vertex; +import java.util.*; +import java.util.Map.Entry; + /** * @author Johan Tejle - * */ public class FiniteStateMachine { - private static Logger logger = Util.setupLogger(FiniteStateMachine.class); - - private Graph model = null; - private Vertex currentVertex = null; - private boolean weighted = false; - private Edge lastEdge = null; - private Stack edgeStack; - private Stack vertexStore; - private int numberOfEdgesTravesed = 0; - private HashMap reqs = new HashMap(); - private boolean calculatingPath = false; - private int numOfCoveredEdges = 0; - private int numOfCoveredVertices = 0; - - private long start_time; - - private Hashtable associatedRequirements; - - public int getNumOfCoveredEdges() { - return numOfCoveredEdges; - } - - public int getNumOfCoveredVertices() { - return numOfCoveredVertices; - } - - public void setVertex(String vertexName) { - logger.debug("Setting vertex to: '" + vertexName + "'"); - Vertex e = model.findVertex(vertexName); - Util.AbortIf(e == null, "Vertex not Found: '" + vertexName + "'"); - - currentVertex = e; - setAsVisited(e); - } - - public AbstractElement findElement(Integer index) { - for (Vertex vertex : model.getVertices()) { - if (vertex.getIndexKey().equals(index)) { - return vertex; - } - } - for (Edge edge : model.getEdges()) { - if (edge.getIndexKey().equals(index)) { - return edge; - } - } - return null; - } - - public boolean hasVertex(String vertexName) { - return model.findVertex(vertexName) != null; - } - - public Edge findEdge(String edgeName) { - for (Edge edge : model.getEdges()) { - if ((edge.getLabelKey()).equals(edgeName)) { - return edge; - } - } - return null; - } - - public FiniteStateMachine() { - logger.debug("Initializing"); - edgeStack = new Stack(); - start_time = System.currentTimeMillis(); - } - - public void setModel(Graph model) { - reset(); - this.model = model; - setVertex(Keywords.START_NODE); - } - - public Vertex getCurrentVertex() { - return currentVertex; - } - - public Vertex getStartVertex() { - for (Vertex vertex : model.getVertices()) { - if (vertex.getLabelKey().equals(Keywords.START_NODE)) { - return vertex; - } - } - return null; - } - - public String getLastEdgeName() { - return lastEdge.getLabelKey(); - } - - public String getCurrentVertexName() { - return currentVertex.getLabelKey(); - } - - public Collection getAllVertices() { - return model.getVertices(); - } - - public Collection getAllEdges() { - return model.getEdges(); - } - - public Collection getAllEdgesExceptStartEdge() { - Vector list = new Vector(model.getEdges()); - Edge e = (Edge) model.getOutEdges(getStartVertex()).toArray()[0]; - list.remove(e); - return list; - } - - public Set getCurrentOutEdges() throws FoundNoEdgeException { - Set retur = new HashSet(model.getOutEdges(currentVertex)); - if (retur.size() == 0) { - throw new FoundNoEdgeException("Cul-De-Sac, dead end found in '" + getCurrentVertex() + "'"); - } - return retur; - } - - public void setAsVisited(AbstractElement e) { - if (e instanceof Edge) { - if (e.getVisitedKey() < 1) { - numOfCoveredEdges++; - } - } else if (e instanceof Vertex) { - if (e.getVisitedKey() < 1) { - numOfCoveredVertices++; - } - } - - e.setVisitedKey(e.getVisitedKey() + 1); - - if (!e.getReqTagKey().isEmpty()) { - Hashtable reqs = getAllRequirements(); - String[] tags = e.getReqTagKey().split(","); - for (String tag : tags) { - reqs.put(tag, reqs.get(tag) + 1); - } - } - } - - public void setAsUnvisited(AbstractElement e) { - Integer visits = e.getVisitedKey(); - e.setVisitedKey(e.getVisitedKey() - 1); - if (e instanceof Edge) { - if (e.getVisitedKey() < 1) { - numOfCoveredEdges--; - } - } else if (e instanceof Vertex) { - if (e.getVisitedKey() < 1) { - numOfCoveredVertices--; - } - } - - if (visits <= 0) - logger.error(e + ", has a negative number in VISITED_KEY"); - - if (!e.getReqTagKey().isEmpty()) { - Hashtable reqs = getAllRequirements(); - String[] tags = e.getReqTagKey().split(","); - for (String tag : tags) { - reqs.put(tag, reqs.get(tag) - 1); - } - } - } - - public void walkPath(Stack path) { - for (Edge edge : path) { - walkEdge(edge); - } - } - - public boolean walkEdge(Edge edge) { - if (model.isSource(currentVertex, edge)) { - lastEdge = edge; - if (isBacktrackPossible()) { - track(); - } - - currentVertex = model.getDest(edge); - setAsVisited(lastEdge); - setAsVisited(currentVertex); - numberOfEdgesTravesed++; - logger.debug("No. of walked edges: " + numberOfEdgesTravesed); - return true; - } else { - logger.error(edge + ", is not the source of: " + currentVertex); - } - return false; - } - - public Edge getLastEdge() { - return lastEdge; - } - - public void setLastEdge(Edge e) { - lastEdge = e; - } - - public String getStatisticsStringCompact() { - int stats[] = getStatistics(); - int e = stats[0]; - int ec = stats[1]; - int v = stats[2]; - int vc = stats[3]; - int len = stats[4]; - int req = stats[5]; - int reqc = stats[6]; - - return (req > 0 ? "RC: " + reqc + "/" + req + " => " + (100 * reqc) / req + "% " : "") + "EC: " + ec + "/" + e + " => " + (100 * ec) - / e + "% " + "SC: " + vc + "/" + v + " => " + (100 * vc) / v + "% " + "L: " + len; - } - - public String getStatisticsString() { - int stats[] = getStatistics(); - int e = stats[0]; - int ec = stats[1]; - int v = stats[2]; - int vc = stats[3]; - int len = stats[4]; - int req = stats[5]; - int reqc = stats[6]; - - String str = ""; - if (e > 0 && v > 0) { - str = "Coverage Edges: " + ec + "/" + e + " => " + (100 * ec) / e + "%\n" + "Coverage Vertices: " + vc + "/" + v + " => " - + (100 * vc) / v + "%\n" + "Unvisited Edges: " + (e - ec) + "\n" + "Unvisited Vertices: " + (v - vc) + "\n" - + "Test sequence length: " + len; - } else if (req > 0) { - str = "Coverage Requirements: " + reqc + "/" + req + " => " + (100 * reqc) / req + "%\n"; - } else { - str = "No statistics available. Probably no run made?"; - } - return str; - } - - public int[] getStatistics() { - Collection e = model.getEdges(); - Collection v = model.getVertices(); - - int[] retur = { e.size(), getEdgeCoverage(e), v.size(), getVertexCoverage(v), numberOfEdgesTravesed, getAllRequirements().size(), - getCoveredRequirements().size() }; - return retur; - } - - public Boolean getValueFromReqs(String key) { - return reqs.get(key); - } - - public void setValueForReq(String key, Boolean b) { - reqs.put(key, b); - } - - /** - * This method returns all requirements and its values as a hashmap - * - * @return reqs hashmap containing requirement name as the key, and - * requirement status as the value - */ - public HashMap getReqs() { - return reqs; - } - - /** - * This method initiates and populates the hashmap reqs, with all requirements - * in the graph. There are two types of requirements: Ordinary and Variable. - * All of them are fetched by calling getReqTagKey for all the edges and - * vertexes in the graph The Ordinary requirements are directly put into the - * reqs hashmap. The Variable requirements are used as a lookup in the list of - * all the variable values returned by getAllVariableValues and the value - * matching the the Variable requirement are splitted with colon and put as - * keys into the reqs hashmap. The value for each entity in the reqs hashmap - * will be set to null, since no requirement are tested yet. Its never needed - * to call this method more than once. - */ - public void populateReqHashMap() { - reqs = new HashMap(); - Hashtable reqsVariables = getAllVariableValues(); - - for (Edge edge : model.getEdges()) { - String reqTag = edge.getReqTagKey(); - if (reqTag.length() == 0) - continue; - String[] tmp = reqTag.split(","); - for (int i = 0; i < tmp.length; i++) { - if (tmp[i].matches("[$][{].*[}]")) { - String[] reqNames = reqsVariables.get(tmp[i].substring(2, tmp[i].length() - 1)).split(":"); - for (String reqVar : reqNames) - this.reqs.put(reqVar, null); - } else - this.reqs.put(tmp[i], null); - } - } - for (Vertex vertex : model.getVertices()) { - String reqTag = vertex.getReqTagKey(); - if (reqTag.length() == 0) - continue; - String[] tmp = reqTag.split(","); - for (int i = 0; i < tmp.length; i++) { - if (tmp[i].matches("[$][{].*[}]")) { - String savedReq = reqsVariables.get(tmp[i].substring(2, tmp[i].length() - 1)); - if (savedReq == null) - continue; - String[] reqNames = savedReq.split(":"); - for (String reqVar : reqNames) - this.reqs.put(reqVar, null); - } else - this.reqs.put(tmp[i], null); - } - } - } - - public String getStatisticsVerbose() { - String retur = ""; - String newLine = "\n"; - Vector notCovered = new Vector(); - - for (Edge edge : model.getEdges()) { - if (edge.getVisitedKey() <= 0) { - notCovered.add("Edge not reached: " + edge + newLine); - } - } - for (Vertex vertex : model.getVertices()) { - if (vertex.getVisitedKey() <= 0) { - notCovered.add("Vertex not reached: " + vertex + newLine); - } - } - if (notCovered.size() > 0) { - Collections.sort(notCovered); - for (String string : notCovered) { - retur += string; - } - } - - Iterator> it = reqs.entrySet().iterator(); - while (it.hasNext()) { - Entry pairs = it.next(); - - if (pairs.getValue() == null) { - retur += "Requirement: " + pairs.getKey() + " is not tested." + newLine; - continue; - } - if (pairs.getValue().booleanValue() == true) { - retur += "Requirement: " + pairs.getKey() + " has passed." + newLine; - continue; - } - if (pairs.getValue().booleanValue() == false) { - retur += "Requirement: " + pairs.getKey() + " has failed." + newLine; - continue; - } - } - - retur += getStatisticsString() + newLine; - retur += "Execution time: " + ((System.currentTimeMillis() - start_time) / 1000) + " seconds"; - return retur; - } - - /** - * This method finds and returns all the strings found in the graph used to - * give a variable its value. Each found string will be splitted with comma - * and the results will be treated as unique values. For example In graph: - * reqtag1 = "REQ1" + ",REQ2," reqtag1 = reqtag1 + "REQ3" reqtag2 = - * "REQ3,REQ4" reqtag3 = "RE" + "Q5," reqtag4 = - * getValueFromExternalFunction("REQ6"); - * - * @return Hashmap with the variable name as key, and a string containing 1 to - * many colon separated values, as the value For example In HashMap - * ({key,value} { reqtag1,"REQ1:REQ2:REQ3" reqtag2,"REQ3:REQ4" - * reqtag3,"RE:Q5" reqtag4,"REQ6" - */ - public Hashtable getAllVariableValues() { - - Hashtable varVal = new Hashtable(); - - Vector abstractElements = new Vector(); - abstractElements.addAll(getAllVertices()); - abstractElements.addAll(getAllEdges()); - - for (AbstractElement abstractElement : abstractElements) { - String actionkey = abstractElement.getActionsKey(); - if (!actionkey.isEmpty()) { - String[] tags = actionkey.split(";"); - for (int j = 0; j < tags.length; j++) { - if (!tags[j].contains("=")) - continue; - String[] variableAndValue = tags[j].split("="); - variableAndValue[0] = variableAndValue[0].replaceAll("[ ]*", ""); - while (variableAndValue[1].contains("\"")) { - - String[] splittedValue = variableAndValue[1].split("\"", 3); - String[] reqs = splittedValue[1].split(","); - for (String s : reqs) { - - if (s.length() == 0) - continue; - // fetching previously stored values for this variable - String tmpVal = varVal.get(variableAndValue[0]); - String newValue; - if (tmpVal == null) { - newValue = s; - } else - newValue = tmpVal + ":" + s; - - varVal.put(variableAndValue[0], newValue); - } - variableAndValue[1] = splittedValue[2]; - } - } - } - } - return varVal; - } - - public boolean isCurrentVertex(Vertex vertex) { - if (getCurrentVertex() != null) - return getCurrentVertex().equals(vertex); - return false; - } - - private int getVertexCoverage(Collection modelItems) { - int unique = 0; - - for (Vertex vertex : modelItems) { - if (vertex.getVisitedKey() > 0) { - unique++; - } - } - return unique; - } - - private int getEdgeCoverage(Collection modelItems) { - int unique = 0; - - for (Edge edge : modelItems) { - if (edge.getVisitedKey() > 0) { - unique++; - } - } - return unique; - } - - public Hashtable getAllRequirements() { - if (associatedRequirements == null) { - associatedRequirements = new Hashtable(); - - Vector abstractElements = new Vector(); - abstractElements.addAll(getAllVertices()); - abstractElements.addAll(getAllEdges()); - - for (AbstractElement abstractElement : abstractElements) { - String reqtags = abstractElement.getReqTagKey(); - if (!reqtags.isEmpty()) { - String[] tags = reqtags.split(","); - for (String tag : tags) { - associatedRequirements.put(tag, 0); - } - } - } - } - return associatedRequirements; - } - - @SuppressWarnings("unchecked") - public Set getCoveredRequirements() { - Vector notCoveredValues = new Vector(); - notCoveredValues.add(0); - Hashtable allRequirements = (Hashtable) getAllRequirements().clone(); - allRequirements.values().removeAll(notCoveredValues); - return allRequirements.keySet(); - } - - public String getEdgeName(Edge edge) { - if (edge.getParameterKey().isEmpty()) { - return edge.getLabelKey(); - } - - return edge.getLabelKey() + " " + edge.getParameterKey(); - } - - public void storeVertex() { - if (this.vertexStore == null) - this.vertexStore = new Stack(); - this.vertexStore.push(edgeStack.size()); - } - - public void restoreVertex() { - if (this.vertexStore == null || this.vertexStore.size() == 0) - throw new RuntimeException("Nothing to restore"); - int prevVertex = this.vertexStore.pop(); - if (prevVertex > edgeStack.size()) - throw new RuntimeException("Cannot restore vertex from backtrack"); - while (prevVertex < edgeStack.size()) { - popVertex(); - } - } - - protected void track() { - edgeStack.push(getLastEdge()); - } - - protected void popVertex() { - setAsUnvisited(getLastEdge()); - setAsUnvisited(getCurrentVertex()); - - edgeStack.pop(); - if (lastEdge == null) { - setVertex(Keywords.START_NODE); - } else { - currentVertex = model.getSource(lastEdge); - } - lastEdge = (edgeStack.size() > 0 ? edgeStack.peek() : null); - numberOfEdgesTravesed--; - } - - /** - * @param weighted - * if edge weights are to be considered - */ - public void setWeighted(boolean weighted) { - this.weighted = weighted; - } - - /** - * @return true if the edge weights is considered - */ - public boolean isWeighted() { - return weighted; - } - - /** - * @return the number of edges traversed - */ - public int getNumberOfEdgesTravesed() { - return numberOfEdgesTravesed; - } - - public boolean isBacktrackPossible() { - return isCalculatingPath(); - } - - public boolean isCalculatingPath() { - return calculatingPath; - } - - public void setCalculatingPath(boolean calculatingPath) { - this.calculatingPath = calculatingPath; - } - - /** - * This functions returns a list of edges, which has not yet been covered - * - * @return - */ - public Vector getUncoveredEdges() { - Vector retur = new Vector(); - for (Edge edge : getAllEdges()) { - if (edge.getVisitedKey() <= 0) { - retur.add(edge); - } - } - return retur; - } - - /** - * This functions returns a list of edges, which has been covered - * - * @return - */ - public Vector getCoveredEdges() { - Vector retur = new Vector(getAllEdges()); - retur.removeAll(getUncoveredEdges()); - return retur; - } - - public Vector getUncoveredVertices() { - Vector retur = new Vector(); - for (Vertex vertex : getAllVertices()) { - if (vertex.getVisitedKey() <= 0) { - retur.add(vertex); - } - } - return retur; - } - - public Vector getCoveredVertices() { - Vector retur = new Vector(getAllVertices()); - retur.removeAll(getUncoveredVertices()); - return retur; - } - - public Vector getUncoveredElements() { - Vector retur = new Vector(getUncoveredEdges()); - retur.addAll(getUncoveredVertices()); - return retur; - } - - public Vector getCoveredElements() { - Vector retur = new Vector(getCoveredEdges()); - retur.addAll(getCoveredVertices()); - return retur; - } - - public Graph getModel() { - return model; - } - - public String getCurrentDataString() { - return ""; - } - - public boolean hasInternalVariables() { - return false; - } - - private void reset() { - numberOfEdgesTravesed = 0; - calculatingPath = false; - numOfCoveredEdges = 0; - numOfCoveredVertices = 0; - } - - public void setVertex(Vertex vertex) { - currentVertex = vertex; - } - - public void setAllUnvisited() { - logger.debug("setAllUnvisited"); - reset(); - for (Vertex vertex : model.getVertices()) { - vertex.setVisitedKey(0); - } - for (Edge edge : model.getEdges()) { - edge.setVisitedKey(0); - } - } + private static Logger logger = Util.setupLogger(FiniteStateMachine.class); + + private Graph model = null; + private Vertex currentVertex = null; + private boolean weighted = false; + private Edge lastEdge = null; + private Stack edgeStack; + private Stack vertexStore; + private int numberOfEdgesTravesed = 0; + private HashMap reqs = new HashMap(); + private boolean calculatingPath = false; + private int numOfCoveredEdges = 0; + private int numOfCoveredVertices = 0; + + private long start_time; + + private Hashtable associatedRequirements; + + public int getNumOfCoveredEdges() { + return numOfCoveredEdges; + } + + public int getNumOfCoveredVertices() { + return numOfCoveredVertices; + } + + public void setVertex(String vertexName) { + logger.debug("Setting vertex to: '" + vertexName + "'"); + Vertex e = model.findVertex(vertexName); + Util.AbortIf(e == null, "Vertex not Found: '" + vertexName + "'"); + + currentVertex = e; + setAsVisited(e); + } + + public AbstractElement findElement(Integer index) { + for (Vertex vertex : model.getVertices()) { + if (vertex.getIndexKey().equals(index)) { + return vertex; + } + } + for (Edge edge : model.getEdges()) { + if (edge.getIndexKey().equals(index)) { + return edge; + } + } + return null; + } + + public boolean hasVertex(String vertexName) { + return model.findVertex(vertexName) != null; + } + + public Edge findEdge(String edgeName) { + for (Edge edge : model.getEdges()) { + if ((edge.getLabelKey()).equals(edgeName)) { + return edge; + } + } + return null; + } + + public FiniteStateMachine() { + logger.debug("Initializing"); + edgeStack = new Stack(); + start_time = System.currentTimeMillis(); + } + + public void setModel(Graph model) { + reset(); + this.model = model; + setVertex(Keywords.START_NODE); + } + + public Vertex getCurrentVertex() { + return currentVertex; + } + + public Vertex getStartVertex() { + for (Vertex vertex : model.getVertices()) { + if (vertex.getLabelKey().equals(Keywords.START_NODE)) { + return vertex; + } + } + return null; + } + + public String getLastEdgeName() { + return lastEdge.getLabelKey(); + } + + public String getCurrentVertexName() { + return currentVertex.getLabelKey(); + } + + public Collection getAllVertices() { + return model.getVertices(); + } + + public Collection getAllEdges() { + return model.getEdges(); + } + + public Collection getAllEdgesExceptStartEdge() { + Vector list = new Vector(model.getEdges()); + Edge e = (Edge) model.getOutEdges(getStartVertex()).toArray()[0]; + list.remove(e); + return list; + } + + public Set getCurrentOutEdges() throws FoundNoEdgeException { + Set retur = new HashSet(model.getOutEdges(currentVertex)); + if (retur.size() == 0) { + throw new FoundNoEdgeException("Cul-De-Sac, dead end found in '" + getCurrentVertex() + "'"); + } + return retur; + } + + public void setAsVisited(AbstractElement e) { + if (e instanceof Edge) { + if (e.getVisitedKey() < 1) { + numOfCoveredEdges++; + } + } else if (e instanceof Vertex) { + if (e.getVisitedKey() < 1) { + numOfCoveredVertices++; + } + } + + e.setVisitedKey(e.getVisitedKey() + 1); + + if (!e.getReqTagKey().isEmpty()) { + Hashtable reqs = getAllRequirements(); + String[] tags = e.getReqTagKey().split(","); + for (String tag : tags) { + reqs.put(tag, reqs.get(tag) + 1); + } + } + } + + public void setAsUnvisited(AbstractElement e) { + Integer visits = e.getVisitedKey(); + e.setVisitedKey(e.getVisitedKey() - 1); + if (e instanceof Edge) { + if (e.getVisitedKey() < 1) { + numOfCoveredEdges--; + } + } else if (e instanceof Vertex) { + if (e.getVisitedKey() < 1) { + numOfCoveredVertices--; + } + } + + if (visits <= 0) + logger.error(e + ", has a negative number in VISITED_KEY"); + + if (!e.getReqTagKey().isEmpty()) { + Hashtable reqs = getAllRequirements(); + String[] tags = e.getReqTagKey().split(","); + for (String tag : tags) { + reqs.put(tag, reqs.get(tag) - 1); + } + } + } + + public void walkPath(Stack path) { + for (Edge edge : path) { + walkEdge(edge); + } + } + + public boolean walkEdge(Edge edge) { + if (model.isSource(currentVertex, edge)) { + lastEdge = edge; + if (isBacktrackPossible()) { + track(); + } + + currentVertex = model.getDest(edge); + setAsVisited(lastEdge); + setAsVisited(currentVertex); + numberOfEdgesTravesed++; + logger.debug("No. of walked edges: " + numberOfEdgesTravesed); + return true; + } else { + logger.error(edge + ", is not the source of: " + currentVertex); + } + return false; + } + + public Edge getLastEdge() { + return lastEdge; + } + + public void setLastEdge(Edge e) { + lastEdge = e; + } + + public String getStatisticsStringCompact() { + int stats[] = getStatistics(); + int e = stats[0]; + int ec = stats[1]; + int v = stats[2]; + int vc = stats[3]; + int len = stats[4]; + int req = stats[5]; + int reqc = stats[6]; + + return (req > 0 ? "RC: " + reqc + "/" + req + " => " + (100 * reqc) / req + "% " : "") + "EC: " + ec + "/" + e + " => " + (100 * ec) + / e + "% " + "SC: " + vc + "/" + v + " => " + (100 * vc) / v + "% " + "L: " + len; + } + + public String getStatisticsString() { + int stats[] = getStatistics(); + int e = stats[0]; + int ec = stats[1]; + int v = stats[2]; + int vc = stats[3]; + int len = stats[4]; + int req = stats[5]; + int reqc = stats[6]; + + String str = ""; + if (e > 0 && v > 0) { + str = "Coverage Edges: " + ec + "/" + e + " => " + (100 * ec) / e + "%\n" + "Coverage Vertices: " + vc + "/" + v + " => " + + (100 * vc) / v + "%\n" + "Unvisited Edges: " + (e - ec) + "\n" + "Unvisited Vertices: " + (v - vc) + "\n" + + "Test sequence length: " + len; + } else if (req > 0) { + str = "Coverage Requirements: " + reqc + "/" + req + " => " + (100 * reqc) / req + "%\n"; + } else { + str = "No statistics available. Probably no run made?"; + } + return str; + } + + public int[] getStatistics() { + Collection e = model.getEdges(); + Collection v = model.getVertices(); + + int[] retur = {e.size(), getEdgeCoverage(e), v.size(), getVertexCoverage(v), numberOfEdgesTravesed, getAllRequirements().size(), + getCoveredRequirements().size()}; + return retur; + } + + public Boolean getValueFromReqs(String key) { + return reqs.get(key); + } + + public void setValueForReq(String key, Boolean b) { + reqs.put(key, b); + } + + /** + * This method returns all requirements and its values as a hashmap + * + * @return reqs hashmap containing requirement name as the key, and + * requirement status as the value + */ + public HashMap getReqs() { + return reqs; + } + + /** + * This method initiates and populates the hashmap reqs, with all requirements + * in the graph. There are two types of requirements: Ordinary and Variable. + * All of them are fetched by calling getReqTagKey for all the edges and + * vertexes in the graph The Ordinary requirements are directly put into the + * reqs hashmap. The Variable requirements are used as a lookup in the list of + * all the variable values returned by getAllVariableValues and the value + * matching the the Variable requirement are splitted with colon and put as + * keys into the reqs hashmap. The value for each entity in the reqs hashmap + * will be set to null, since no requirement are tested yet. Its never needed + * to call this method more than once. + */ + public void populateReqHashMap() { + reqs = new HashMap(); + Hashtable reqsVariables = getAllVariableValues(); + + for (Edge edge : model.getEdges()) { + String reqTag = edge.getReqTagKey(); + if (reqTag.length() == 0) + continue; + String[] tmp = reqTag.split(","); + for (int i = 0; i < tmp.length; i++) { + if (tmp[i].matches("[$][{].*[}]")) { + String[] reqNames = reqsVariables.get(tmp[i].substring(2, tmp[i].length() - 1)).split(":"); + for (String reqVar : reqNames) + this.reqs.put(reqVar, null); + } else + this.reqs.put(tmp[i], null); + } + } + for (Vertex vertex : model.getVertices()) { + String reqTag = vertex.getReqTagKey(); + if (reqTag.length() == 0) + continue; + String[] tmp = reqTag.split(","); + for (int i = 0; i < tmp.length; i++) { + if (tmp[i].matches("[$][{].*[}]")) { + String savedReq = reqsVariables.get(tmp[i].substring(2, tmp[i].length() - 1)); + if (savedReq == null) + continue; + String[] reqNames = savedReq.split(":"); + for (String reqVar : reqNames) + this.reqs.put(reqVar, null); + } else + this.reqs.put(tmp[i], null); + } + } + } + + public String getStatisticsVerbose() { + String retur = ""; + String newLine = "\n"; + Vector notCovered = new Vector(); + + for (Edge edge : model.getEdges()) { + if (edge.getVisitedKey() <= 0) { + notCovered.add("Edge not reached: " + edge + newLine); + } + } + for (Vertex vertex : model.getVertices()) { + if (vertex.getVisitedKey() <= 0) { + notCovered.add("Vertex not reached: " + vertex + newLine); + } + } + if (notCovered.size() > 0) { + Collections.sort(notCovered); + for (String string : notCovered) { + retur += string; + } + } + + Iterator> it = reqs.entrySet().iterator(); + while (it.hasNext()) { + Entry pairs = it.next(); + + if (pairs.getValue() == null) { + retur += "Requirement: " + pairs.getKey() + " is not tested." + newLine; + continue; + } + if (pairs.getValue().booleanValue() == true) { + retur += "Requirement: " + pairs.getKey() + " has passed." + newLine; + continue; + } + if (pairs.getValue().booleanValue() == false) { + retur += "Requirement: " + pairs.getKey() + " has failed." + newLine; + continue; + } + } + + retur += getStatisticsString() + newLine; + retur += "Execution time: " + ((System.currentTimeMillis() - start_time) / 1000) + " seconds"; + return retur; + } + + /** + * This method finds and returns all the strings found in the graph used to + * give a variable its value. Each found string will be splitted with comma + * and the results will be treated as unique values. For example In graph: + * reqtag1 = "REQ1" + ",REQ2," reqtag1 = reqtag1 + "REQ3" reqtag2 = + * "REQ3,REQ4" reqtag3 = "RE" + "Q5," reqtag4 = + * getValueFromExternalFunction("REQ6"); + * + * @return Hashmap with the variable name as key, and a string containing 1 to + * many colon separated values, as the value For example In HashMap + * ({key,value} { reqtag1,"REQ1:REQ2:REQ3" reqtag2,"REQ3:REQ4" + * reqtag3,"RE:Q5" reqtag4,"REQ6" + */ + public Hashtable getAllVariableValues() { + + Hashtable varVal = new Hashtable(); + + Vector abstractElements = new Vector(); + abstractElements.addAll(getAllVertices()); + abstractElements.addAll(getAllEdges()); + + for (AbstractElement abstractElement : abstractElements) { + String actionkey = abstractElement.getActionsKey(); + if (!actionkey.isEmpty()) { + String[] tags = actionkey.split(";"); + for (int j = 0; j < tags.length; j++) { + if (!tags[j].contains("=")) + continue; + String[] variableAndValue = tags[j].split("="); + variableAndValue[0] = variableAndValue[0].replaceAll("[ ]*", ""); + while (variableAndValue[1].contains("\"")) { + + String[] splittedValue = variableAndValue[1].split("\"", 3); + String[] reqs = splittedValue[1].split(","); + for (String s : reqs) { + + if (s.length() == 0) + continue; + // fetching previously stored values for this variable + String tmpVal = varVal.get(variableAndValue[0]); + String newValue; + if (tmpVal == null) { + newValue = s; + } else + newValue = tmpVal + ":" + s; + + varVal.put(variableAndValue[0], newValue); + } + variableAndValue[1] = splittedValue[2]; + } + } + } + } + return varVal; + } + + public boolean isCurrentVertex(Vertex vertex) { + if (getCurrentVertex() != null) + return getCurrentVertex().equals(vertex); + return false; + } + + private int getVertexCoverage(Collection modelItems) { + int unique = 0; + + for (Vertex vertex : modelItems) { + if (vertex.getVisitedKey() > 0) { + unique++; + } + } + return unique; + } + + private int getEdgeCoverage(Collection modelItems) { + int unique = 0; + + for (Edge edge : modelItems) { + if (edge.getVisitedKey() > 0) { + unique++; + } + } + return unique; + } + + public Hashtable getAllRequirements() { + if (associatedRequirements == null) { + associatedRequirements = new Hashtable(); + + Vector abstractElements = new Vector(); + abstractElements.addAll(getAllVertices()); + abstractElements.addAll(getAllEdges()); + + for (AbstractElement abstractElement : abstractElements) { + String reqtags = abstractElement.getReqTagKey(); + if (!reqtags.isEmpty()) { + String[] tags = reqtags.split(","); + for (String tag : tags) { + associatedRequirements.put(tag, 0); + } + } + } + } + return associatedRequirements; + } + + @SuppressWarnings("unchecked") + public Set getCoveredRequirements() { + Vector notCoveredValues = new Vector(); + notCoveredValues.add(0); + Hashtable allRequirements = (Hashtable) getAllRequirements().clone(); + allRequirements.values().removeAll(notCoveredValues); + return allRequirements.keySet(); + } + + public String getEdgeName(Edge edge) { + if (edge.getParameterKey().isEmpty()) { + return edge.getLabelKey(); + } + + return edge.getLabelKey() + " " + edge.getParameterKey(); + } + + public void storeVertex() { + if (this.vertexStore == null) + this.vertexStore = new Stack(); + this.vertexStore.push(edgeStack.size()); + } + + public void restoreVertex() { + if (this.vertexStore == null || this.vertexStore.size() == 0) + throw new RuntimeException("Nothing to restore"); + int prevVertex = this.vertexStore.pop(); + if (prevVertex > edgeStack.size()) + throw new RuntimeException("Cannot restore vertex from backtrack"); + while (prevVertex < edgeStack.size()) { + popVertex(); + } + } + + protected void track() { + edgeStack.push(getLastEdge()); + } + + protected void popVertex() { + setAsUnvisited(getLastEdge()); + setAsUnvisited(getCurrentVertex()); + + edgeStack.pop(); + if (lastEdge == null) { + setVertex(Keywords.START_NODE); + } else { + currentVertex = model.getSource(lastEdge); + } + lastEdge = (edgeStack.size() > 0 ? edgeStack.peek() : null); + numberOfEdgesTravesed--; + } + + /** + * @param weighted if edge weights are to be considered + */ + public void setWeighted(boolean weighted) { + this.weighted = weighted; + } + + /** + * @return true if the edge weights is considered + */ + public boolean isWeighted() { + return weighted; + } + + /** + * @return the number of edges traversed + */ + public int getNumberOfEdgesTravesed() { + return numberOfEdgesTravesed; + } + + public boolean isBacktrackPossible() { + return isCalculatingPath(); + } + + public boolean isCalculatingPath() { + return calculatingPath; + } + + public void setCalculatingPath(boolean calculatingPath) { + this.calculatingPath = calculatingPath; + } + + /** + * This functions returns a list of edges, which has not yet been covered + * + * @return + */ + public Vector getUncoveredEdges() { + Vector retur = new Vector(); + for (Edge edge : getAllEdges()) { + if (edge.getVisitedKey() <= 0) { + retur.add(edge); + } + } + return retur; + } + + /** + * This functions returns a list of edges, which has been covered + * + * @return + */ + public Vector getCoveredEdges() { + Vector retur = new Vector(getAllEdges()); + retur.removeAll(getUncoveredEdges()); + return retur; + } + + public Vector getUncoveredVertices() { + Vector retur = new Vector(); + for (Vertex vertex : getAllVertices()) { + if (vertex.getVisitedKey() <= 0) { + retur.add(vertex); + } + } + return retur; + } + + public Vector getCoveredVertices() { + Vector retur = new Vector(getAllVertices()); + retur.removeAll(getUncoveredVertices()); + return retur; + } + + public Vector getUncoveredElements() { + Vector retur = new Vector(getUncoveredEdges()); + retur.addAll(getUncoveredVertices()); + return retur; + } + + public Vector getCoveredElements() { + Vector retur = new Vector(getCoveredEdges()); + retur.addAll(getCoveredVertices()); + return retur; + } + + public Graph getModel() { + return model; + } + + public String getCurrentDataString() { + return ""; + } + + public boolean hasInternalVariables() { + return false; + } + + private void reset() { + numberOfEdgesTravesed = 0; + calculatingPath = false; + numOfCoveredEdges = 0; + numOfCoveredVertices = 0; + } + + public void setVertex(Vertex vertex) { + currentVertex = vertex; + } + + public void setAllUnvisited() { + logger.debug("setAllUnvisited"); + reset(); + for (Vertex vertex : model.getVertices()) { + vertex.setVisitedKey(0); + } + for (Edge edge : model.getEdges()) { + edge.setVisitedKey(0); + } + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelAPI.java b/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelAPI.java index 92c70670..bb9ff421 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelAPI.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelAPI.java @@ -32,21 +32,21 @@ * @author krikar Any test should extend this class. */ public class ModelAPI { - private ModelBasedTesting mbt = null; + private ModelBasedTesting mbt = null; - public ModelAPI(String model, boolean efsm, PathGenerator generator, boolean weight) { - mbt = new ModelBasedTesting(); - mbt.readGraph(model); - mbt.enableExtended(efsm); - mbt.setGenerator(generator); - mbt.setWeighted(weight); - } + public ModelAPI(String model, boolean efsm, PathGenerator generator, boolean weight) { + mbt = new ModelBasedTesting(); + mbt.readGraph(model); + mbt.enableExtended(efsm); + mbt.setGenerator(generator); + mbt.setWeighted(weight); + } - public void setMbt(ModelBasedTesting mbt) { - this.mbt = mbt; - } + public void setMbt(ModelBasedTesting mbt) { + this.mbt = mbt; + } - public ModelBasedTesting getMbt() { - return mbt; - } + public ModelBasedTesting getMbt() { + return mbt; + } } \ No newline at end of file diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelHandler.java b/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelHandler.java index 998fadd0..1de47605 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelHandler.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelHandler.java @@ -48,9 +48,6 @@ */ package org.graphwalker.core.multipleModels; -import java.util.ArrayList; -import java.util.Random; - import org.apache.log4j.Logger; import org.graphwalker.core.Keywords; import org.graphwalker.core.ModelBasedTesting; @@ -59,10 +56,13 @@ import org.graphwalker.core.generators.RandomPathGenerator; import org.graphwalker.core.graph.Graph; +import java.util.ArrayList; +import java.util.Random; + /** * The ModelHandler handles multiple models. The basic workflow using this class * is: - * + *

*

  * ModelHandler modelhandler = new ModelHandler();
  * ModelBasedTesting a = Util.getNewMbtFromXml(Util.getFile("A.xml"));
@@ -73,364 +73,356 @@
  * modelhandler.add("C", c, new Model_C_API());
  * modelhandler.execute("A");
  * 
- * + *

* New keywords and datum is introduced to handle multiple models. A model can * now switch execution into another model using the keyword * {@link Keywords#SWITCH_MODEL SWITCH_MODEL}. This means that the current model * is paused, and any other loaded model(s) with the same * {@link Keywords#GRAPH_VERTEX GRAH_VERTEX} is a candidate to switch into. Also * the current paused model can be resumed. - * + *

* The executions ends when all models has reached their stop criteria. - * + * + * @author Kristian Karl * @see SWITCH_MODEL * @see GRAPH_VERTEX - * - * @author Kristian Karl */ public class ModelHandler { - static Logger logger = Util.setupLogger(ModelHandler.class); - ArrayList models = new ArrayList(); - static private Random random = new Random(); - private String currentVertex; - - private static class ModelRunnable implements Runnable { - - private String name; - private ModelBasedTesting mbt; - private Object modelAPI; - private boolean executionRestarted = false; - private boolean crashed = false; - - public ModelRunnable(String name, ModelAPI modelAPI) { - this.name = name; - this.mbt = modelAPI.getMbt(); - this.modelAPI = modelAPI; - } - - @Override - public void run() { - try { - logger.debug("Will start executing the model: " + this.mbt.getGraph()); - mbt.executePath(modelAPI); - } catch (Exception e) { - crashed = true; - Util.logStackTraceToError(e); - } - } - - public String getName() { - return name; - } - - public ModelBasedTesting getMbt() { - return mbt; - } - - public boolean isCrashed() { - return crashed; - } - - public boolean isExecutionRestarted() { - return executionRestarted; - } - - public void setExecutionRestarted(boolean executionRestarted) { - logger.debug("Will change executionRestarted from: " + this.executionRestarted + ", to: " + executionRestarted); - this.executionRestarted = executionRestarted; - } - } - - /** - * @return All models currently loaded. - */ - public ArrayList getModels() { - return models; - } - - /** - * Adds a model to the handler. - * - * @param name - * The name of the model. This is not the same as the name of the - * {@link Graph#getLabelKey() graph}. It's a logical name of the - * model, and it may not already be used by the handler. - * @param modelAPI - */ - public synchronized void add(String name, ModelAPI modelAPI) { - if (hasModel(name)) { - throw new IllegalArgumentException("The model name " + name + " has already been used."); - } - logger.debug("Adding the model: " + Integer.toHexString(System.identityHashCode(modelAPI.getMbt())) + ", " - + modelAPI.getMbt().getGraph()); - modelAPI.getMbt().setMultiModelHandler(this); - models.add(new ModelRunnable(name, modelAPI)); - } - - /** - * Removed a model from the handler. - * - * @param model - * Removes the specified model from the handler. - */ - public void remove(ModelRunnable model) { - models.remove(model); - } - - /** - * Removed a model from the handler. - * - * @param index - * Removes the specified model by index from the handler. - */ - public void remove(long index) { - models.remove((int) index); - } - - /** - * Starts executing the models. The execution is finished when all the models - * stop criteria are reached. - * - * @param name - * The logical name of the model which will start the execution. - * @throws InterruptedException - */ - public void execute(String name) throws InterruptedException { - if (!hasModel(name)) { - throw new IllegalArgumentException("The model name " + name + " does not exist in the model handler. Have you forgotten to add it?"); - } - - ModelRunnable model = getModel(name); - - // Start running the first model - Thread t = new Thread(model); - t.start(); - - // Enter main loop - while (true) { - waitForModelToDoSomething(model); - - // As long as we have any running model, let them run until finished or - // paused. - while (isAnyModelRunning()) { - Thread.sleep(10); - } - logger.debug("No model is running."); - - // If all models are finished, then exit - if (isAllModelsDone()) { - break; - } - logger.debug("Not all models has reached their desired stop conditions."); - - // Now, find models with matching vertex name. - // If the model is paused, the current vertex is matched. - // If the model is not started, the graph name is matched. - ArrayList pausedAndNotStartedModels = getModelMatchingCurrentVertex(); - if (pausedAndNotStartedModels.isEmpty()) { - logger.debug("Did not find any models, matching the current vertex: " + currentVertex); - logger.debug(getStatistics()); - break; - } - - // Run the model, but check for it's state. The model is either - // suspended or not started. - int selectModel = random.nextInt(pausedAndNotStartedModels.size()); - model = pausedAndNotStartedModels.get(selectModel); - logger.debug("Number of models to select from: " + pausedAndNotStartedModels.size()); - logger.debug("Selecting model(" + selectModel + ") " + model.getName()); - if (model.getMbt().isSuspended()) { - model.getMbt().resume(); - } else { - t = new Thread(model); - t.start(); - } - } - } - - /** - * Wait for the model to enter a running, paused or stopped state - * - * @param model - * @throws InterruptedException - */ - private void waitForModelToDoSomething(ModelRunnable model) throws InterruptedException { - while (true) { - check4Crash(model); - if (model.getMbt().isRunning()) { - break; - } else if (model.getMbt().isSuspended()) { - break; - } else if (!model.getMbt().hasNextStep()) { - break; - } - Thread.sleep(10); - } - } - - /** - * Searches for any model with matching vertex name. If the model is paused, - * the current vertex is matched. If the model is not started, the graph name - * is matched. - * - * @param v - * The vertex to match - * @return an array of models that matches - */ - private ArrayList getModelMatchingCurrentVertex() { - logger.debug("Looking for paused or not started model matching current vertex: " + currentVertex); - ArrayList array = new ArrayList(); - for (ModelRunnable model : models) { - logger.debug("Examining model: " + model.getName()); - logger.debug(" Current vertex of graph: " + model.getMbt().getCurrentVertex()); - - check4Crash(model); - - if (model.getMbt().getGraph().getLabelKey().equals(currentVertex) - || model.getMbt().getCurrentVertex().getLabelKey().equals(currentVertex)) { - logger.debug(" " + model.getName() + ", has matching graph or current vertex label"); - if (model.getMbt().hasNotStartedExecution()) { - logger.debug(" Adding not started model: " + model.getName()); - array.add(model); - } else if (model.getMbt().isSuspended()) { - if (model.getMbt().isCulDeSac()) { - logger.debug(" Model has ended up in a Cul-de-Sac"); - if (!model.getMbt().hasNextStep()) { - logger.debug(" Model has reached it's stop condition, so restarting model and resetting current vertex to Start: " - + model.getName()); - model.setExecutionRestarted(true); - model.getMbt().setGenerator(new RandomPathGenerator(new NeverCondition())); - model.getMbt().setCurrentVertex(Keywords.START_NODE); - } else { - logger.debug(" Model has not reached it's stop condition, so restarting model and resetting current vertex to Start: " - + model.getName()); - model.setExecutionRestarted(true); - model.getMbt().setCurrentVertex(Keywords.START_NODE); - } - } else { - logger.debug(" Adding paused model, " + model.getName()); - array.add(model); - } - } else if (!model.getMbt().hasNextStep()) { - logger.debug(" Restarting model: " + model.getName()); - model.setExecutionRestarted(true); - model.getMbt().setGenerator(new RandomPathGenerator(new NeverCondition())); - array.add(model); - } else if (model.isExecutionRestarted()) { - logger.debug(" Adding recently restarted model: " + model.getName()); - array.add(model); - } - } - } - return array; - } - - /** - * Gets a model by it's logical name. - * - * @param name - * The logical name of a model - * @return The model that matches the logical name. - */ - private ModelRunnable getModel(String name) { - for (ModelRunnable model : models) { - check4Crash(model); - if (model.getName().equals(name)) { - return model; - } - } - return null; - } - - /** - * Searches the handler for a model in a running state. - * - * @return True if any model is in a running state, else false will be - * returned. - */ - private boolean isAnyModelRunning() { - for (ModelRunnable model : models) { - check4Crash(model); - if (model.getMbt().isRunning()) { - return true; - } - } - return false; - } - - /** - * Checks whether the models of the handler has executed. - * - * @return True if all models has reached the stop criteria, else false is - * returned. - */ - /** - * @return - */ - public boolean isAllModelsDone() { - for (ModelRunnable model : models) { - logger.debug("Examining model: " + model.getMbt().getGraph()); - check4Crash(model); - if (model.getMbt().getGenerator().getStopCondition() instanceof NeverCondition) { - logger.debug(" Model: " + model.getName() + ", has a NeverCondition, thus by definition finished."); - } else if (!model.getMbt().hasNextStep()) { - logger.debug(" Model: " + model.getName() + ", has reached it's stop condition"); - } else { - logger.debug(" Model: " + model.getName() + ", is not done: " + model.getMbt().getStatisticsString()); - return false; - } - } - logger.debug("All models has reached their desired stop conditions."); - return true; - } - - /** - * Checks if the handler has a model with the same logical name already - * loaded. - * - * @param name - * The logical name of the model - * @return True if the handler already has a model with matching logical name. - */ - private boolean hasModel(String name) { - for (ModelRunnable model : models) { - check4Crash(model); - if (model.getName().equals(name)) { - return true; - } - } - return false; - } - - private void check4Crash(ModelRunnable model) { - if (model.isCrashed()) { - logger.error("Model has crashed: " + model.getName()); - throw new RuntimeException("Model has crashed"); - } - } - - /** - * Returns the statistics from all models. - * - * @return The aggregated statistics for all models - * @throws InterruptedException - */ - public String getStatistics() throws InterruptedException { - StringBuilder statistics = new StringBuilder("Statistics for multiple models"); - for (ModelRunnable model : models) { - statistics.append("\n\nStatistics for ").append(model.getName()).append(":\n"); - statistics.append(model.mbt.getStatisticsString()); - } - return statistics.toString(); - } - - public synchronized String getCurrentVertex() { - return currentVertex; - } - - public synchronized void setCurrentVertex(String currentVertex) { - logger.debug("Changing current vertex from: " + this.currentVertex + ", to: " + currentVertex); - this.currentVertex = currentVertex; - } + static Logger logger = Util.setupLogger(ModelHandler.class); + ArrayList models = new ArrayList(); + static private Random random = new Random(); + private String currentVertex; + + private static class ModelRunnable implements Runnable { + + private String name; + private ModelBasedTesting mbt; + private Object modelAPI; + private boolean executionRestarted = false; + private boolean crashed = false; + + public ModelRunnable(String name, ModelAPI modelAPI) { + this.name = name; + this.mbt = modelAPI.getMbt(); + this.modelAPI = modelAPI; + } + + @Override + public void run() { + try { + logger.debug("Will start executing the model: " + this.mbt.getGraph()); + mbt.executePath(modelAPI); + } catch (Exception e) { + crashed = true; + Util.logStackTraceToError(e); + } + } + + public String getName() { + return name; + } + + public ModelBasedTesting getMbt() { + return mbt; + } + + public boolean isCrashed() { + return crashed; + } + + public boolean isExecutionRestarted() { + return executionRestarted; + } + + public void setExecutionRestarted(boolean executionRestarted) { + logger.debug("Will change executionRestarted from: " + this.executionRestarted + ", to: " + executionRestarted); + this.executionRestarted = executionRestarted; + } + } + + /** + * @return All models currently loaded. + */ + public ArrayList getModels() { + return models; + } + + /** + * Adds a model to the handler. + * + * @param name The name of the model. This is not the same as the name of the + * {@link Graph#getLabelKey() graph}. It's a logical name of the + * model, and it may not already be used by the handler. + * @param modelAPI + */ + public synchronized void add(String name, ModelAPI modelAPI) { + if (hasModel(name)) { + throw new IllegalArgumentException("The model name " + name + " has already been used."); + } + logger.debug("Adding the model: " + Integer.toHexString(System.identityHashCode(modelAPI.getMbt())) + ", " + + modelAPI.getMbt().getGraph()); + modelAPI.getMbt().setMultiModelHandler(this); + models.add(new ModelRunnable(name, modelAPI)); + } + + /** + * Removed a model from the handler. + * + * @param model Removes the specified model from the handler. + */ + public void remove(ModelRunnable model) { + models.remove(model); + } + + /** + * Removed a model from the handler. + * + * @param index Removes the specified model by index from the handler. + */ + public void remove(long index) { + models.remove((int) index); + } + + /** + * Starts executing the models. The execution is finished when all the models + * stop criteria are reached. + * + * @param name The logical name of the model which will start the execution. + * @throws InterruptedException + */ + public void execute(String name) throws InterruptedException { + if (!hasModel(name)) { + throw new IllegalArgumentException("The model name " + name + " does not exist in the model handler. Have you forgotten to add it?"); + } + + ModelRunnable model = getModel(name); + + // Start running the first model + Thread t = new Thread(model); + t.start(); + + // Enter main loop + while (true) { + waitForModelToDoSomething(model); + + // As long as we have any running model, let them run until finished or + // paused. + while (isAnyModelRunning()) { + Thread.sleep(10); + } + logger.debug("No model is running."); + + // If all models are finished, then exit + if (isAllModelsDone()) { + break; + } + logger.debug("Not all models has reached their desired stop conditions."); + + // Now, find models with matching vertex name. + // If the model is paused, the current vertex is matched. + // If the model is not started, the graph name is matched. + ArrayList pausedAndNotStartedModels = getModelMatchingCurrentVertex(); + if (pausedAndNotStartedModels.isEmpty()) { + logger.debug("Did not find any models, matching the current vertex: " + currentVertex); + logger.debug(getStatistics()); + break; + } + + // Run the model, but check for it's state. The model is either + // suspended or not started. + int selectModel = random.nextInt(pausedAndNotStartedModels.size()); + model = pausedAndNotStartedModels.get(selectModel); + logger.debug("Number of models to select from: " + pausedAndNotStartedModels.size()); + logger.debug("Selecting model(" + selectModel + ") " + model.getName()); + if (model.getMbt().isSuspended()) { + model.getMbt().resume(); + } else { + t = new Thread(model); + t.start(); + } + } + } + + /** + * Wait for the model to enter a running, paused or stopped state + * + * @param model + * @throws InterruptedException + */ + private void waitForModelToDoSomething(ModelRunnable model) throws InterruptedException { + while (true) { + check4Crash(model); + if (model.getMbt().isRunning()) { + break; + } else if (model.getMbt().isSuspended()) { + break; + } else if (!model.getMbt().hasNextStep()) { + break; + } + Thread.sleep(10); + } + } + + /** + * Searches for any model with matching vertex name. If the model is paused, + * the current vertex is matched. If the model is not started, the graph name + * is matched. + * + * @param v The vertex to match + * @return an array of models that matches + */ + private ArrayList getModelMatchingCurrentVertex() { + logger.debug("Looking for paused or not started model matching current vertex: " + currentVertex); + ArrayList array = new ArrayList(); + for (ModelRunnable model : models) { + logger.debug("Examining model: " + model.getName()); + logger.debug(" Current vertex of graph: " + model.getMbt().getCurrentVertex()); + + check4Crash(model); + + if (model.getMbt().getGraph().getLabelKey().equals(currentVertex) + || model.getMbt().getCurrentVertex().getLabelKey().equals(currentVertex)) { + logger.debug(" " + model.getName() + ", has matching graph or current vertex label"); + if (model.getMbt().hasNotStartedExecution()) { + logger.debug(" Adding not started model: " + model.getName()); + array.add(model); + } else if (model.getMbt().isSuspended()) { + if (model.getMbt().isCulDeSac()) { + logger.debug(" Model has ended up in a Cul-de-Sac"); + if (!model.getMbt().hasNextStep()) { + logger.debug(" Model has reached it's stop condition, so restarting model and resetting current vertex to Start: " + + model.getName()); + model.setExecutionRestarted(true); + model.getMbt().setGenerator(new RandomPathGenerator(new NeverCondition())); + model.getMbt().setCurrentVertex(Keywords.START_NODE); + } else { + logger.debug(" Model has not reached it's stop condition, so restarting model and resetting current vertex to Start: " + + model.getName()); + model.setExecutionRestarted(true); + model.getMbt().setCurrentVertex(Keywords.START_NODE); + } + } else { + logger.debug(" Adding paused model, " + model.getName()); + array.add(model); + } + } else if (!model.getMbt().hasNextStep()) { + logger.debug(" Restarting model: " + model.getName()); + model.setExecutionRestarted(true); + model.getMbt().setGenerator(new RandomPathGenerator(new NeverCondition())); + array.add(model); + } else if (model.isExecutionRestarted()) { + logger.debug(" Adding recently restarted model: " + model.getName()); + array.add(model); + } + } + } + return array; + } + + /** + * Gets a model by it's logical name. + * + * @param name The logical name of a model + * @return The model that matches the logical name. + */ + private ModelRunnable getModel(String name) { + for (ModelRunnable model : models) { + check4Crash(model); + if (model.getName().equals(name)) { + return model; + } + } + return null; + } + + /** + * Searches the handler for a model in a running state. + * + * @return True if any model is in a running state, else false will be + * returned. + */ + private boolean isAnyModelRunning() { + for (ModelRunnable model : models) { + check4Crash(model); + if (model.getMbt().isRunning()) { + return true; + } + } + return false; + } + + /** + * Checks whether the models of the handler has executed. + * + * @return True if all models has reached the stop criteria, else false is + * returned. + */ + /** + * @return + */ + public boolean isAllModelsDone() { + for (ModelRunnable model : models) { + logger.debug("Examining model: " + model.getMbt().getGraph()); + check4Crash(model); + if (model.getMbt().getGenerator().getStopCondition() instanceof NeverCondition) { + logger.debug(" Model: " + model.getName() + ", has a NeverCondition, thus by definition finished."); + } else if (!model.getMbt().hasNextStep()) { + logger.debug(" Model: " + model.getName() + ", has reached it's stop condition"); + } else { + logger.debug(" Model: " + model.getName() + ", is not done: " + model.getMbt().getStatisticsString()); + return false; + } + } + logger.debug("All models has reached their desired stop conditions."); + return true; + } + + /** + * Checks if the handler has a model with the same logical name already + * loaded. + * + * @param name The logical name of the model + * @return True if the handler already has a model with matching logical name. + */ + private boolean hasModel(String name) { + for (ModelRunnable model : models) { + check4Crash(model); + if (model.getName().equals(name)) { + return true; + } + } + return false; + } + + private void check4Crash(ModelRunnable model) { + if (model.isCrashed()) { + logger.error("Model has crashed: " + model.getName()); + throw new RuntimeException("Model has crashed"); + } + } + + /** + * Returns the statistics from all models. + * + * @return The aggregated statistics for all models + * @throws InterruptedException + */ + public String getStatistics() throws InterruptedException { + StringBuilder statistics = new StringBuilder("Statistics for multiple models"); + for (ModelRunnable model : models) { + statistics.append("\n\nStatistics for ").append(model.getName()).append(":\n"); + statistics.append(model.mbt.getStatisticsString()); + } + return statistics.toString(); + } + + public synchronized String getCurrentVertex() { + return currentVertex; + } + + public synchronized void setCurrentVertex(String currentVertex) { + logger.debug("Changing current vertex from: " + this.currentVertex + ", to: " + currentVertex); + this.currentVertex = currentVertex; + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java index c390ee90..113f79f7 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java @@ -26,61 +26,59 @@ package org.graphwalker.core.statistics; -import java.util.HashSet; - import org.graphwalker.core.graph.AbstractElement; import org.graphwalker.core.graph.Edge; import org.graphwalker.core.graph.Graph; +import java.util.HashSet; + /** * @author Johan Tejle - * */ public class EdgeCoverageStatistics extends Statistics { - private int max; - private HashSet usedEdges; + private int max; + private HashSet usedEdges; - /** - * - * @param model - */ - public EdgeCoverageStatistics(Graph model) { - max = model.getEdges().size(); - usedEdges = new HashSet(); - } + /** + * @param model + */ + public EdgeCoverageStatistics(Graph model) { + max = model.getEdges().size(); + usedEdges = new HashSet(); + } - /* - * (non-Javadoc) - * - * @see - * org.graphwalker.statistics.Statistics#addProgress(edu.uci.ics.jung.graph - * .impl.AbstractElement) - */ - @Override - public void addProgress(AbstractElement element) { - if (element instanceof Edge) - usedEdges.add(element.toString()); - } + /* + * (non-Javadoc) + * + * @see + * org.graphwalker.statistics.Statistics#addProgress(edu.uci.ics.jung.graph + * .impl.AbstractElement) + */ + @Override + public void addProgress(AbstractElement element) { + if (element instanceof Edge) + usedEdges.add(element.toString()); + } - /* - * (non-Javadoc) - * - * @see org.graphwalker.statistics.Statistics#getCurrent() - */ - @Override - public int getCurrent() { - return usedEdges.size(); - } + /* + * (non-Javadoc) + * + * @see org.graphwalker.statistics.Statistics#getCurrent() + */ + @Override + public int getCurrent() { + return usedEdges.size(); + } - /* - * (non-Javadoc) - * - * @see org.graphwalker.statistics.Statistics#getMax() - */ - @Override - public int getMax() { - return max; - } + /* + * (non-Javadoc) + * + * @see org.graphwalker.statistics.Statistics#getMax() + */ + @Override + public int getMax() { + return max; + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java index 541d7daf..b30f3c76 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java @@ -26,123 +26,121 @@ package org.graphwalker.core.statistics; -import java.util.HashSet; -import java.util.Stack; - import org.graphwalker.core.graph.AbstractElement; import org.graphwalker.core.graph.Edge; import org.graphwalker.core.graph.Graph; +import java.util.HashSet; +import java.util.Stack; + /** * @author Johan Tejle - * */ public class EdgeSequenceCoverageStatistics extends Statistics { - private HashSet usedSequences; - private HashSet allSequences; - private Stack pathHistory; - private int length; + private HashSet usedSequences; + private HashSet allSequences; + private Stack pathHistory; + private int length; - /** - * - * @param model - * @param sequenceLength - */ - @SuppressWarnings("unchecked") - public EdgeSequenceCoverageStatistics(Graph model, int sequenceLength) { - this.length = sequenceLength; - usedSequences = new HashSet(); - allSequences = new HashSet(); - pathHistory = new Stack(); + /** + * @param model + * @param sequenceLength + */ + @SuppressWarnings("unchecked") + public EdgeSequenceCoverageStatistics(Graph model, int sequenceLength) { + this.length = sequenceLength; + usedSequences = new HashSet(); + allSequences = new HashSet(); + pathHistory = new Stack(); - Stack[] possibilities = new Stack[sequenceLength]; - for (int i = 0; i < sequenceLength; i++) { - possibilities[i] = new Stack(); - } - possibilities[0].addAll(model.getEdges()); - while (possibilities[0].size() > 0) { - for (int i = 0; i < sequenceLength - 1; i++) { - if (possibilities[i].size() == 0) - return; - if (possibilities[i + 1].size() == 0) - possibilities[i + 1].addAll(model.getOutEdges(model.getDest(possibilities[i].peek()))); - } - while (possibilities[sequenceLength - 1].size() > 0) { - allSequences.add(getSequenceName(possibilities)); - possibilities[sequenceLength - 1].pop(); - } - for (int i = sequenceLength - 1; i > 0; i--) { - if (possibilities[i].size() == 0) { - possibilities[i - 1].pop(); - } - } - } - } + Stack[] possibilities = new Stack[sequenceLength]; + for (int i = 0; i < sequenceLength; i++) { + possibilities[i] = new Stack(); + } + possibilities[0].addAll(model.getEdges()); + while (possibilities[0].size() > 0) { + for (int i = 0; i < sequenceLength - 1; i++) { + if (possibilities[i].size() == 0) + return; + if (possibilities[i + 1].size() == 0) + possibilities[i + 1].addAll(model.getOutEdges(model.getDest(possibilities[i].peek()))); + } + while (possibilities[sequenceLength - 1].size() > 0) { + allSequences.add(getSequenceName(possibilities)); + possibilities[sequenceLength - 1].pop(); + } + for (int i = sequenceLength - 1; i > 0; i--) { + if (possibilities[i].size() == 0) { + possibilities[i - 1].pop(); + } + } + } + } - /** - * @param possibilities - * @return - */ - private String getSequenceName(Stack[] possibilities) { - StringBuilder stringBuilder = new StringBuilder(); - for (Stack possibility : possibilities) { - stringBuilder.append(possibility.peek().hashCode()); - stringBuilder.append(" "); - } - return stringBuilder.toString().trim(); - } + /** + * @param possibilities + * @return + */ + private String getSequenceName(Stack[] possibilities) { + StringBuilder stringBuilder = new StringBuilder(); + for (Stack possibility : possibilities) { + stringBuilder.append(possibility.peek().hashCode()); + stringBuilder.append(" "); + } + return stringBuilder.toString().trim(); + } - /** - * @return - */ - private String getCurrentSequenceName() { - StringBuilder stringBuilder = new StringBuilder(); - for (int i = 0; i < pathHistory.size(); i++) { - stringBuilder.append(pathHistory.elementAt(i).hashCode()); - stringBuilder.append(" "); - } - return stringBuilder.toString().trim(); - } + /** + * @return + */ + private String getCurrentSequenceName() { + StringBuilder stringBuilder = new StringBuilder(); + for (int i = 0; i < pathHistory.size(); i++) { + stringBuilder.append(pathHistory.elementAt(i).hashCode()); + stringBuilder.append(" "); + } + return stringBuilder.toString().trim(); + } - /* - * (non-Javadoc) - * - * @see - * org.graphwalker.statistics.Statistics#addProgress(edu.uci.ics.jung.graph - * .impl.AbstractElement) - */ - @Override - public void addProgress(AbstractElement element) { - if (element instanceof Edge) { - pathHistory.add(element); - } - if (pathHistory.size() > this.length) { - pathHistory.remove(0); - } - if (pathHistory.size() == this.length) { - usedSequences.add(getCurrentSequenceName()); - } - } + /* + * (non-Javadoc) + * + * @see + * org.graphwalker.statistics.Statistics#addProgress(edu.uci.ics.jung.graph + * .impl.AbstractElement) + */ + @Override + public void addProgress(AbstractElement element) { + if (element instanceof Edge) { + pathHistory.add(element); + } + if (pathHistory.size() > this.length) { + pathHistory.remove(0); + } + if (pathHistory.size() == this.length) { + usedSequences.add(getCurrentSequenceName()); + } + } - /* - * (non-Javadoc) - * - * @see org.graphwalker.statistics.Statistics#getCurrent() - */ - @Override - public int getCurrent() { - return usedSequences.size(); - } + /* + * (non-Javadoc) + * + * @see org.graphwalker.statistics.Statistics#getCurrent() + */ + @Override + public int getCurrent() { + return usedSequences.size(); + } - /* - * (non-Javadoc) - * - * @see org.graphwalker.statistics.Statistics#getMax() - */ - @Override - public int getMax() { - return allSequences.size(); - } + /* + * (non-Javadoc) + * + * @see org.graphwalker.statistics.Statistics#getMax() + */ + @Override + public int getMax() { + return allSequences.size(); + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java index 8ad1ac16..eb5e5792 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java @@ -26,77 +26,75 @@ package org.graphwalker.core.statistics; +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Graph; + import java.util.Collections; import java.util.HashSet; import java.util.Vector; -import org.graphwalker.core.graph.AbstractElement; -import org.graphwalker.core.graph.Graph; - /** * @author Johan Tejle - * */ public class RequirementCoverageStatistics extends Statistics { - private HashSet usedRequirements; - private HashSet allRequirements; + private HashSet usedRequirements; + private HashSet allRequirements; - /** - * - * @param model - */ - public RequirementCoverageStatistics(Graph model) { - usedRequirements = new HashSet(); - allRequirements = new HashSet(); + /** + * @param model + */ + public RequirementCoverageStatistics(Graph model) { + usedRequirements = new HashSet(); + allRequirements = new HashSet(); - Vector allElements = new Vector(); - allElements.addAll(model.getEdges()); - allElements.addAll(model.getVertices()); - for (AbstractElement e : allElements) { - if (!e.getReqTagKey().isEmpty()) { - appendRequirements(allRequirements, e.getReqTagKey()); - } - } - } + Vector allElements = new Vector(); + allElements.addAll(model.getEdges()); + allElements.addAll(model.getVertices()); + for (AbstractElement e : allElements) { + if (!e.getReqTagKey().isEmpty()) { + appendRequirements(allRequirements, e.getReqTagKey()); + } + } + } - private void appendRequirements(HashSet set, String requirements) { - String[] tags = requirements.split(","); - Collections.addAll(set, tags); - } + private void appendRequirements(HashSet set, String requirements) { + String[] tags = requirements.split(","); + Collections.addAll(set, tags); + } - /* - * (non-Javadoc) - * - * @see - * org.graphwalker.statistics.Statistics#addProgress(edu.uci.ics.jung.graph - * .impl.AbstractElement) - */ - @Override - public void addProgress(AbstractElement element) { - if (element != null && !element.getReqTagKey().isEmpty()) { - appendRequirements(usedRequirements, element.getReqTagKey()); - } - } + /* + * (non-Javadoc) + * + * @see + * org.graphwalker.statistics.Statistics#addProgress(edu.uci.ics.jung.graph + * .impl.AbstractElement) + */ + @Override + public void addProgress(AbstractElement element) { + if (element != null && !element.getReqTagKey().isEmpty()) { + appendRequirements(usedRequirements, element.getReqTagKey()); + } + } - /* - * (non-Javadoc) - * - * @see org.graphwalker.statistics.Statistics#getCurrent() - */ - @Override - public int getCurrent() { - return usedRequirements.size(); - } + /* + * (non-Javadoc) + * + * @see org.graphwalker.statistics.Statistics#getCurrent() + */ + @Override + public int getCurrent() { + return usedRequirements.size(); + } - /* - * (non-Javadoc) - * - * @see org.graphwalker.statistics.Statistics#getMax() - */ - @Override - public int getMax() { - return allRequirements.size(); - } + /* + * (non-Javadoc) + * + * @see org.graphwalker.statistics.Statistics#getMax() + */ + @Override + public int getMax() { + return allRequirements.size(); + } } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java index 55d32a5c..b6ff3cb5 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java @@ -30,12 +30,11 @@ /** * @author Johan Tejle - * */ public abstract class Statistics { - public abstract void addProgress(AbstractElement element); + public abstract void addProgress(AbstractElement element); - public abstract int getCurrent(); + public abstract int getCurrent(); - public abstract int getMax(); + public abstract int getMax(); } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java index fa91fd99..dfed3448 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java @@ -26,62 +26,60 @@ package org.graphwalker.core.statistics; -import java.util.HashSet; - import org.graphwalker.core.graph.AbstractElement; import org.graphwalker.core.graph.Graph; import org.graphwalker.core.graph.Vertex; +import java.util.HashSet; + /** * @author Johan Tejle - * */ public class VertexCoverageStatistics extends Statistics { - private int max; - private HashSet usedVertices; + private int max; + private HashSet usedVertices; - /** - * - * @param model - */ - public VertexCoverageStatistics(Graph model) { - max = model.getVertices().size(); - usedVertices = new HashSet(); - } + /** + * @param model + */ + public VertexCoverageStatistics(Graph model) { + max = model.getVertices().size(); + usedVertices = new HashSet(); + } - /* - * (non-Javadoc) - * - * @see - * org.graphwalker.statistics.Statistics#addProgress(edu.uci.ics.jung.graph - * .impl.AbstractElement) - */ - @Override - public void addProgress(AbstractElement element) { - if (element instanceof Vertex) { - usedVertices.add(element.toString()); - } - } + /* + * (non-Javadoc) + * + * @see + * org.graphwalker.statistics.Statistics#addProgress(edu.uci.ics.jung.graph + * .impl.AbstractElement) + */ + @Override + public void addProgress(AbstractElement element) { + if (element instanceof Vertex) { + usedVertices.add(element.toString()); + } + } - /* - * (non-Javadoc) - * - * @see org.graphwalker.statistics.Statistics#getCurrent() - */ - @Override - public int getCurrent() { - return usedVertices.size(); - } + /* + * (non-Javadoc) + * + * @see org.graphwalker.statistics.Statistics#getCurrent() + */ + @Override + public int getCurrent() { + return usedVertices.size(); + } - /* - * (non-Javadoc) - * - * @see org.graphwalker.statistics.Statistics#getMax() - */ - @Override - public int getMax() { - return max; - } + /* + * (non-Javadoc) + * + * @see org.graphwalker.statistics.Statistics#getMax() + */ + @Override + public int getMax() { + return max; + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/ExtendedFiniteStateMachineTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/ExtendedFiniteStateMachineTest.java index 2a04f220..9e7a161f 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/ExtendedFiniteStateMachineTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/ExtendedFiniteStateMachineTest.java @@ -26,67 +26,65 @@ package org.graphwalker.core; -import org.graphwalker.core.Util; +import junit.framework.TestCase; import org.graphwalker.core.graph.Edge; import org.graphwalker.core.graph.Graph; import org.graphwalker.core.graph.Vertex; import org.graphwalker.core.machines.ExtendedFiniteStateMachine; -import junit.framework.TestCase; - public class ExtendedFiniteStateMachineTest extends TestCase { - Graph graph; - Vertex start; - Vertex v1; - Vertex v2; - Edge e1; - Edge e2; - Edge e3; - Edge e4; + Graph graph; + Vertex start; + Vertex v1; + Vertex v2; + Edge e1; + Edge e2; + Edge e3; + Edge e4; - @Override - protected void setUp() throws Exception { - super.setUp(); - graph = new Graph(); + @Override + protected void setUp() throws Exception { + super.setUp(); + graph = new Graph(); - start = Util.addVertexToGraph(graph, "Start"); + start = Util.addVertexToGraph(graph, "Start"); - v1 = Util.addVertexToGraph(graph, "V1"); - v1.setReqTagKey("REQ002"); + v1 = Util.addVertexToGraph(graph, "V1"); + v1.setReqTagKey("REQ002"); - v2 = Util.addVertexToGraph(graph, "V2"); - v2.setReqTagKey("REQ004"); + v2 = Util.addVertexToGraph(graph, "V2"); + v2.setReqTagKey("REQ004"); - e1 = Util.addEdgeToGraph(graph, start, v1, "E1", null, null, "x=1;y=new Vector()"); - e1.setReqTagKey("REQ001,REQ002"); + e1 = Util.addEdgeToGraph(graph, start, v1, "E1", null, null, "x=1;y=new Vector()"); + e1.setReqTagKey("REQ001,REQ002"); - e2 = Util.addEdgeToGraph(graph, v1, v2, "E2", null, null, "x=2"); - e2.setReqTagKey("REQ003"); + e2 = Util.addEdgeToGraph(graph, v1, v2, "E2", null, null, "x=2"); + e2.setReqTagKey("REQ003"); - e3 = Util.addEdgeToGraph(graph, v2, v2, "E3", null, "x<6", "x++"); + e3 = Util.addEdgeToGraph(graph, v2, v2, "E3", null, "x<6", "x++"); - e4 = Util.addEdgeToGraph(graph, v2, v1, "E4", null, "y.size()<3", "y.add(x)"); - } + e4 = Util.addEdgeToGraph(graph, v2, v1, "E4", null, "y.size()<3", "y.add(x)"); + } - public void testRequirements() { - ExtendedFiniteStateMachine EFSM = new ExtendedFiniteStateMachine(false); - EFSM.setModel(graph); - assertEquals("{REQ001=0, REQ004=0, REQ003=0, REQ002=0}", EFSM.getAllRequirements().toString()); - assertEquals("[]", EFSM.getCoveredRequirements().toString()); - } + public void testRequirements() { + ExtendedFiniteStateMachine EFSM = new ExtendedFiniteStateMachine(false); + EFSM.setModel(graph); + assertEquals("{REQ001=0, REQ004=0, REQ003=0, REQ002=0}", EFSM.getAllRequirements().toString()); + assertEquals("[]", EFSM.getCoveredRequirements().toString()); + } - public void testRequirementsWalk() { - ExtendedFiniteStateMachine EFSM = new ExtendedFiniteStateMachine(false); - EFSM.setModel(graph); - assertEquals("Start", EFSM.getCurrentVertexName()); - EFSM.walkEdge(e1); - assertEquals("V1/x=1;y=[];", EFSM.getCurrentVertexName()); - assertEquals("{REQ001=1, REQ004=0, REQ003=0, REQ002=2}", EFSM.getAllRequirements().toString()); - assertEquals("[REQ001, REQ002]", EFSM.getCoveredRequirements().toString()); - EFSM.walkEdge(e2); - assertEquals("V2/x=2;y=[];", EFSM.getCurrentVertexName()); - assertEquals("{REQ001=1, REQ004=1, REQ003=1, REQ002=2}", EFSM.getAllRequirements().toString()); - assertEquals("[REQ001, REQ004, REQ003, REQ002]", EFSM.getCoveredRequirements().toString()); - } + public void testRequirementsWalk() { + ExtendedFiniteStateMachine EFSM = new ExtendedFiniteStateMachine(false); + EFSM.setModel(graph); + assertEquals("Start", EFSM.getCurrentVertexName()); + EFSM.walkEdge(e1); + assertEquals("V1/x=1;y=[];", EFSM.getCurrentVertexName()); + assertEquals("{REQ001=1, REQ004=0, REQ003=0, REQ002=2}", EFSM.getAllRequirements().toString()); + assertEquals("[REQ001, REQ002]", EFSM.getCoveredRequirements().toString()); + EFSM.walkEdge(e2); + assertEquals("V2/x=2;y=[];", EFSM.getCurrentVertexName()); + assertEquals("{REQ001=1, REQ004=1, REQ003=1, REQ002=2}", EFSM.getAllRequirements().toString()); + assertEquals("[REQ001, REQ004, REQ003, REQ002]", EFSM.getCoveredRequirements().toString()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/FiniteStateMachineTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/FiniteStateMachineTest.java index 71bb9520..fcc324b4 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/FiniteStateMachineTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/FiniteStateMachineTest.java @@ -26,68 +26,66 @@ package org.graphwalker.core; -import org.graphwalker.core.Util; +import junit.framework.TestCase; import org.graphwalker.core.graph.Edge; import org.graphwalker.core.graph.Graph; import org.graphwalker.core.graph.Vertex; import org.graphwalker.core.machines.FiniteStateMachine; -import junit.framework.TestCase; - public class FiniteStateMachineTest extends TestCase { - Graph graph; - Vertex start; - Vertex v1; - Vertex v2; - Edge e1; - Edge e2; - Edge e3; - Edge e4; + Graph graph; + Vertex start; + Vertex v1; + Vertex v2; + Edge e1; + Edge e2; + Edge e3; + Edge e4; - @Override - protected void setUp() throws Exception { - super.setUp(); - graph = new Graph(); + @Override + protected void setUp() throws Exception { + super.setUp(); + graph = new Graph(); - start = Util.addVertexToGraph(graph, "Start"); + start = Util.addVertexToGraph(graph, "Start"); - v1 = Util.addVertexToGraph(graph, "V1"); - v1.setReqTagKey("REQ002"); + v1 = Util.addVertexToGraph(graph, "V1"); + v1.setReqTagKey("REQ002"); - v2 = Util.addVertexToGraph(graph, "V2"); - v2.setReqTagKey("REQ004"); + v2 = Util.addVertexToGraph(graph, "V2"); + v2.setReqTagKey("REQ004"); - e1 = Util.addEdgeToGraph(graph, start, v1, "E1", null, null, null); - e1.setReqTagKey("REQ001,REQ002"); + e1 = Util.addEdgeToGraph(graph, start, v1, "E1", null, null, null); + e1.setReqTagKey("REQ001,REQ002"); - e2 = Util.addEdgeToGraph(graph, v1, v2, "E2", null, null, null); - e2.setReqTagKey("REQ003"); + e2 = Util.addEdgeToGraph(graph, v1, v2, "E2", null, null, null); + e2.setReqTagKey("REQ003"); - e3 = Util.addEdgeToGraph(graph, v2, v2, "E3", null, null, null); + e3 = Util.addEdgeToGraph(graph, v2, v2, "E3", null, null, null); - e4 = Util.addEdgeToGraph(graph, v2, v1, "E4", null, null, null); - } + e4 = Util.addEdgeToGraph(graph, v2, v1, "E4", null, null, null); + } - public void testRequirements() { - FiniteStateMachine FSM = new FiniteStateMachine(); - FSM.setModel(graph); - assertEquals("{REQ001=0, REQ004=0, REQ003=0, REQ002=0}", FSM.getAllRequirements().toString()); - assertEquals("[]", FSM.getCoveredRequirements().toString()); - } + public void testRequirements() { + FiniteStateMachine FSM = new FiniteStateMachine(); + FSM.setModel(graph); + assertEquals("{REQ001=0, REQ004=0, REQ003=0, REQ002=0}", FSM.getAllRequirements().toString()); + assertEquals("[]", FSM.getCoveredRequirements().toString()); + } - public void testRequirementsWalk() { - FiniteStateMachine FSM = new FiniteStateMachine(); - FSM.setModel(graph); - assertEquals("Start", FSM.getCurrentVertexName()); - FSM.walkEdge(e1); - assertEquals("E1", FSM.getLastEdgeName()); - assertEquals("V1", FSM.getCurrentVertexName()); - assertEquals("{REQ001=1, REQ004=0, REQ003=0, REQ002=2}", FSM.getAllRequirements().toString()); - assertEquals("[REQ001, REQ002]", FSM.getCoveredRequirements().toString()); - FSM.walkEdge(e2); - assertEquals("V2", FSM.getCurrentVertexName()); - assertEquals("{REQ001=1, REQ004=1, REQ003=1, REQ002=2}", FSM.getAllRequirements().toString()); - assertEquals("[REQ001, REQ004, REQ003, REQ002]", FSM.getCoveredRequirements().toString()); - } + public void testRequirementsWalk() { + FiniteStateMachine FSM = new FiniteStateMachine(); + FSM.setModel(graph); + assertEquals("Start", FSM.getCurrentVertexName()); + FSM.walkEdge(e1); + assertEquals("E1", FSM.getLastEdgeName()); + assertEquals("V1", FSM.getCurrentVertexName()); + assertEquals("{REQ001=1, REQ004=0, REQ003=0, REQ002=2}", FSM.getAllRequirements().toString()); + assertEquals("[REQ001, REQ002]", FSM.getCoveredRequirements().toString()); + FSM.walkEdge(e2); + assertEquals("V2", FSM.getCurrentVertexName()); + assertEquals("{REQ001=1, REQ004=1, REQ003=1, REQ002=2}", FSM.getAllRequirements().toString()); + assertEquals("[REQ001, REQ004, REQ003, REQ002]", FSM.getCoveredRequirements().toString()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/KeywordsTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/KeywordsTest.java index e0cf3aa4..fd89d8af 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/KeywordsTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/KeywordsTest.java @@ -26,70 +26,68 @@ package org.graphwalker.core; -import org.graphwalker.core.Keywords; +import junit.framework.TestCase; import org.graphwalker.core.exceptions.GeneratorException; import org.graphwalker.core.exceptions.StopConditionException; -import junit.framework.TestCase; - public class KeywordsTest extends TestCase { - public void testKeywords() { - assertEquals(true, Keywords.isKeyWord("BACKTRACK")); - assertEquals(true, Keywords.isKeyWord("backtrack")); - assertEquals(true, Keywords.isKeyWord("BLOCKED")); - assertEquals(true, Keywords.isKeyWord("blocked")); - assertEquals(true, Keywords.isKeyWord("MERGE")); - assertEquals(true, Keywords.isKeyWord("merge")); - assertEquals(true, Keywords.isKeyWord("NO_MERGE")); - assertEquals(true, Keywords.isKeyWord("no_merge")); - assertEquals(true, Keywords.isKeyWord("SWITCH_MODEL")); - assertEquals(true, Keywords.isKeyWord("switch_model")); - } + public void testKeywords() { + assertEquals(true, Keywords.isKeyWord("BACKTRACK")); + assertEquals(true, Keywords.isKeyWord("backtrack")); + assertEquals(true, Keywords.isKeyWord("BLOCKED")); + assertEquals(true, Keywords.isKeyWord("blocked")); + assertEquals(true, Keywords.isKeyWord("MERGE")); + assertEquals(true, Keywords.isKeyWord("merge")); + assertEquals(true, Keywords.isKeyWord("NO_MERGE")); + assertEquals(true, Keywords.isKeyWord("no_merge")); + assertEquals(true, Keywords.isKeyWord("SWITCH_MODEL")); + assertEquals(true, Keywords.isKeyWord("switch_model")); + } - public void testNonKeywords() { - assertEquals(false, Keywords.isKeyWord("BACKTRACKING")); - assertEquals(false, Keywords.isKeyWord("BLOCK")); - assertEquals(false, Keywords.isKeyWord("MERGED")); - assertEquals(false, Keywords.isKeyWord("NO_MERGED")); - assertEquals(false, Keywords.isKeyWord("REQTAG")); - assertEquals(false, Keywords.isKeyWord("")); - } + public void testNonKeywords() { + assertEquals(false, Keywords.isKeyWord("BACKTRACKING")); + assertEquals(false, Keywords.isKeyWord("BLOCK")); + assertEquals(false, Keywords.isKeyWord("MERGED")); + assertEquals(false, Keywords.isKeyWord("NO_MERGED")); + assertEquals(false, Keywords.isKeyWord("REQTAG")); + assertEquals(false, Keywords.isKeyWord("")); + } - public void testGetStopCondition() throws StopConditionException { - assertTrue(Keywords.getStopCondition("REACHED_EDGE") != -1); - assertTrue(Keywords.getStopCondition("REACHED_VERTEX") != -1); - assertTrue(Keywords.getStopCondition("EDGE_COVERAGE") != -1); - assertTrue(Keywords.getStopCondition("VERTEX_COVERAGE") != -1); - assertTrue(Keywords.getStopCondition("TEST_LENGTH") != -1); - assertTrue(Keywords.getStopCondition("TEST_DURATION") != -1); - assertTrue(Keywords.getStopCondition("REQUIREMENT_COVERAGE") != -1); - assertTrue(Keywords.getStopCondition("REACHED_REQUIREMENT") != -1); + public void testGetStopCondition() throws StopConditionException { + assertTrue(Keywords.getStopCondition("REACHED_EDGE") != -1); + assertTrue(Keywords.getStopCondition("REACHED_VERTEX") != -1); + assertTrue(Keywords.getStopCondition("EDGE_COVERAGE") != -1); + assertTrue(Keywords.getStopCondition("VERTEX_COVERAGE") != -1); + assertTrue(Keywords.getStopCondition("TEST_LENGTH") != -1); + assertTrue(Keywords.getStopCondition("TEST_DURATION") != -1); + assertTrue(Keywords.getStopCondition("REQUIREMENT_COVERAGE") != -1); + assertTrue(Keywords.getStopCondition("REACHED_REQUIREMENT") != -1); - try { - assertTrue(Keywords.getStopCondition("REACHEDREQUIREMENT") == -1); - assertTrue(Keywords.getStopCondition("") == -1); - assertTrue(Keywords.getStopCondition(null) == -1); - } catch (StopConditionException e) { - } + try { + assertTrue(Keywords.getStopCondition("REACHEDREQUIREMENT") == -1); + assertTrue(Keywords.getStopCondition("") == -1); + assertTrue(Keywords.getStopCondition(null) == -1); + } catch (StopConditionException e) { + } - assertTrue(Keywords.getStopConditions().size() > 0); - } + assertTrue(Keywords.getStopConditions().size() > 0); + } - public void testGetGenerator() throws GeneratorException { - assertTrue(Keywords.getGenerator("RANDOM") != -1); - assertTrue(Keywords.getGenerator("A_STAR") != -1); - assertTrue(Keywords.getGenerator("LIST") != -1); - assertTrue(Keywords.getGenerator("STUB") != -1); - assertTrue(Keywords.getGenerator("REQUIREMENTS") != -1); + public void testGetGenerator() throws GeneratorException { + assertTrue(Keywords.getGenerator("RANDOM") != -1); + assertTrue(Keywords.getGenerator("A_STAR") != -1); + assertTrue(Keywords.getGenerator("LIST") != -1); + assertTrue(Keywords.getGenerator("STUB") != -1); + assertTrue(Keywords.getGenerator("REQUIREMENTS") != -1); - try { - assertTrue(Keywords.getGenerator("RASNDOM") == -1); - assertTrue(Keywords.getGenerator("") == -1); - assertTrue(Keywords.getGenerator(null) == -1); - } catch (GeneratorException e) { - } + try { + assertTrue(Keywords.getGenerator("RASNDOM") == -1); + assertTrue(Keywords.getGenerator("") == -1); + assertTrue(Keywords.getGenerator(null) == -1); + } catch (GeneratorException e) { + } - assertTrue(Keywords.getGenerators().size() > 0); - } + assertTrue(Keywords.getGenerators().size() > 0); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/ModelBasedTestingTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/ModelBasedTestingTest.java index 8ba08c3c..25f6c210 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/ModelBasedTestingTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/ModelBasedTestingTest.java @@ -26,243 +26,234 @@ package org.graphwalker.core; -import java.awt.GraphicsEnvironment; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.PrintStream; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.graphwalker.core.Keywords; -import org.graphwalker.core.ModelBasedTesting; -import org.graphwalker.core.Util; +import junit.framework.TestCase; import org.graphwalker.core.exceptions.GeneratorException; import org.graphwalker.core.exceptions.InvalidDataException; import org.graphwalker.core.exceptions.StopConditionException; import org.graphwalker.core.generators.NonOptimizedShortestPath; import org.jdom.JDOMException; -import junit.framework.TestCase; +import java.awt.*; +import java.io.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; /** * @author Johan Tejle - * */ public class ModelBasedTestingTest extends TestCase { - @Override - protected void setUp() throws Exception { - super.setUp(); - ModelBasedTesting.getInstance().reset(); - } - - private InputStream redirectIn() { - return new InputStream() { - @Override - public int read() throws IOException { - try { - Thread.sleep(100); - } catch (InterruptedException e) { - Util.logStackTraceToError(e); - } - return '0'; - } - }; - } - - public void testXmlLoading_Simple() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { - ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init.xml")); - assertEquals("RANDOM{EC>=100}", mbt.toString()); - } - - public void testXmlLoading_Moderate() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { - ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init2.xml")); - assertEquals("RANDOM{((EC>=100 AND SC>=100) OR L=50)}", mbt.toString()); - } - - @SuppressWarnings("static-access") - public void testXmlLoading_Advanced() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { - GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); - if (ge.isHeadless()) - return; - - ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init3.xml")); - assertEquals("RANDOM{EC>=10}\nRANDOM{(SC>=30 AND EC>=10)}", mbt.toString()); - } - - @SuppressWarnings("static-access") - public void testXmlLoading_OfflineStub() throws StopConditionException, GeneratorException, IOException, JDOMException, - InterruptedException { - GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); - if (ge.isHeadless()) - return; - - ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init4.xml")); - assertEquals("CODE", mbt.toString()); - File f = new File("mbt_init4.java"); - assertTrue(f.exists()); - assertTrue(f.delete()); - assertFalse(f.exists()); - } - - @SuppressWarnings("static-access") - public void testXmlLoading_JavaExecution() throws StopConditionException, GeneratorException, IOException, JDOMException, - InterruptedException { - GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); - if (ge.isHeadless()) - return; - - ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init5.xml")); - assertEquals("RANDOM{SC>=40}", mbt.toString()); - } - - public void testXmlLoading_OfflineRequirements() throws StopConditionException, GeneratorException, IOException, JDOMException, - InterruptedException { - PrintStream oldOut = System.out; - ByteArrayOutputStream innerOut = new ByteArrayOutputStream(); - - System.setOut(new PrintStream(innerOut)); - ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init6.xml")); - System.setOut(oldOut); - - assertEquals("REQUIREMENTS", mbt.toString()); - assertEquals(6, getNumMatches(Pattern.compile("req[ \\d]+").matcher(innerOut.toString()))); - } - - public void testXmlLoading_OnlineRequirements() throws StopConditionException, GeneratorException, IOException, JDOMException, - InterruptedException { - InputStream oldIn = System.in; - PrintStream oldOut = System.out; - ByteArrayOutputStream innerOut = new ByteArrayOutputStream(); - - System.setOut(new PrintStream(innerOut)); - System.setIn(redirectIn()); - ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init7.xml")); - System.setIn(oldIn); - System.setOut(oldOut); - - assertEquals("REQUIREMENTS", mbt.toString()); - assertEquals(6, getNumMatches(Pattern.compile("req[ \\d]+").matcher(innerOut.toString()))); - } - - @SuppressWarnings("static-access") - public void testGetdataValue() throws InvalidDataException, StopConditionException, GeneratorException, IOException, JDOMException, - InterruptedException { - GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); - if (ge.isHeadless()) - return; - - InputStream oldIn = System.in; - PrintStream oldOut = System.out; - ByteArrayOutputStream innerOut = new ByteArrayOutputStream(); - - System.setOut(new PrintStream(innerOut)); - System.setIn(redirectIn()); - ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init10.xml")); - System.setIn(oldIn); - System.setOut(oldOut); - - System.out.print(mbt.getDataValue("incorrect")); - - assertEquals("0", mbt.getDataValue("incorrect")); - } - - private int getNumMatches(Matcher m) { - int numMatches = 0; - while (m.find() == true) - numMatches++; - return numMatches; - } - - @SuppressWarnings("static-access") - public void testExecAction() throws InvalidDataException, StopConditionException, GeneratorException, IOException, JDOMException, - InterruptedException { - GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); - if (ge.isHeadless()) - return; - - InputStream oldIn = System.in; - PrintStream oldOut = System.out; - ByteArrayOutputStream innerOut = new ByteArrayOutputStream(); - - System.setOut(new PrintStream(innerOut)); - System.setIn(redirectIn()); - ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init11.xml")); - System.setIn(oldIn); - System.setOut(oldOut); - - System.out.print(mbt.execAction("str.toUpperCase()")); - - assertEquals("ABC", mbt.execAction("str.toUpperCase()")); - } - - @SuppressWarnings("static-access") - public void testPassRequirement() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { - GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); - if (ge.isHeadless()) - return; - - ModelBasedTesting mbt; - mbt = Util.loadMbtFromXml(Util.getFile("xml/reqCoverage.xml")); - mbt.passRequirement(true); - mbt.passRequirement(false); - mbt.passRequirement(true); - } - - public void testNewState() throws StopConditionException, InterruptedException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/ModelBasedTestingTest.testNewState.graphml"); - mbt.enableExtended(false); - mbt.setWeighted(false); - NonOptimizedShortestPath generator = new NonOptimizedShortestPath(Util.getCondition(mbt.getMachine(), Keywords.CONDITION_EDGE_COVERAGE, + @Override + protected void setUp() throws Exception { + super.setUp(); + ModelBasedTesting.getInstance().reset(); + } + + private InputStream redirectIn() { + return new InputStream() { + @Override + public int read() throws IOException { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + Util.logStackTraceToError(e); + } + return '0'; + } + }; + } + + public void testXmlLoading_Simple() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init.xml")); + assertEquals("RANDOM{EC>=100}", mbt.toString()); + } + + public void testXmlLoading_Moderate() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init2.xml")); + assertEquals("RANDOM{((EC>=100 AND SC>=100) OR L=50)}", mbt.toString()); + } + + @SuppressWarnings("static-access") + public void testXmlLoading_Advanced() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); + if (ge.isHeadless()) + return; + + ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init3.xml")); + assertEquals("RANDOM{EC>=10}\nRANDOM{(SC>=30 AND EC>=10)}", mbt.toString()); + } + + @SuppressWarnings("static-access") + public void testXmlLoading_OfflineStub() throws StopConditionException, GeneratorException, IOException, JDOMException, + InterruptedException { + GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); + if (ge.isHeadless()) + return; + + ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init4.xml")); + assertEquals("CODE", mbt.toString()); + File f = new File("mbt_init4.java"); + assertTrue(f.exists()); + assertTrue(f.delete()); + assertFalse(f.exists()); + } + + @SuppressWarnings("static-access") + public void testXmlLoading_JavaExecution() throws StopConditionException, GeneratorException, IOException, JDOMException, + InterruptedException { + GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); + if (ge.isHeadless()) + return; + + ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init5.xml")); + assertEquals("RANDOM{SC>=40}", mbt.toString()); + } + + public void testXmlLoading_OfflineRequirements() throws StopConditionException, GeneratorException, IOException, JDOMException, + InterruptedException { + PrintStream oldOut = System.out; + ByteArrayOutputStream innerOut = new ByteArrayOutputStream(); + + System.setOut(new PrintStream(innerOut)); + ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init6.xml")); + System.setOut(oldOut); + + assertEquals("REQUIREMENTS", mbt.toString()); + assertEquals(6, getNumMatches(Pattern.compile("req[ \\d]+").matcher(innerOut.toString()))); + } + + public void testXmlLoading_OnlineRequirements() throws StopConditionException, GeneratorException, IOException, JDOMException, + InterruptedException { + InputStream oldIn = System.in; + PrintStream oldOut = System.out; + ByteArrayOutputStream innerOut = new ByteArrayOutputStream(); + + System.setOut(new PrintStream(innerOut)); + System.setIn(redirectIn()); + ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init7.xml")); + System.setIn(oldIn); + System.setOut(oldOut); + + assertEquals("REQUIREMENTS", mbt.toString()); + assertEquals(6, getNumMatches(Pattern.compile("req[ \\d]+").matcher(innerOut.toString()))); + } + + @SuppressWarnings("static-access") + public void testGetdataValue() throws InvalidDataException, StopConditionException, GeneratorException, IOException, JDOMException, + InterruptedException { + GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); + if (ge.isHeadless()) + return; + + InputStream oldIn = System.in; + PrintStream oldOut = System.out; + ByteArrayOutputStream innerOut = new ByteArrayOutputStream(); + + System.setOut(new PrintStream(innerOut)); + System.setIn(redirectIn()); + ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init10.xml")); + System.setIn(oldIn); + System.setOut(oldOut); + + System.out.print(mbt.getDataValue("incorrect")); + + assertEquals("0", mbt.getDataValue("incorrect")); + } + + private int getNumMatches(Matcher m) { + int numMatches = 0; + while (m.find() == true) + numMatches++; + return numMatches; + } + + @SuppressWarnings("static-access") + public void testExecAction() throws InvalidDataException, StopConditionException, GeneratorException, IOException, JDOMException, + InterruptedException { + GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); + if (ge.isHeadless()) + return; + + InputStream oldIn = System.in; + PrintStream oldOut = System.out; + ByteArrayOutputStream innerOut = new ByteArrayOutputStream(); + + System.setOut(new PrintStream(innerOut)); + System.setIn(redirectIn()); + ModelBasedTesting mbt = Util.loadMbtFromXml(Util.getFile("xml/reqtags/mbt_init11.xml")); + System.setIn(oldIn); + System.setOut(oldOut); + + System.out.print(mbt.execAction("str.toUpperCase()")); + + assertEquals("ABC", mbt.execAction("str.toUpperCase()")); + } + + @SuppressWarnings("static-access") + public void testPassRequirement() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); + if (ge.isHeadless()) + return; + + ModelBasedTesting mbt; + mbt = Util.loadMbtFromXml(Util.getFile("xml/reqCoverage.xml")); + mbt.passRequirement(true); + mbt.passRequirement(false); + mbt.passRequirement(true); + } + + public void testNewState() throws StopConditionException, InterruptedException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/ModelBasedTestingTest.testNewState.graphml"); + mbt.enableExtended(false); + mbt.setWeighted(false); + NonOptimizedShortestPath generator = new NonOptimizedShortestPath(Util.getCondition(mbt.getMachine(), Keywords.CONDITION_EDGE_COVERAGE, "100")); - mbt.setGenerator(generator); - - String[] pair = mbt.getNextStep(); - assertEquals("e_init", pair[0]); - assertEquals("v_BrowserStopped", pair[1]); - assertEquals("e_init", mbt.getCurrentEdgeName()); - assertEquals("v_BrowserStopped", mbt.getCurrentVertexName()); - - pair = mbt.getNextStep(); - assertEquals("e_StartBrowser", pair[0]); - assertEquals("v_BrowserStarted", pair[1]); - assertEquals("e_StartBrowser", mbt.getCurrentEdgeName()); - assertEquals("v_BrowserStarted", mbt.getCurrentVertexName()); - - pair = mbt.getNextStep(); - assertEquals("e_EnterBaseURL", pair[0]); - assertEquals("v_BaseURL", pair[1]); - assertEquals("e_EnterBaseURL", mbt.getCurrentEdgeName()); - assertEquals("v_BaseURL", mbt.getCurrentVertexName()); - - assertEquals(false, mbt.setCurrentVertex("foobar")); - assertEquals(false, mbt.setCurrentVertex((String) null)); - pair = mbt.getNextStep(); - assertEquals("e_SearchBook", pair[0]); - assertEquals("v_SearchResult", pair[1]); - assertEquals("e_SearchBook", mbt.getCurrentEdgeName()); - assertEquals("v_SearchResult", mbt.getCurrentVertexName()); - - assertEquals(false, mbt.setCurrentVertex("")); - assertEquals("e_SearchBook", pair[0]); - assertEquals("v_SearchResult", pair[1]); - assertEquals("e_SearchBook", mbt.getCurrentEdgeName()); - assertEquals("v_SearchResult", mbt.getCurrentVertexName()); - - assertEquals(true, mbt.setCurrentVertex("v_BrowserStopped")); - pair = mbt.getNextStep(); - assertEquals("e_StartBrowser", pair[0]); - assertEquals("v_BrowserStarted", pair[1]); - assertEquals("e_StartBrowser", mbt.getCurrentEdgeName()); - assertEquals("v_BrowserStarted", mbt.getCurrentVertexName()); - - pair = mbt.getNextStep(); - assertEquals("e_EnterBaseURL", pair[0]); - assertEquals("v_BaseURL", pair[1]); - assertEquals("e_EnterBaseURL", mbt.getCurrentEdgeName()); - assertEquals("v_BaseURL", mbt.getCurrentVertexName()); - } + mbt.setGenerator(generator); + + String[] pair = mbt.getNextStep(); + assertEquals("e_init", pair[0]); + assertEquals("v_BrowserStopped", pair[1]); + assertEquals("e_init", mbt.getCurrentEdgeName()); + assertEquals("v_BrowserStopped", mbt.getCurrentVertexName()); + + pair = mbt.getNextStep(); + assertEquals("e_StartBrowser", pair[0]); + assertEquals("v_BrowserStarted", pair[1]); + assertEquals("e_StartBrowser", mbt.getCurrentEdgeName()); + assertEquals("v_BrowserStarted", mbt.getCurrentVertexName()); + + pair = mbt.getNextStep(); + assertEquals("e_EnterBaseURL", pair[0]); + assertEquals("v_BaseURL", pair[1]); + assertEquals("e_EnterBaseURL", mbt.getCurrentEdgeName()); + assertEquals("v_BaseURL", mbt.getCurrentVertexName()); + + assertEquals(false, mbt.setCurrentVertex("foobar")); + assertEquals(false, mbt.setCurrentVertex((String) null)); + pair = mbt.getNextStep(); + assertEquals("e_SearchBook", pair[0]); + assertEquals("v_SearchResult", pair[1]); + assertEquals("e_SearchBook", mbt.getCurrentEdgeName()); + assertEquals("v_SearchResult", mbt.getCurrentVertexName()); + + assertEquals(false, mbt.setCurrentVertex("")); + assertEquals("e_SearchBook", pair[0]); + assertEquals("v_SearchResult", pair[1]); + assertEquals("e_SearchBook", mbt.getCurrentEdgeName()); + assertEquals("v_SearchResult", mbt.getCurrentVertexName()); + + assertEquals(true, mbt.setCurrentVertex("v_BrowserStopped")); + pair = mbt.getNextStep(); + assertEquals("e_StartBrowser", pair[0]); + assertEquals("v_BrowserStarted", pair[1]); + assertEquals("e_StartBrowser", mbt.getCurrentEdgeName()); + assertEquals("v_BrowserStarted", mbt.getCurrentVertexName()); + + pair = mbt.getNextStep(); + assertEquals("e_EnterBaseURL", pair[0]); + assertEquals("v_BaseURL", pair[1]); + assertEquals("e_EnterBaseURL", mbt.getCurrentEdgeName()); + assertEquals("v_BaseURL", mbt.getCurrentVertexName()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/MultipleModelsTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/MultipleModelsTest.java index ec8dff36..488c218a 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/MultipleModelsTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/MultipleModelsTest.java @@ -25,12 +25,10 @@ */ package org.graphwalker.core; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; +import org.graphwalker.core.exceptions.GeneratorException; +import org.graphwalker.core.exceptions.StopConditionException; +import org.jdom.JDOMException; +import org.junit.Test; import java.io.IOException; import java.util.concurrent.ExecutionException; @@ -38,395 +36,389 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import org.graphwalker.core.ModelBasedTesting; -import org.graphwalker.core.MultipleModels; -import org.graphwalker.core.Util; -import org.graphwalker.core.exceptions.GeneratorException; -import org.graphwalker.core.exceptions.StopConditionException; -import org.jdom.JDOMException; -import org.junit.Test; +import static org.junit.Assert.*; public class MultipleModelsTest { - @Test - public void testGetInstance() { - MultipleModels a = MultipleModels.getInstance(); - MultipleModels b = MultipleModels.getInstance(); - - a.reset(); - b.reset(); - - assertNotNull(a); - assertSame(a, b); - } - - @Test - public void testGetUniqueName() { - MultipleModels mmInstance = MultipleModels.getInstance(); - mmInstance.reset(); - - String name = "A"; - mmInstance.getUniqueName("A"); - assertFalse(name.equals(mmInstance.getUniqueName(name))); - } - - @Test - public void testNameFormat() { - MultipleModels mmInstance = MultipleModels.getInstance(); - mmInstance.reset(); - - String desiredName = "My Model"; - assertEquals("My Model", mmInstance.getUniqueName(desiredName)); - assertEquals("My Model 1", mmInstance.getUniqueName(desiredName)); - } - - @Test - public void testMaxNames() { - MultipleModels mmInstance = MultipleModels.getInstance(); - mmInstance.reset(); - - String name = "Max Name"; - for (int i = 0; i < 1000; i++) { - mmInstance.getUniqueName(name); - } - } - - @Test(expected = IndexOutOfBoundsException.class) - public void testMaxNamesBounds() { - MultipleModels mmInstance = MultipleModels.getInstance(); - mmInstance.reset(); - - String name = "Bound Name"; - for (int i = 0; i < 1001; i++) { - mmInstance.getUniqueName(name); - } - } - - @Test - public void testAddAndGetModel() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { - MultipleModels mmInstance = MultipleModels.getInstance(); - mmInstance.reset(); - - ModelBasedTesting model = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); - String modelName = mmInstance.getUniqueName("A"); - - mmInstance.addModel(modelName, model); - assertEquals(model, mmInstance.getModel(modelName)); - } - - @Test(expected = IllegalArgumentException.class) - public void testAddSameModelAgain() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { - MultipleModels mmInstance = MultipleModels.getInstance(); - mmInstance.reset(); - - ModelBasedTesting model1 = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); - ModelBasedTesting model2 = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); - - String modelName = mmInstance.getUniqueName("A"); - - mmInstance.addModel(modelName, model1); - assertEquals(model1, mmInstance.getModel(modelName)); - mmInstance.addModel(modelName, model2); - } - - @Test - public void testAddNonReservedName() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { - MultipleModels mmInstance = MultipleModels.getInstance(); - mmInstance.reset(); - - ModelBasedTesting model = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); - String modelName = "Non reserved"; - mmInstance.addModel(modelName, model); - assertTrue(!modelName.equals(mmInstance.getUniqueName(modelName))); - } - - @Test - public void testExecuteModel() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { - MultipleModels mmInstance = MultipleModels.getInstance(); - mmInstance.reset(); - - ModelBasedTesting model = Util.getNewMbtFromXml(Util.getFile("xml/multipleB.xml")); - String modelName = mmInstance.getUniqueName("B"); - - mmInstance.addModel(modelName, model); - assertTrue(model.hasNextStep()); - - mmInstance.executeModel(modelName, new ModelAPI(modelName)); - assertTrue(mmInstance.isExecuting(modelName)); - Thread.sleep(1000); - assertFalse(model.hasNextStep()); - assertFalse(mmInstance.isExecuting(modelName)); - assertTrue(mmInstance.isFinished(modelName)); - } - - @Test(expected = IllegalStateException.class) - public void testExecuteModelTwice() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { - MultipleModels mmInstance = MultipleModels.getInstance(); - mmInstance.reset(); - - ModelBasedTesting model = Util.getNewMbtFromXml(Util.getFile("xml/multipleB.xml")); - String modelName = mmInstance.getUniqueName("B"); - - mmInstance.addModel(modelName, model); - mmInstance.executeModel(modelName, new ModelAPI(modelName)); - mmInstance.executeModel(modelName, new ModelAPI(modelName)); - } - - @Test(expected = IllegalArgumentException.class) - public void testExecuteNonAddedModel() { - MultipleModels mmInstance = MultipleModels.getInstance(); - mmInstance.reset(); - - String modelName = mmInstance.getUniqueName("Non-existing"); - mmInstance.executeModel(modelName, new ModelAPI(modelName)); - } - - @Test - public void testMultipleModels() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { - MultipleModels mmInstance = MultipleModels.getInstance(); - mmInstance.reset(); - - ModelBasedTesting model1 = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); - ModelBasedTesting model2 = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); - String model1Name = mmInstance.getUniqueName("A"); - String model2Name = mmInstance.getUniqueName("A"); - - mmInstance.addModel(model1Name, model1); - mmInstance.addModel(model2Name, model2); - - assertNotNull(mmInstance.getModel(model1Name)); - assertNotNull(mmInstance.getModel(model2Name)); - } - - @Test - public void testSpawnMultipleModels() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { - MultipleModels mmInstance = MultipleModels.getInstance(); - mmInstance.reset(); - - ModelBasedTesting model = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); - String modelName = mmInstance.getUniqueName("A"); - String spawnedModelName = mmInstance.getUniqueName("B"); - - mmInstance.addModel(modelName, model); - assertNull(mmInstance.getModel(spawnedModelName)); - mmInstance.executeModel(modelName, new ModelAPI(modelName, spawnedModelName, true, false)); - Thread.sleep(1000); - assertNotNull(mmInstance.getModel(spawnedModelName)); - } - - @Test - public void testPausedMultipleModels() throws StopConditionException, GeneratorException, IOException, JDOMException, - InterruptedException, ExecutionException, TimeoutException { - MultipleModels mmInstance = MultipleModels.getInstance(); - mmInstance.reset(); - - ModelBasedTesting model = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); - String modelName = mmInstance.getUniqueName("A"); - String spawnedModelName = mmInstance.getUniqueName("B"); - - mmInstance.addModel(modelName, model); - assertNull(mmInstance.getModel(spawnedModelName)); - mmInstance.executeModel(modelName, new ModelAPI(modelName, spawnedModelName, true, true)); - Thread.sleep(1000); - model.getFuture().get(2, TimeUnit.SECONDS); - assertTrue(model.getFuture().isDone()); - Thread.sleep(1000); - ModelBasedTesting spawnedModel = mmInstance.getModel(spawnedModelName); - assertNotNull(spawnedModel); - spawnedModel.getFuture().get(2, TimeUnit.SECONDS); - assertTrue(spawnedModel.getFuture().isDone()); - } - - @Test - public void testGetStatistics() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { - MultipleModels mmInstance = MultipleModels.getInstance(); - mmInstance.reset(); - - ModelBasedTesting model = Util.getNewMbtFromXml(Util.getFile("xml/multipleB.xml")); - String modelName = mmInstance.getUniqueName("B"); - - mmInstance.addModel(modelName, model); - mmInstance.executeModel(modelName, new ModelAPI(modelName)); - String actualResult = mmInstance.getStatistics(); - assertTrue(mmInstance.isFinished()); - assertFalse(model.hasNextStep()); - assertFalse(mmInstance.isExecuting(modelName)); - assertTrue(actualResult.contains(modelName)); - } - - @Test - public void testGetStatisticsMultipleModels() throws StopConditionException, GeneratorException, IOException, JDOMException, - InterruptedException { - MultipleModels mmInstance = MultipleModels.getInstance(); - mmInstance.reset(); - - ModelBasedTesting model = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); - String modelName = mmInstance.getUniqueName("A"); - String spawnedModelName = mmInstance.getUniqueName("B"); + @Test + public void testGetInstance() { + MultipleModels a = MultipleModels.getInstance(); + MultipleModels b = MultipleModels.getInstance(); + + a.reset(); + b.reset(); + + assertNotNull(a); + assertSame(a, b); + } + + @Test + public void testGetUniqueName() { + MultipleModels mmInstance = MultipleModels.getInstance(); + mmInstance.reset(); + + String name = "A"; + mmInstance.getUniqueName("A"); + assertFalse(name.equals(mmInstance.getUniqueName(name))); + } + + @Test + public void testNameFormat() { + MultipleModels mmInstance = MultipleModels.getInstance(); + mmInstance.reset(); + + String desiredName = "My Model"; + assertEquals("My Model", mmInstance.getUniqueName(desiredName)); + assertEquals("My Model 1", mmInstance.getUniqueName(desiredName)); + } + + @Test + public void testMaxNames() { + MultipleModels mmInstance = MultipleModels.getInstance(); + mmInstance.reset(); + + String name = "Max Name"; + for (int i = 0; i < 1000; i++) { + mmInstance.getUniqueName(name); + } + } + + @Test(expected = IndexOutOfBoundsException.class) + public void testMaxNamesBounds() { + MultipleModels mmInstance = MultipleModels.getInstance(); + mmInstance.reset(); + + String name = "Bound Name"; + for (int i = 0; i < 1001; i++) { + mmInstance.getUniqueName(name); + } + } + + @Test + public void testAddAndGetModel() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + MultipleModels mmInstance = MultipleModels.getInstance(); + mmInstance.reset(); + + ModelBasedTesting model = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); + String modelName = mmInstance.getUniqueName("A"); + + mmInstance.addModel(modelName, model); + assertEquals(model, mmInstance.getModel(modelName)); + } + + @Test(expected = IllegalArgumentException.class) + public void testAddSameModelAgain() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + MultipleModels mmInstance = MultipleModels.getInstance(); + mmInstance.reset(); + + ModelBasedTesting model1 = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); + ModelBasedTesting model2 = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); + + String modelName = mmInstance.getUniqueName("A"); + + mmInstance.addModel(modelName, model1); + assertEquals(model1, mmInstance.getModel(modelName)); + mmInstance.addModel(modelName, model2); + } + + @Test + public void testAddNonReservedName() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + MultipleModels mmInstance = MultipleModels.getInstance(); + mmInstance.reset(); + + ModelBasedTesting model = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); + String modelName = "Non reserved"; + mmInstance.addModel(modelName, model); + assertTrue(!modelName.equals(mmInstance.getUniqueName(modelName))); + } + + @Test + public void testExecuteModel() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + MultipleModels mmInstance = MultipleModels.getInstance(); + mmInstance.reset(); + + ModelBasedTesting model = Util.getNewMbtFromXml(Util.getFile("xml/multipleB.xml")); + String modelName = mmInstance.getUniqueName("B"); + + mmInstance.addModel(modelName, model); + assertTrue(model.hasNextStep()); + + mmInstance.executeModel(modelName, new ModelAPI(modelName)); + assertTrue(mmInstance.isExecuting(modelName)); + Thread.sleep(1000); + assertFalse(model.hasNextStep()); + assertFalse(mmInstance.isExecuting(modelName)); + assertTrue(mmInstance.isFinished(modelName)); + } + + @Test(expected = IllegalStateException.class) + public void testExecuteModelTwice() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + MultipleModels mmInstance = MultipleModels.getInstance(); + mmInstance.reset(); + + ModelBasedTesting model = Util.getNewMbtFromXml(Util.getFile("xml/multipleB.xml")); + String modelName = mmInstance.getUniqueName("B"); + + mmInstance.addModel(modelName, model); + mmInstance.executeModel(modelName, new ModelAPI(modelName)); + mmInstance.executeModel(modelName, new ModelAPI(modelName)); + } + + @Test(expected = IllegalArgumentException.class) + public void testExecuteNonAddedModel() { + MultipleModels mmInstance = MultipleModels.getInstance(); + mmInstance.reset(); + + String modelName = mmInstance.getUniqueName("Non-existing"); + mmInstance.executeModel(modelName, new ModelAPI(modelName)); + } + + @Test + public void testMultipleModels() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + MultipleModels mmInstance = MultipleModels.getInstance(); + mmInstance.reset(); + + ModelBasedTesting model1 = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); + ModelBasedTesting model2 = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); + String model1Name = mmInstance.getUniqueName("A"); + String model2Name = mmInstance.getUniqueName("A"); + + mmInstance.addModel(model1Name, model1); + mmInstance.addModel(model2Name, model2); + + assertNotNull(mmInstance.getModel(model1Name)); + assertNotNull(mmInstance.getModel(model2Name)); + } + + @Test + public void testSpawnMultipleModels() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + MultipleModels mmInstance = MultipleModels.getInstance(); + mmInstance.reset(); + + ModelBasedTesting model = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); + String modelName = mmInstance.getUniqueName("A"); + String spawnedModelName = mmInstance.getUniqueName("B"); + + mmInstance.addModel(modelName, model); + assertNull(mmInstance.getModel(spawnedModelName)); + mmInstance.executeModel(modelName, new ModelAPI(modelName, spawnedModelName, true, false)); + Thread.sleep(1000); + assertNotNull(mmInstance.getModel(spawnedModelName)); + } + + @Test + public void testPausedMultipleModels() throws StopConditionException, GeneratorException, IOException, JDOMException, + InterruptedException, ExecutionException, TimeoutException { + MultipleModels mmInstance = MultipleModels.getInstance(); + mmInstance.reset(); + + ModelBasedTesting model = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); + String modelName = mmInstance.getUniqueName("A"); + String spawnedModelName = mmInstance.getUniqueName("B"); + + mmInstance.addModel(modelName, model); + assertNull(mmInstance.getModel(spawnedModelName)); + mmInstance.executeModel(modelName, new ModelAPI(modelName, spawnedModelName, true, true)); + Thread.sleep(1000); + model.getFuture().get(2, TimeUnit.SECONDS); + assertTrue(model.getFuture().isDone()); + Thread.sleep(1000); + ModelBasedTesting spawnedModel = mmInstance.getModel(spawnedModelName); + assertNotNull(spawnedModel); + spawnedModel.getFuture().get(2, TimeUnit.SECONDS); + assertTrue(spawnedModel.getFuture().isDone()); + } + + @Test + public void testGetStatistics() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + MultipleModels mmInstance = MultipleModels.getInstance(); + mmInstance.reset(); + + ModelBasedTesting model = Util.getNewMbtFromXml(Util.getFile("xml/multipleB.xml")); + String modelName = mmInstance.getUniqueName("B"); + + mmInstance.addModel(modelName, model); + mmInstance.executeModel(modelName, new ModelAPI(modelName)); + String actualResult = mmInstance.getStatistics(); + assertTrue(mmInstance.isFinished()); + assertFalse(model.hasNextStep()); + assertFalse(mmInstance.isExecuting(modelName)); + assertTrue(actualResult.contains(modelName)); + } + + @Test + public void testGetStatisticsMultipleModels() throws StopConditionException, GeneratorException, IOException, JDOMException, + InterruptedException { + MultipleModels mmInstance = MultipleModels.getInstance(); + mmInstance.reset(); + + ModelBasedTesting model = Util.getNewMbtFromXml(Util.getFile("xml/multipleA.xml")); + String modelName = mmInstance.getUniqueName("A"); + String spawnedModelName = mmInstance.getUniqueName("B"); - mmInstance.addModel(modelName, model); - mmInstance.executeModel(modelName, new ModelAPI(modelName, spawnedModelName, true, false)); + mmInstance.addModel(modelName, model); + mmInstance.executeModel(modelName, new ModelAPI(modelName, spawnedModelName, true, false)); - String actualResult = mmInstance.getStatistics(); - System.out.println(actualResult); + String actualResult = mmInstance.getStatistics(); + System.out.println(actualResult); - assertTrue(actualResult.contains(modelName)); - assertTrue(actualResult.contains(spawnedModelName)); - } + assertTrue(actualResult.contains(modelName)); + assertTrue(actualResult.contains(spawnedModelName)); + } - public class ModelAPI { - private String modelName; - private String spawnedModelName; - private boolean spawn; - private boolean pause; - - public ModelAPI(String modelName) { - this(modelName, "", false, false); - } - - public ModelAPI(String modelName, String spawnedModelName, boolean spawn, boolean pause) { - this.modelName = modelName; - this.spawnedModelName = spawnedModelName; - this.spawn = spawn; - this.pause = pause; - } - - public void a() { - // System.out.println("Execute edge: a"); - } - - public void b() { - if (pause) { - ModelBasedTesting model = MultipleModels.getInstance().getModel(modelName); - model.setFuture(new FutureTaskImpl("b is finished for model " + modelName, 1, TimeUnit.SECONDS)); - } - - } - - public void c() { - // System.out.println("Execute edge: c"); - - } - - public void d() { - // System.out.println("Execute edge: d"); - - } - - public void e() { - // System.out.println("Execute edge: e"); - - } - - public void f() { - // System.out.println("Execute edge: f"); - - } - - // Vertices - public void A() { - // System.out.println("Execute vertex: A for model " + modelName); - - } - - public void B() { - // System.out.println("Execute vertex: B"); - - } - - public void C() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { - if (spawn) { - MultipleModels mmInstance = MultipleModels.getInstance(); - ModelBasedTesting modelB = Util.getNewMbtFromXml(Util.getFile("xml/multipleB.xml")); - - mmInstance.addModel(spawnedModelName, modelB); - - if (pause) { - mmInstance.executeModel(spawnedModelName, new ModelAPI(spawnedModelName, "", false, true)); - } else { - mmInstance.executeModel(spawnedModelName, new ModelAPI(spawnedModelName)); - - } - } - - } - - public void D() { - // System.out.println("Execute vertex: D"); - - } - - public void E() { - // System.out.println("Execute vertex: E"); - - } - - public void F() { - - } - } - - public class FutureTaskImpl implements Future { - private String result; - private long createdTime; - private long computationTime; - private boolean isDone; - private boolean isCancelled; - - public FutureTaskImpl(String desiredResult, long computationTime, TimeUnit unit) { - result = desiredResult; - createdTime = System.currentTimeMillis(); - this.computationTime = TimeUnit.MILLISECONDS.convert(computationTime, unit); - isDone = false; - isCancelled = false; - } - - @Override - public boolean cancel(boolean mayInterruptIfRunning) { - if (isDone) { - return false; - } else { - isCancelled = true; - isDone = true; - return true; - } - } - - @Override - public String get() throws InterruptedException, ExecutionException { - while (!isDone()) { - Thread.sleep(10); - } - return result; - } + public class ModelAPI { + private String modelName; + private String spawnedModelName; + private boolean spawn; + private boolean pause; + + public ModelAPI(String modelName) { + this(modelName, "", false, false); + } + + public ModelAPI(String modelName, String spawnedModelName, boolean spawn, boolean pause) { + this.modelName = modelName; + this.spawnedModelName = spawnedModelName; + this.spawn = spawn; + this.pause = pause; + } + + public void a() { + // System.out.println("Execute edge: a"); + } + + public void b() { + if (pause) { + ModelBasedTesting model = MultipleModels.getInstance().getModel(modelName); + model.setFuture(new FutureTaskImpl("b is finished for model " + modelName, 1, TimeUnit.SECONDS)); + } + + } + + public void c() { + // System.out.println("Execute edge: c"); + + } + + public void d() { + // System.out.println("Execute edge: d"); + + } + + public void e() { + // System.out.println("Execute edge: e"); + + } + + public void f() { + // System.out.println("Execute edge: f"); + + } + + // Vertices + public void A() { + // System.out.println("Execute vertex: A for model " + modelName); + + } + + public void B() { + // System.out.println("Execute vertex: B"); + + } + + public void C() throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + if (spawn) { + MultipleModels mmInstance = MultipleModels.getInstance(); + ModelBasedTesting modelB = Util.getNewMbtFromXml(Util.getFile("xml/multipleB.xml")); + + mmInstance.addModel(spawnedModelName, modelB); + + if (pause) { + mmInstance.executeModel(spawnedModelName, new ModelAPI(spawnedModelName, "", false, true)); + } else { + mmInstance.executeModel(spawnedModelName, new ModelAPI(spawnedModelName)); + + } + } + + } + + public void D() { + // System.out.println("Execute vertex: D"); + + } + + public void E() { + // System.out.println("Execute vertex: E"); + + } + + public void F() { + + } + } + + public class FutureTaskImpl implements Future { + private String result; + private long createdTime; + private long computationTime; + private boolean isDone; + private boolean isCancelled; + + public FutureTaskImpl(String desiredResult, long computationTime, TimeUnit unit) { + result = desiredResult; + createdTime = System.currentTimeMillis(); + this.computationTime = TimeUnit.MILLISECONDS.convert(computationTime, unit); + isDone = false; + isCancelled = false; + } + + @Override + public boolean cancel(boolean mayInterruptIfRunning) { + if (isDone) { + return false; + } else { + isCancelled = true; + isDone = true; + return true; + } + } + + @Override + public String get() throws InterruptedException, ExecutionException { + while (!isDone()) { + Thread.sleep(10); + } + return result; + } - @Override - public String get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { - long startedTime = System.currentTimeMillis(); - while (!isDone()) { - if (System.currentTimeMillis() >= startedTime + TimeUnit.MILLISECONDS.convert(timeout, unit)) { - throw new TimeoutException("Future task timed out."); - } - Thread.sleep(10); - } - return result; - } - - @Override - public boolean isCancelled() { - return isCancelled; - } - - @Override - public boolean isDone() { - if (!isDone) { - if (System.currentTimeMillis() >= createdTime + computationTime) { - isDone = true; - } - } - return isDone; - } - - } + @Override + public String get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { + long startedTime = System.currentTimeMillis(); + while (!isDone()) { + if (System.currentTimeMillis() >= startedTime + TimeUnit.MILLISECONDS.convert(timeout, unit)) { + throw new TimeoutException("Future task timed out."); + } + Thread.sleep(10); + } + return result; + } + + @Override + public boolean isCancelled() { + return isCancelled; + } + + @Override + public boolean isDone() { + if (!isDone) { + if (System.currentTimeMillis() >= createdTime + computationTime) { + isDone = true; + } + } + return isDone; + } + + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/RequirementVariableTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/RequirementVariableTest.java index c9d95018..f67077e3 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/RequirementVariableTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/RequirementVariableTest.java @@ -26,8 +26,7 @@ package org.graphwalker.core; -import org.graphwalker.core.ModelBasedTesting; -import org.graphwalker.core.Util; +import junit.framework.TestCase; import org.graphwalker.core.conditions.TestCaseLength; import org.graphwalker.core.generators.RandomPathGenerator; import org.graphwalker.core.graph.Edge; @@ -35,205 +34,203 @@ import org.graphwalker.core.graph.Vertex; import org.graphwalker.core.machines.FiniteStateMachine; -import junit.framework.TestCase; - public class RequirementVariableTest extends TestCase { - Graph graph; - Vertex start; - Vertex v1; - Vertex v2; - Edge e1; - Edge e2; - Edge e3; - Edge e4; - - @Override - protected void setUp() throws Exception { - super.setUp(); - graph = new Graph(); - - start = Util.addVertexToGraph(graph, "Start"); - - v1 = Util.addVertexToGraph(graph, "V1"); - - v2 = Util.addVertexToGraph(graph, "V2"); - v2.setReqTagKey("REQ004,${reqvar}"); - - e1 = Util.addEdgeToGraph(graph, start, v1, "E1", null, null, ""); - e1.setActionsKey("reqvar=\"REQ002,REQ003\""); - - e2 = Util.addEdgeToGraph(graph, v1, v2, "E2", null, null, ""); - e2.setActionsKey("reqvar=reqvar + \",REQ005\" + \",REQ007\""); - - e3 = Util.addEdgeToGraph(graph, v2, v1, "E3", null, null, ""); - - e4 = Util.addEdgeToGraph(graph, v1, v2, "E2", null, null, ""); - e4.setActionsKey("reqvar=\"REQ006\""); - } - - public void testRequirements() { - // ExtendedFiniteStateMachine EFSM = new ExtendedFiniteStateMachine(false); - - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.enableExtended(true); - FiniteStateMachine EFSM = mbt.getMachine(); - mbt.setGenerator(new RandomPathGenerator(new TestCaseLength(10))); - - EFSM.setModel(graph); - mbt.populateMachineRequirementHashTable(); - EFSM.walkEdge(e1); - EFSM.walkEdge(e2); - mbt.passRequirement(true); - String[] tmp = EFSM.getStatisticsVerbose().split("\n"); - int numberOfExpectedAssersions = 0; - for (int i = 0; i < tmp.length; i++) { - if (tmp[i].contains("REQ002")) { - assertEquals("Requirement: REQ002 has passed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ003")) { - assertEquals("Requirement: REQ003 has passed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ004")) { - assertEquals("Requirement: REQ004 has passed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ005")) { - assertEquals("Requirement: REQ005 has passed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ006")) { - assertEquals("Requirement: REQ006 is not tested.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ007")) { - assertEquals("Requirement: REQ007 has passed.", tmp[i]); - numberOfExpectedAssersions++; - } - } - assertEquals(6, numberOfExpectedAssersions); - numberOfExpectedAssersions = 0; - - EFSM.walkEdge(e3); - EFSM.walkEdge(e4); - mbt.passRequirement(false); - tmp = EFSM.getStatisticsVerbose().split("\n"); - for (int i = 0; i < tmp.length; i++) { - if (tmp[i].contains("REQ002")) { - assertEquals("Requirement: REQ002 has passed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ003")) { - assertEquals("Requirement: REQ003 has passed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ004")) { - assertEquals("Requirement: REQ004 has failed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ005")) { - assertEquals("Requirement: REQ005 has passed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ006")) { - assertEquals("Requirement: REQ006 has failed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ007")) { - assertEquals("Requirement: REQ007 has passed.", tmp[i]); - numberOfExpectedAssersions++; - } - } - assertEquals(6, numberOfExpectedAssersions); - numberOfExpectedAssersions = 0; - - EFSM.walkEdge(e3); - EFSM.walkEdge(e2); - mbt.passRequirement(false); - tmp = EFSM.getStatisticsVerbose().split("\n"); - for (int i = 0; i < tmp.length; i++) { - if (tmp[i].contains("REQ002")) { - assertEquals("Requirement: REQ002 has passed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ003")) { - assertEquals("Requirement: REQ003 has passed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ004")) { - assertEquals("Requirement: REQ004 has failed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ005")) { - assertEquals("Requirement: REQ005 has failed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ006")) { - assertEquals("Requirement: REQ006 has failed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ007")) { - assertEquals("Requirement: REQ007 has failed.", tmp[i]); - numberOfExpectedAssersions++; - } - } - assertEquals(6, numberOfExpectedAssersions); - numberOfExpectedAssersions = 0; - - EFSM.walkEdge(e3); - EFSM.walkEdge(e2); - mbt.passRequirement(true); - for (int i = 0; i < tmp.length; i++) { - if (tmp[i].contains("REQ002")) { - assertEquals("Requirement: REQ002 has passed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ003")) { - assertEquals("Requirement: REQ003 has passed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ004")) { - assertEquals("Requirement: REQ004 has failed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ005")) { - assertEquals("Requirement: REQ005 has failed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ006")) { - assertEquals("Requirement: REQ006 has failed.", tmp[i]); - numberOfExpectedAssersions++; - } - if (tmp[i].contains("REQ007")) { - assertEquals("Requirement: REQ007 has failed.", tmp[i]); - numberOfExpectedAssersions++; - } - } - assertEquals(6, numberOfExpectedAssersions); - - } catch (Exception e) { - System.out.println(e.getMessage()); - } - } - - public void testRequirementsWalk() { - // ExtendedFiniteStateMachine EFSM = new ExtendedFiniteStateMachine(false); - // EFSM.setModel(graph); - // assertEquals("Start", EFSM.getCurrentVertexName()); - // EFSM.walkEdge(e1); - // assertEquals("V1/x=1;y=[];", EFSM.getCurrentVertexName()); - // assertEquals("{REQ001=1, REQ004=0, REQ003=0, REQ002=2}", - // EFSM.getAllRequirements().toString()); - // assertEquals("[REQ001, REQ002]", - // EFSM.getCoveredRequirements().toString()); - // EFSM.walkEdge(e2); - // assertEquals("V2/x=2;y=[];", EFSM.getCurrentVertexName()); - // assertEquals("{REQ001=1, REQ004=1, REQ003=1, REQ002=2}", - // EFSM.getAllRequirements().toString()); - // assertEquals("[REQ001, REQ004, REQ003, REQ002]", - // EFSM.getCoveredRequirements().toString()); - } + Graph graph; + Vertex start; + Vertex v1; + Vertex v2; + Edge e1; + Edge e2; + Edge e3; + Edge e4; + + @Override + protected void setUp() throws Exception { + super.setUp(); + graph = new Graph(); + + start = Util.addVertexToGraph(graph, "Start"); + + v1 = Util.addVertexToGraph(graph, "V1"); + + v2 = Util.addVertexToGraph(graph, "V2"); + v2.setReqTagKey("REQ004,${reqvar}"); + + e1 = Util.addEdgeToGraph(graph, start, v1, "E1", null, null, ""); + e1.setActionsKey("reqvar=\"REQ002,REQ003\""); + + e2 = Util.addEdgeToGraph(graph, v1, v2, "E2", null, null, ""); + e2.setActionsKey("reqvar=reqvar + \",REQ005\" + \",REQ007\""); + + e3 = Util.addEdgeToGraph(graph, v2, v1, "E3", null, null, ""); + + e4 = Util.addEdgeToGraph(graph, v1, v2, "E2", null, null, ""); + e4.setActionsKey("reqvar=\"REQ006\""); + } + + public void testRequirements() { + // ExtendedFiniteStateMachine EFSM = new ExtendedFiniteStateMachine(false); + + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.enableExtended(true); + FiniteStateMachine EFSM = mbt.getMachine(); + mbt.setGenerator(new RandomPathGenerator(new TestCaseLength(10))); + + EFSM.setModel(graph); + mbt.populateMachineRequirementHashTable(); + EFSM.walkEdge(e1); + EFSM.walkEdge(e2); + mbt.passRequirement(true); + String[] tmp = EFSM.getStatisticsVerbose().split("\n"); + int numberOfExpectedAssersions = 0; + for (int i = 0; i < tmp.length; i++) { + if (tmp[i].contains("REQ002")) { + assertEquals("Requirement: REQ002 has passed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ003")) { + assertEquals("Requirement: REQ003 has passed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ004")) { + assertEquals("Requirement: REQ004 has passed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ005")) { + assertEquals("Requirement: REQ005 has passed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ006")) { + assertEquals("Requirement: REQ006 is not tested.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ007")) { + assertEquals("Requirement: REQ007 has passed.", tmp[i]); + numberOfExpectedAssersions++; + } + } + assertEquals(6, numberOfExpectedAssersions); + numberOfExpectedAssersions = 0; + + EFSM.walkEdge(e3); + EFSM.walkEdge(e4); + mbt.passRequirement(false); + tmp = EFSM.getStatisticsVerbose().split("\n"); + for (int i = 0; i < tmp.length; i++) { + if (tmp[i].contains("REQ002")) { + assertEquals("Requirement: REQ002 has passed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ003")) { + assertEquals("Requirement: REQ003 has passed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ004")) { + assertEquals("Requirement: REQ004 has failed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ005")) { + assertEquals("Requirement: REQ005 has passed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ006")) { + assertEquals("Requirement: REQ006 has failed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ007")) { + assertEquals("Requirement: REQ007 has passed.", tmp[i]); + numberOfExpectedAssersions++; + } + } + assertEquals(6, numberOfExpectedAssersions); + numberOfExpectedAssersions = 0; + + EFSM.walkEdge(e3); + EFSM.walkEdge(e2); + mbt.passRequirement(false); + tmp = EFSM.getStatisticsVerbose().split("\n"); + for (int i = 0; i < tmp.length; i++) { + if (tmp[i].contains("REQ002")) { + assertEquals("Requirement: REQ002 has passed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ003")) { + assertEquals("Requirement: REQ003 has passed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ004")) { + assertEquals("Requirement: REQ004 has failed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ005")) { + assertEquals("Requirement: REQ005 has failed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ006")) { + assertEquals("Requirement: REQ006 has failed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ007")) { + assertEquals("Requirement: REQ007 has failed.", tmp[i]); + numberOfExpectedAssersions++; + } + } + assertEquals(6, numberOfExpectedAssersions); + numberOfExpectedAssersions = 0; + + EFSM.walkEdge(e3); + EFSM.walkEdge(e2); + mbt.passRequirement(true); + for (int i = 0; i < tmp.length; i++) { + if (tmp[i].contains("REQ002")) { + assertEquals("Requirement: REQ002 has passed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ003")) { + assertEquals("Requirement: REQ003 has passed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ004")) { + assertEquals("Requirement: REQ004 has failed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ005")) { + assertEquals("Requirement: REQ005 has failed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ006")) { + assertEquals("Requirement: REQ006 has failed.", tmp[i]); + numberOfExpectedAssersions++; + } + if (tmp[i].contains("REQ007")) { + assertEquals("Requirement: REQ007 has failed.", tmp[i]); + numberOfExpectedAssersions++; + } + } + assertEquals(6, numberOfExpectedAssersions); + + } catch (Exception e) { + System.out.println(e.getMessage()); + } + } + + public void testRequirementsWalk() { + // ExtendedFiniteStateMachine EFSM = new ExtendedFiniteStateMachine(false); + // EFSM.setModel(graph); + // assertEquals("Start", EFSM.getCurrentVertexName()); + // EFSM.walkEdge(e1); + // assertEquals("V1/x=1;y=[];", EFSM.getCurrentVertexName()); + // assertEquals("{REQ001=1, REQ004=0, REQ003=0, REQ002=2}", + // EFSM.getAllRequirements().toString()); + // assertEquals("[REQ001, REQ002]", + // EFSM.getCoveredRequirements().toString()); + // EFSM.walkEdge(e2); + // assertEquals("V2/x=2;y=[];", EFSM.getCurrentVertexName()); + // assertEquals("{REQ001=1, REQ004=1, REQ003=1, REQ002=2}", + // EFSM.getAllRequirements().toString()); + // assertEquals("[REQ001, REQ004, REQ003, REQ002]", + // EFSM.getCoveredRequirements().toString()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/StatisticsManagerTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/StatisticsManagerTest.java index b28ecc4d..69f3ef35 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/StatisticsManagerTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/StatisticsManagerTest.java @@ -26,11 +26,7 @@ package org.graphwalker.core; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; - -import org.graphwalker.core.StatisticsManager; -import org.graphwalker.core.Util; +import junit.framework.TestCase; import org.graphwalker.core.graph.Edge; import org.graphwalker.core.graph.Graph; import org.graphwalker.core.graph.Vertex; @@ -39,173 +35,173 @@ import org.graphwalker.core.statistics.RequirementCoverageStatistics; import org.graphwalker.core.statistics.VertexCoverageStatistics; -import junit.framework.TestCase; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; /** * @author Johan Tejle - * */ public class StatisticsManagerTest extends TestCase { - Graph graph; - Vertex start; - Vertex v1; - Vertex v2; - Edge e1; - Edge e2; - Edge e3; - Edge e4; - - @Override - protected void setUp() throws Exception { - super.setUp(); - graph = new Graph(); - - start = Util.addVertexToGraph(graph, "Start"); - - v1 = Util.addVertexToGraph(graph, "V1"); - v1.setReqTagKey("REQ002"); - - v2 = Util.addVertexToGraph(graph, "V2"); - v2.setReqTagKey("REQ004"); - - e1 = Util.addEdgeToGraph(graph, start, v1, "E1", null, null, "x=1;y=new Vector()"); - e1.setReqTagKey("REQ001,REQ002"); - - e2 = Util.addEdgeToGraph(graph, v1, v2, "E2", null, null, "x=2"); - e2.setReqTagKey("REQ003"); - - e3 = Util.addEdgeToGraph(graph, v2, v2, "E3", null, "x<6", "x++"); - - e4 = Util.addEdgeToGraph(graph, v2, v1, "E4", null, "y.size()<3", "y.add(x)"); - } - - public void testConstructor() { - new StatisticsManager(); - } - - public void testAdd() { - StatisticsManager statisticsManager = new StatisticsManager(); - statisticsManager.addStatisicsCounter("State Coverage", new VertexCoverageStatistics(graph)); - statisticsManager.addStatisicsCounter("Edge Coverage", new EdgeCoverageStatistics(graph)); - statisticsManager.addStatisicsCounter("2-Edge Sequence Coverage", new EdgeSequenceCoverageStatistics(graph, 2)); - statisticsManager.addStatisicsCounter("3-Edge Sequence Coverage", new EdgeSequenceCoverageStatistics(graph, 3)); - statisticsManager.addStatisicsCounter("Requirements Coverage", new RequirementCoverageStatistics(graph)); - assertEquals("[Requirements Coverage, Edge Coverage, State Coverage, 3-Edge Sequence Coverage, 2-Edge Sequence Coverage]", - statisticsManager.getCounterNames().toString()); - } - - public void testProgress() { - StatisticsManager statisticsManager = new StatisticsManager(); - statisticsManager.addStatisicsCounter("State Coverage", new VertexCoverageStatistics(graph)); - statisticsManager.addStatisicsCounter("Edge Coverage", new EdgeCoverageStatistics(graph)); - statisticsManager.addStatisicsCounter("2-Edge Sequence Coverage", new EdgeSequenceCoverageStatistics(graph, 2)); - statisticsManager.addStatisicsCounter("3-Edge Sequence Coverage", new EdgeSequenceCoverageStatistics(graph, 3)); - statisticsManager.addStatisicsCounter("Requirements Coverage", new RequirementCoverageStatistics(graph)); - statisticsManager.addProgress(start); - assertEquals( - true, - statisticsManager - .getCurrentStatisticXml() - .matches( - "<\\?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\\?>\\s+\\s+")); - statisticsManager.addProgress(e1); - assertEquals( - true, - statisticsManager - .getCurrentStatisticXml() - .matches( - "<\\?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\\?>\\s+\\s+")); - statisticsManager.addProgress(v1); - assertEquals( - true, - statisticsManager - .getCurrentStatisticXml() - .matches( - "<\\?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\\?>\\s+\\s+")); - statisticsManager.addProgress(e2); - assertEquals( - true, - statisticsManager - .getCurrentStatisticXml() - .matches( - "<\\?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\\?>\\s+\\s+")); - statisticsManager.addProgress(v2); - assertEquals( - true, - statisticsManager - .getCurrentStatisticXml() - .matches( - "<\\?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\\?>\\s+\\s+")); - statisticsManager.addProgress(e3); - assertEquals( - true, - statisticsManager - .getCurrentStatisticXml() - .matches( - "<\\?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\\?>\\s+\\s+")); - statisticsManager.addProgress(e4); - assertEquals( - true, - statisticsManager - .getCurrentStatisticXml() - .matches( - "<\\?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\\?>\\s+\\s+")); - } - - public void testFullProgress() { - StatisticsManager statisticsManager = new StatisticsManager(); - statisticsManager.addStatisicsCounter("State Coverage", new VertexCoverageStatistics(graph)); - statisticsManager.addStatisicsCounter("Edge Coverage", new EdgeCoverageStatistics(graph)); - statisticsManager.addStatisicsCounter("2-Edge Sequence Coverage", new EdgeSequenceCoverageStatistics(graph, 2)); - statisticsManager.addStatisicsCounter("3-Edge Sequence Coverage", new EdgeSequenceCoverageStatistics(graph, 3)); - statisticsManager.addStatisicsCounter("Requirements Coverage", new RequirementCoverageStatistics(graph)); - statisticsManager.addProgress(start); - statisticsManager.addProgress(e1); - statisticsManager.addProgress(v1); - statisticsManager.addProgress(e2); - statisticsManager.addProgress(v2); - statisticsManager.addProgress(e3); - statisticsManager.addProgress(e4); - assertEquals( - true, - statisticsManager - .getFullProgressXml() - .matches( - "<\\?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\\?>\\s+\\s+")); - } - - public void testFullProgressReport() { - StatisticsManager statisticsManager = new StatisticsManager(); - statisticsManager.addStatisicsCounter("State Coverage", new VertexCoverageStatistics(graph)); - statisticsManager.addStatisicsCounter("Edge Coverage", new EdgeCoverageStatistics(graph)); - statisticsManager.addStatisicsCounter("2-Edge Sequence Coverage", new EdgeSequenceCoverageStatistics(graph, 2)); - statisticsManager.addStatisicsCounter("3-Edge Sequence Coverage", new EdgeSequenceCoverageStatistics(graph, 3)); - statisticsManager.addStatisicsCounter("Requirements Coverage", new RequirementCoverageStatistics(graph)); - statisticsManager.addProgress(start); - statisticsManager.addProgress(e1); - statisticsManager.addProgress(v1); - statisticsManager.addProgress(e2); - statisticsManager.addProgress(v2); - statisticsManager.addProgress(e3); - statisticsManager.addProgress(e4); - statisticsManager.setReportTemplate(getClass().getClassLoader().getResourceAsStream("templates/short.report")); - ByteArrayOutputStream out = new ByteArrayOutputStream(); - statisticsManager.writeFullReport(new PrintStream(out)); - assertEquals( - "" - + Util.newline - + "" - + Util.newline - + "" + Util.newline + "" - + Util.newline + "" + Util.newline + "" + Util.newline - + "" + Util.newline + "" + Util.newline - + "" + Util.newline + "" + Util.newline - + "" + Util.newline + "" + Util.newline - + "" + Util.newline + "
\"Coverage\" Edge Coverage
State Coverage
2-Edge Sequence Coverage
3-Edge Sequence Coverage
" + Util.newline, out.toString()); - } + Graph graph; + Vertex start; + Vertex v1; + Vertex v2; + Edge e1; + Edge e2; + Edge e3; + Edge e4; + + @Override + protected void setUp() throws Exception { + super.setUp(); + graph = new Graph(); + + start = Util.addVertexToGraph(graph, "Start"); + + v1 = Util.addVertexToGraph(graph, "V1"); + v1.setReqTagKey("REQ002"); + + v2 = Util.addVertexToGraph(graph, "V2"); + v2.setReqTagKey("REQ004"); + + e1 = Util.addEdgeToGraph(graph, start, v1, "E1", null, null, "x=1;y=new Vector()"); + e1.setReqTagKey("REQ001,REQ002"); + + e2 = Util.addEdgeToGraph(graph, v1, v2, "E2", null, null, "x=2"); + e2.setReqTagKey("REQ003"); + + e3 = Util.addEdgeToGraph(graph, v2, v2, "E3", null, "x<6", "x++"); + + e4 = Util.addEdgeToGraph(graph, v2, v1, "E4", null, "y.size()<3", "y.add(x)"); + } + + public void testConstructor() { + new StatisticsManager(); + } + + public void testAdd() { + StatisticsManager statisticsManager = new StatisticsManager(); + statisticsManager.addStatisicsCounter("State Coverage", new VertexCoverageStatistics(graph)); + statisticsManager.addStatisicsCounter("Edge Coverage", new EdgeCoverageStatistics(graph)); + statisticsManager.addStatisicsCounter("2-Edge Sequence Coverage", new EdgeSequenceCoverageStatistics(graph, 2)); + statisticsManager.addStatisicsCounter("3-Edge Sequence Coverage", new EdgeSequenceCoverageStatistics(graph, 3)); + statisticsManager.addStatisicsCounter("Requirements Coverage", new RequirementCoverageStatistics(graph)); + assertEquals("[Requirements Coverage, Edge Coverage, State Coverage, 3-Edge Sequence Coverage, 2-Edge Sequence Coverage]", + statisticsManager.getCounterNames().toString()); + } + + public void testProgress() { + StatisticsManager statisticsManager = new StatisticsManager(); + statisticsManager.addStatisicsCounter("State Coverage", new VertexCoverageStatistics(graph)); + statisticsManager.addStatisicsCounter("Edge Coverage", new EdgeCoverageStatistics(graph)); + statisticsManager.addStatisicsCounter("2-Edge Sequence Coverage", new EdgeSequenceCoverageStatistics(graph, 2)); + statisticsManager.addStatisicsCounter("3-Edge Sequence Coverage", new EdgeSequenceCoverageStatistics(graph, 3)); + statisticsManager.addStatisicsCounter("Requirements Coverage", new RequirementCoverageStatistics(graph)); + statisticsManager.addProgress(start); + assertEquals( + true, + statisticsManager + .getCurrentStatisticXml() + .matches( + "<\\?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\\?>\\s+\\s+")); + statisticsManager.addProgress(e1); + assertEquals( + true, + statisticsManager + .getCurrentStatisticXml() + .matches( + "<\\?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\\?>\\s+\\s+")); + statisticsManager.addProgress(v1); + assertEquals( + true, + statisticsManager + .getCurrentStatisticXml() + .matches( + "<\\?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\\?>\\s+\\s+")); + statisticsManager.addProgress(e2); + assertEquals( + true, + statisticsManager + .getCurrentStatisticXml() + .matches( + "<\\?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\\?>\\s+\\s+")); + statisticsManager.addProgress(v2); + assertEquals( + true, + statisticsManager + .getCurrentStatisticXml() + .matches( + "<\\?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\\?>\\s+\\s+")); + statisticsManager.addProgress(e3); + assertEquals( + true, + statisticsManager + .getCurrentStatisticXml() + .matches( + "<\\?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\\?>\\s+\\s+")); + statisticsManager.addProgress(e4); + assertEquals( + true, + statisticsManager + .getCurrentStatisticXml() + .matches( + "<\\?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\\?>\\s+\\s+")); + } + + public void testFullProgress() { + StatisticsManager statisticsManager = new StatisticsManager(); + statisticsManager.addStatisicsCounter("State Coverage", new VertexCoverageStatistics(graph)); + statisticsManager.addStatisicsCounter("Edge Coverage", new EdgeCoverageStatistics(graph)); + statisticsManager.addStatisicsCounter("2-Edge Sequence Coverage", new EdgeSequenceCoverageStatistics(graph, 2)); + statisticsManager.addStatisicsCounter("3-Edge Sequence Coverage", new EdgeSequenceCoverageStatistics(graph, 3)); + statisticsManager.addStatisicsCounter("Requirements Coverage", new RequirementCoverageStatistics(graph)); + statisticsManager.addProgress(start); + statisticsManager.addProgress(e1); + statisticsManager.addProgress(v1); + statisticsManager.addProgress(e2); + statisticsManager.addProgress(v2); + statisticsManager.addProgress(e3); + statisticsManager.addProgress(e4); + assertEquals( + true, + statisticsManager + .getFullProgressXml() + .matches( + "<\\?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\\?>\\s+\\s+")); + } + + public void testFullProgressReport() { + StatisticsManager statisticsManager = new StatisticsManager(); + statisticsManager.addStatisicsCounter("State Coverage", new VertexCoverageStatistics(graph)); + statisticsManager.addStatisicsCounter("Edge Coverage", new EdgeCoverageStatistics(graph)); + statisticsManager.addStatisicsCounter("2-Edge Sequence Coverage", new EdgeSequenceCoverageStatistics(graph, 2)); + statisticsManager.addStatisicsCounter("3-Edge Sequence Coverage", new EdgeSequenceCoverageStatistics(graph, 3)); + statisticsManager.addStatisicsCounter("Requirements Coverage", new RequirementCoverageStatistics(graph)); + statisticsManager.addProgress(start); + statisticsManager.addProgress(e1); + statisticsManager.addProgress(v1); + statisticsManager.addProgress(e2); + statisticsManager.addProgress(v2); + statisticsManager.addProgress(e3); + statisticsManager.addProgress(e4); + statisticsManager.setReportTemplate(getClass().getClassLoader().getResourceAsStream("templates/short.report")); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + statisticsManager.writeFullReport(new PrintStream(out)); + assertEquals( + "" + + Util.newline + + "" + + Util.newline + + "" + Util.newline + "" + + Util.newline + "" + Util.newline + "" + Util.newline + + "" + Util.newline + "" + Util.newline + + "" + Util.newline + "" + Util.newline + + "" + Util.newline + "" + Util.newline + + "" + Util.newline + "
\"Coverage\" Edge Coverage
State Coverage
2-Edge Sequence Coverage
3-Edge Sequence Coverage
" + Util.newline, out.toString()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/UtilTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/UtilTest.java index 9242c9f0..b7a5b046 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/UtilTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/UtilTest.java @@ -26,62 +26,61 @@ package org.graphwalker.core; +import junit.framework.TestCase; import org.apache.log4j.Logger; import org.graphwalker.core.graph.Edge; import org.graphwalker.core.graph.Graph; import org.graphwalker.core.graph.Vertex; -import junit.framework.TestCase; - public class UtilTest extends TestCase { - public void testAbortIf_1() { - try { - Util.AbortIf(true, "Working"); - fail("expected error message"); - } catch (Exception e) { - assertEquals("Working", e.getMessage()); - } - } + public void testAbortIf_1() { + try { + Util.AbortIf(true, "Working"); + fail("expected error message"); + } catch (Exception e) { + assertEquals("Working", e.getMessage()); + } + } - public void testAbortIf_2() { - Util.AbortIf(false, "Working"); - } + public void testAbortIf_2() { + Util.AbortIf(false, "Working"); + } - public void testGetCompleteEdgeName() { - Graph graph = new Graph(); - Vertex v1 = new Vertex(); - v1.setIndexKey(new Integer(1)); - v1.setLabelKey("V1"); - graph.addVertex(v1); - Vertex v2 = new Vertex(); - v2.setIndexKey(new Integer(2)); - v2.setLabelKey("V2"); - graph.addVertex(v2); - Edge edge = new Edge(); - edge.setIndexKey(new Integer(3)); - edge.setLabelKey("E1"); - graph.addEdge(edge, v1, v2); + public void testGetCompleteEdgeName() { + Graph graph = new Graph(); + Vertex v1 = new Vertex(); + v1.setIndexKey(new Integer(1)); + v1.setLabelKey("V1"); + graph.addVertex(v1); + Vertex v2 = new Vertex(); + v2.setIndexKey(new Integer(2)); + v2.setLabelKey("V2"); + graph.addVertex(v2); + Edge edge = new Edge(); + edge.setIndexKey(new Integer(3)); + edge.setLabelKey("E1"); + graph.addEdge(edge, v1, v2); - assertEquals("Edge: 'E1', INDEX=3", edge.toString()); - } + assertEquals("Edge: 'E1', INDEX=3", edge.toString()); + } - public void testGetCompleteVertexName() { - Graph graph = new Graph(); - Vertex v1 = new Vertex(); - v1.setIndexKey(new Integer(1)); - v1.setLabelKey("V1"); - graph.addVertex(v1); + public void testGetCompleteVertexName() { + Graph graph = new Graph(); + Vertex v1 = new Vertex(); + v1.setIndexKey(new Integer(1)); + v1.setLabelKey("V1"); + graph.addVertex(v1); - assertEquals("Vertex: 'V1', INDEX=1", v1.toString()); - } + assertEquals("Vertex: 'V1', INDEX=1", v1.toString()); + } - public void testSetupLogger() { - Logger logger = Util.setupLogger(UtilTest.class); - logger.debug("Working"); - } + public void testSetupLogger() { + Logger logger = Util.setupLogger(UtilTest.class); + logger.debug("Working"); + } - public void testReadPropertySOAP_GUI() { - assertEquals(true, Util.readSoapGuiStartupState() == true || Util.readSoapGuiStartupState() == false); - } + public void testReadPropertySOAP_GUI() { + assertEquals(true, Util.readSoapGuiStartupState() == true || Util.readSoapGuiStartupState() == false); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/AlternativeConditionTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/AlternativeConditionTest.java index 3c24ab57..393fb64f 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/AlternativeConditionTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/AlternativeConditionTest.java @@ -30,27 +30,27 @@ public class AlternativeConditionTest extends TestCase { - public void testConstructor() { - new AlternativeCondition(); - } + public void testConstructor() { + new AlternativeCondition(); + } - public void testFulfillment() { - AlternativeCondition condition = new AlternativeCondition(); - condition.add(new NeverCondition()); - assertEquals(0, condition.getFulfilment(), 0.01); - condition.add(new NeverCondition()); - assertEquals(0, condition.getFulfilment(), 0.01); - condition.add(new NeverCondition()); - assertEquals(0, condition.getFulfilment(), 0.01); - } + public void testFulfillment() { + AlternativeCondition condition = new AlternativeCondition(); + condition.add(new NeverCondition()); + assertEquals(0, condition.getFulfilment(), 0.01); + condition.add(new NeverCondition()); + assertEquals(0, condition.getFulfilment(), 0.01); + condition.add(new NeverCondition()); + assertEquals(0, condition.getFulfilment(), 0.01); + } - public void testIsFulfilled() { - AlternativeCondition condition = new AlternativeCondition(); - condition.add(new NeverCondition()); - assertEquals(false, condition.isFulfilled()); - condition.add(new NeverCondition()); - assertEquals(false, condition.isFulfilled()); - condition.add(new NeverCondition()); - assertEquals(false, condition.isFulfilled()); - } + public void testIsFulfilled() { + AlternativeCondition condition = new AlternativeCondition(); + condition.add(new NeverCondition()); + assertEquals(false, condition.isFulfilled()); + condition.add(new NeverCondition()); + assertEquals(false, condition.isFulfilled()); + condition.add(new NeverCondition()); + assertEquals(false, condition.isFulfilled()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/CombinationalConditionTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/CombinationalConditionTest.java index 0f99c2c1..17ca1816 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/CombinationalConditionTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/CombinationalConditionTest.java @@ -30,23 +30,23 @@ public class CombinationalConditionTest extends TestCase { - public void testConstructor() { - new CombinationalCondition(); - } + public void testConstructor() { + new CombinationalCondition(); + } - public void testFulfillment() { - CombinationalCondition condition = new CombinationalCondition(); - condition.add(new NeverCondition()); - assertEquals(0, condition.getFulfilment(), 0.01); - } + public void testFulfillment() { + CombinationalCondition condition = new CombinationalCondition(); + condition.add(new NeverCondition()); + assertEquals(0, condition.getFulfilment(), 0.01); + } - public void testIsFulfilled() { - CombinationalCondition condition = new CombinationalCondition(); - condition.add(new NeverCondition()); - assertEquals(false, condition.isFulfilled()); - condition.add(new NeverCondition()); - assertEquals(false, condition.isFulfilled()); - condition.add(new NeverCondition()); - assertEquals(false, condition.isFulfilled()); - } + public void testIsFulfilled() { + CombinationalCondition condition = new CombinationalCondition(); + condition.add(new NeverCondition()); + assertEquals(false, condition.isFulfilled()); + condition.add(new NeverCondition()); + assertEquals(false, condition.isFulfilled()); + condition.add(new NeverCondition()); + assertEquals(false, condition.isFulfilled()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/EdgeCoverageTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/EdgeCoverageTest.java index 3f9ca11b..20387ede 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/EdgeCoverageTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/EdgeCoverageTest.java @@ -26,6 +26,7 @@ package org.graphwalker.core.conditions; +import junit.framework.TestCase; import org.graphwalker.core.ModelBasedTesting; import org.graphwalker.core.Util; import org.graphwalker.core.exceptions.GeneratorException; @@ -35,62 +36,60 @@ import org.graphwalker.core.graph.Graph; import org.graphwalker.core.graph.Vertex; -import junit.framework.TestCase; - public class EdgeCoverageTest extends TestCase { - Graph graph; - Vertex start; - Vertex v1; - Vertex v2; - Edge e0; - Edge e1; + Graph graph; + Vertex start; + Vertex v1; + Vertex v2; + Edge e0; + Edge e1; - @Override - protected void setUp() throws Exception { - super.setUp(); - graph = new Graph(); + @Override + protected void setUp() throws Exception { + super.setUp(); + graph = new Graph(); - start = Util.addVertexToGraph(graph, "Start"); - v1 = Util.addVertexToGraph(graph, "V1"); - v2 = Util.addVertexToGraph(graph, "V2"); + start = Util.addVertexToGraph(graph, "Start"); + v1 = Util.addVertexToGraph(graph, "V1"); + v2 = Util.addVertexToGraph(graph, "V2"); - e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, null); - e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); - } + e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, null); + e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); + } - @Override - protected void tearDown() throws Exception { - super.tearDown(); - graph = null; - start = v1 = v2 = null; - e0 = e1 = null; - } + @Override + protected void tearDown() throws Exception { + super.tearDown(); + graph = null; + start = v1 = v2 = null; + e0 = e1 = null; + } - public void testFulfillment() throws StopConditionException, GeneratorException, InterruptedException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGraph(graph); - mbt.setGenerator(new RandomPathGenerator(new EdgeCoverage())); - assertTrue(mbt.hasNextStep()); + public void testFulfillment() throws StopConditionException, GeneratorException, InterruptedException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGraph(graph); + mbt.setGenerator(new RandomPathGenerator(new EdgeCoverage())); + assertTrue(mbt.hasNextStep()); - assertEquals((double) 0 / 2, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - mbt.getNextStep(); - assertEquals((double) 1 / 2, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - mbt.getNextStep(); - assertEquals((double) 2 / 2, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - } + assertEquals((double) 0 / 2, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + mbt.getNextStep(); + assertEquals((double) 1 / 2, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + mbt.getNextStep(); + assertEquals((double) 2 / 2, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + } - public void testIsFulfilled() throws StopConditionException, GeneratorException, InterruptedException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGraph(graph); - mbt.setGenerator(new RandomPathGenerator(new EdgeCoverage())); - assertTrue(mbt.hasNextStep()); + public void testIsFulfilled() throws StopConditionException, GeneratorException, InterruptedException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGraph(graph); + mbt.setGenerator(new RandomPathGenerator(new EdgeCoverage())); + assertTrue(mbt.hasNextStep()); - assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); - mbt.getNextStep(); - assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); - mbt.getNextStep(); - assertEquals(true, mbt.getGenerator().getStopCondition().isFulfilled()); - } + assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); + mbt.getNextStep(); + assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); + mbt.getNextStep(); + assertEquals(true, mbt.getGenerator().getStopCondition().isFulfilled()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedEdgeTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedEdgeTest.java index 40733314..4f6da8d1 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedEdgeTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedEdgeTest.java @@ -26,6 +26,7 @@ package org.graphwalker.core.conditions; +import junit.framework.TestCase; import org.graphwalker.core.ModelBasedTesting; import org.graphwalker.core.Util; import org.graphwalker.core.exceptions.GeneratorException; @@ -34,68 +35,66 @@ import org.graphwalker.core.graph.Graph; import org.graphwalker.core.graph.Vertex; -import junit.framework.TestCase; - public class ReachedEdgeTest extends TestCase { - Graph graph; - Vertex start; - Vertex v1; - Vertex v2; - Edge e0; - Edge e1; + Graph graph; + Vertex start; + Vertex v1; + Vertex v2; + Edge e0; + Edge e1; - @Override - protected void setUp() throws Exception { - super.setUp(); - ModelBasedTesting.getInstance().reset(); - graph = new Graph(); + @Override + protected void setUp() throws Exception { + super.setUp(); + ModelBasedTesting.getInstance().reset(); + graph = new Graph(); - start = Util.addVertexToGraph(graph, "Start"); - v1 = Util.addVertexToGraph(graph, "V1"); - v2 = Util.addVertexToGraph(graph, "V2"); + start = Util.addVertexToGraph(graph, "Start"); + v1 = Util.addVertexToGraph(graph, "V1"); + v2 = Util.addVertexToGraph(graph, "V2"); - e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, null); - e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); - } + e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, null); + e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); + } - @Override - protected void tearDown() throws Exception { - super.tearDown(); - graph = null; - start = v1 = v2 = null; - e0 = e1 = null; - } + @Override + protected void tearDown() throws Exception { + super.tearDown(); + graph = null; + start = v1 = v2 = null; + e0 = e1 = null; + } - public void testConstructor() { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGenerator(new RandomPathGenerator(new ReachedEdge("E1"))); - } + public void testConstructor() { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGenerator(new RandomPathGenerator(new ReachedEdge("E1"))); + } - public void testFulfillment() throws GeneratorException, InterruptedException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGraph(graph); - mbt.setGenerator(new RandomPathGenerator(new ReachedEdge("E1"))); - assertTrue(mbt.hasNextStep()); + public void testFulfillment() throws GeneratorException, InterruptedException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGraph(graph); + mbt.setGenerator(new RandomPathGenerator(new ReachedEdge("E1"))); + assertTrue(mbt.hasNextStep()); - assertEquals(0, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - mbt.getNextStep(); - assertEquals(0, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - mbt.getNextStep(); - assertEquals(1, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - } + assertEquals(0, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + mbt.getNextStep(); + assertEquals(0, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + mbt.getNextStep(); + assertEquals(1, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + } - public void testIsFulfilled() throws GeneratorException, InterruptedException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGraph(graph); - mbt.setGenerator(new RandomPathGenerator(new ReachedEdge("E1"))); - assertTrue(mbt.hasNextStep()); + public void testIsFulfilled() throws GeneratorException, InterruptedException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGraph(graph); + mbt.setGenerator(new RandomPathGenerator(new ReachedEdge("E1"))); + assertTrue(mbt.hasNextStep()); - assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); - mbt.getNextStep(); - assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); - mbt.getNextStep(); - assertEquals(true, mbt.getGenerator().getStopCondition().isFulfilled()); - } + assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); + mbt.getNextStep(); + assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); + mbt.getNextStep(); + assertEquals(true, mbt.getGenerator().getStopCondition().isFulfilled()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedRequirementTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedRequirementTest.java index 8d9efa38..ed19a99e 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedRequirementTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedRequirementTest.java @@ -26,6 +26,7 @@ package org.graphwalker.core.conditions; +import junit.framework.TestCase; import org.graphwalker.core.ModelBasedTesting; import org.graphwalker.core.Util; import org.graphwalker.core.exceptions.GeneratorException; @@ -34,72 +35,70 @@ import org.graphwalker.core.graph.Graph; import org.graphwalker.core.graph.Vertex; -import junit.framework.TestCase; - public class ReachedRequirementTest extends TestCase { - Graph graph; - Vertex start; - Vertex v1; - Vertex v2; - Edge e0; - Edge e1; + Graph graph; + Vertex start; + Vertex v1; + Vertex v2; + Edge e0; + Edge e1; - @Override - protected void setUp() throws Exception { - super.setUp(); - ModelBasedTesting.getInstance().reset(); - graph = new Graph(); + @Override + protected void setUp() throws Exception { + super.setUp(); + ModelBasedTesting.getInstance().reset(); + graph = new Graph(); - start = Util.addVertexToGraph(graph, "Start"); - v1 = Util.addVertexToGraph(graph, "V1"); - v2 = Util.addVertexToGraph(graph, "V2"); + start = Util.addVertexToGraph(graph, "Start"); + v1 = Util.addVertexToGraph(graph, "V1"); + v2 = Util.addVertexToGraph(graph, "V2"); - v1.setReqTagKey("R1"); - v2.setReqTagKey("R2"); + v1.setReqTagKey("R1"); + v2.setReqTagKey("R2"); - e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, null); - e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); + e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, null); + e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); - e0.setReqTagKey("R3"); - e1.setReqTagKey("R4"); - } + e0.setReqTagKey("R3"); + e1.setReqTagKey("R4"); + } - @Override - protected void tearDown() throws Exception { - super.tearDown(); - graph = null; - start = v1 = v2 = null; - e0 = e1 = null; - } + @Override + protected void tearDown() throws Exception { + super.tearDown(); + graph = null; + start = v1 = v2 = null; + e0 = e1 = null; + } - public void testConstructor() { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGenerator(new RandomPathGenerator(new ReachedRequirement("R4"))); - } + public void testConstructor() { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGenerator(new RandomPathGenerator(new ReachedRequirement("R4"))); + } - public void testFulfillment() throws GeneratorException, InterruptedException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGraph(graph); - mbt.setGenerator(new RandomPathGenerator(new ReachedRequirement("R4"))); - assertTrue(mbt.hasNextStep()); + public void testFulfillment() throws GeneratorException, InterruptedException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGraph(graph); + mbt.setGenerator(new RandomPathGenerator(new ReachedRequirement("R4"))); + assertTrue(mbt.hasNextStep()); - assertEquals(0, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - mbt.getNextStep(); - assertEquals(0, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - mbt.getNextStep(); - assertEquals(1, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - } + assertEquals(0, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + mbt.getNextStep(); + assertEquals(0, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + mbt.getNextStep(); + assertEquals(1, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + } - public void testIsFulfilled() throws GeneratorException, InterruptedException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGraph(graph); - mbt.setGenerator(new RandomPathGenerator(new ReachedRequirement("R4"))); - assertTrue(mbt.hasNextStep()); + public void testIsFulfilled() throws GeneratorException, InterruptedException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGraph(graph); + mbt.setGenerator(new RandomPathGenerator(new ReachedRequirement("R4"))); + assertTrue(mbt.hasNextStep()); - assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); - mbt.getNextStep(); - assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); - mbt.getNextStep(); - assertEquals(true, mbt.getGenerator().getStopCondition().isFulfilled()); - } + assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); + mbt.getNextStep(); + assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); + mbt.getNextStep(); + assertEquals(true, mbt.getGenerator().getStopCondition().isFulfilled()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedStateTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedStateTest.java index e9100280..3ed07de4 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedStateTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedStateTest.java @@ -26,6 +26,7 @@ package org.graphwalker.core.conditions; +import junit.framework.TestCase; import org.graphwalker.core.ModelBasedTesting; import org.graphwalker.core.Util; import org.graphwalker.core.exceptions.GeneratorException; @@ -34,67 +35,65 @@ import org.graphwalker.core.graph.Graph; import org.graphwalker.core.graph.Vertex; -import junit.framework.TestCase; - public class ReachedStateTest extends TestCase { - Graph graph; - Vertex start; - Vertex v1; - Vertex v2; - Edge e0; - Edge e1; + Graph graph; + Vertex start; + Vertex v1; + Vertex v2; + Edge e0; + Edge e1; - @Override - protected void setUp() throws Exception { - super.setUp(); - ModelBasedTesting.getInstance().reset(); - graph = new Graph(); + @Override + protected void setUp() throws Exception { + super.setUp(); + ModelBasedTesting.getInstance().reset(); + graph = new Graph(); - start = Util.addVertexToGraph(graph, "Start"); - v1 = Util.addVertexToGraph(graph, "V1"); - v2 = Util.addVertexToGraph(graph, "V2"); + start = Util.addVertexToGraph(graph, "Start"); + v1 = Util.addVertexToGraph(graph, "V1"); + v2 = Util.addVertexToGraph(graph, "V2"); - e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, null); - e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); - } + e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, null); + e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); + } - @Override - protected void tearDown() throws Exception { - super.tearDown(); - graph = null; - start = v1 = v2 = null; - e0 = e1 = null; - } + @Override + protected void tearDown() throws Exception { + super.tearDown(); + graph = null; + start = v1 = v2 = null; + e0 = e1 = null; + } - public void testConstructor() { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGenerator(new RandomPathGenerator(new ReachedVertex("V2"))); - } + public void testConstructor() { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGenerator(new RandomPathGenerator(new ReachedVertex("V2"))); + } - public void testFulfillment() throws GeneratorException, InterruptedException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGraph(graph); - mbt.setGenerator(new RandomPathGenerator(new ReachedVertex("V2"))); - assertTrue(mbt.hasNextStep()); + public void testFulfillment() throws GeneratorException, InterruptedException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGraph(graph); + mbt.setGenerator(new RandomPathGenerator(new ReachedVertex("V2"))); + assertTrue(mbt.hasNextStep()); - assertEquals(0, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - mbt.getNextStep(); - assertEquals(0.5, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - mbt.getNextStep(); - assertEquals(1, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - } + assertEquals(0, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + mbt.getNextStep(); + assertEquals(0.5, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + mbt.getNextStep(); + assertEquals(1, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + } - public void testIsFulfilled() throws GeneratorException, InterruptedException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGraph(graph); - mbt.setGenerator(new RandomPathGenerator(new ReachedVertex("V2"))); - assertTrue(mbt.hasNextStep()); + public void testIsFulfilled() throws GeneratorException, InterruptedException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGraph(graph); + mbt.setGenerator(new RandomPathGenerator(new ReachedVertex("V2"))); + assertTrue(mbt.hasNextStep()); - assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); - mbt.getNextStep(); - assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); - mbt.getNextStep(); - assertEquals(true, mbt.getGenerator().getStopCondition().isFulfilled()); - } + assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); + mbt.getNextStep(); + assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); + mbt.getNextStep(); + assertEquals(true, mbt.getGenerator().getStopCondition().isFulfilled()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/RequirementCoverageTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/RequirementCoverageTest.java index 4dfe1aa6..389e5070 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/RequirementCoverageTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/RequirementCoverageTest.java @@ -26,6 +26,7 @@ package org.graphwalker.core.conditions; +import junit.framework.TestCase; import org.graphwalker.core.ModelBasedTesting; import org.graphwalker.core.Util; import org.graphwalker.core.exceptions.GeneratorException; @@ -34,74 +35,72 @@ import org.graphwalker.core.graph.Graph; import org.graphwalker.core.graph.Vertex; -import junit.framework.TestCase; - public class RequirementCoverageTest extends TestCase { - Graph graph; - Vertex start; - Vertex v1; - Vertex v2; - Edge e0; - Edge e1; - - @Override - protected void setUp() throws Exception { - super.setUp(); - ModelBasedTesting.getInstance().reset(); - graph = new Graph(); - - start = Util.addVertexToGraph(graph, "Start"); - v1 = Util.addVertexToGraph(graph, "V1"); - v2 = Util.addVertexToGraph(graph, "V2"); - - v1.setReqTagKey("R1"); - v2.setReqTagKey("R2"); - - e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, null); - e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); - - e0.setReqTagKey("R3"); - e1.setReqTagKey("R4"); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - graph = null; - start = v1 = v2 = null; - e0 = e1 = null; - } - - public void testConstructor() { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGenerator(new RandomPathGenerator(new RequirementCoverage())); - } - - public void testFulfillment() throws GeneratorException, InterruptedException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGraph(graph); - mbt.setGenerator(new RandomPathGenerator(new RequirementCoverage())); - assertTrue(mbt.hasNextStep()); - - assertEquals((double) 0 / 4, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - mbt.getNextStep(); - assertEquals((double) 2 / 4, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - mbt.getNextStep(); - assertEquals((double) 4 / 4, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - } - - public void testIsFulfilled() throws GeneratorException, InterruptedException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGraph(graph); - mbt.setGenerator(new RandomPathGenerator(new RequirementCoverage())); - assertTrue(mbt.hasNextStep()); - - assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); - mbt.getNextStep(); - assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); - mbt.getNextStep(); - assertEquals(true, mbt.getGenerator().getStopCondition().isFulfilled()); - } + Graph graph; + Vertex start; + Vertex v1; + Vertex v2; + Edge e0; + Edge e1; + + @Override + protected void setUp() throws Exception { + super.setUp(); + ModelBasedTesting.getInstance().reset(); + graph = new Graph(); + + start = Util.addVertexToGraph(graph, "Start"); + v1 = Util.addVertexToGraph(graph, "V1"); + v2 = Util.addVertexToGraph(graph, "V2"); + + v1.setReqTagKey("R1"); + v2.setReqTagKey("R2"); + + e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, null); + e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); + + e0.setReqTagKey("R3"); + e1.setReqTagKey("R4"); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + graph = null; + start = v1 = v2 = null; + e0 = e1 = null; + } + + public void testConstructor() { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGenerator(new RandomPathGenerator(new RequirementCoverage())); + } + + public void testFulfillment() throws GeneratorException, InterruptedException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGraph(graph); + mbt.setGenerator(new RandomPathGenerator(new RequirementCoverage())); + assertTrue(mbt.hasNextStep()); + + assertEquals((double) 0 / 4, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + mbt.getNextStep(); + assertEquals((double) 2 / 4, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + mbt.getNextStep(); + assertEquals((double) 4 / 4, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + } + + public void testIsFulfilled() throws GeneratorException, InterruptedException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGraph(graph); + mbt.setGenerator(new RandomPathGenerator(new RequirementCoverage())); + assertTrue(mbt.hasNextStep()); + + assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); + mbt.getNextStep(); + assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); + mbt.getNextStep(); + assertEquals(true, mbt.getGenerator().getStopCondition().isFulfilled()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/StateCoverageTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/StateCoverageTest.java index b81cef4c..f0f9a035 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/StateCoverageTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/StateCoverageTest.java @@ -26,6 +26,7 @@ package org.graphwalker.core.conditions; +import junit.framework.TestCase; import org.graphwalker.core.ModelBasedTesting; import org.graphwalker.core.Util; import org.graphwalker.core.exceptions.GeneratorException; @@ -35,65 +36,63 @@ import org.graphwalker.core.graph.Graph; import org.graphwalker.core.graph.Vertex; -import junit.framework.TestCase; - public class StateCoverageTest extends TestCase { - Graph graph; - Vertex start; - Vertex v1; - Vertex v2; - Edge e0; - Edge e1; + Graph graph; + Vertex start; + Vertex v1; + Vertex v2; + Edge e0; + Edge e1; - @Override - protected void setUp() throws Exception { - super.setUp(); - graph = new Graph(); + @Override + protected void setUp() throws Exception { + super.setUp(); + graph = new Graph(); - start = Util.addVertexToGraph(graph, "Start"); - v1 = Util.addVertexToGraph(graph, "V1"); - v2 = Util.addVertexToGraph(graph, "V2"); + start = Util.addVertexToGraph(graph, "Start"); + v1 = Util.addVertexToGraph(graph, "V1"); + v2 = Util.addVertexToGraph(graph, "V2"); - e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, null); - e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); - } + e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, null); + e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); + } - @Override - protected void tearDown() throws Exception { - super.tearDown(); - graph = null; - start = v1 = v2 = null; - e0 = e1 = null; - } + @Override + protected void tearDown() throws Exception { + super.tearDown(); + graph = null; + start = v1 = v2 = null; + e0 = e1 = null; + } - public void testConstructor() throws StopConditionException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGenerator(new RandomPathGenerator(new VertexCoverage())); - } + public void testConstructor() throws StopConditionException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGenerator(new RandomPathGenerator(new VertexCoverage())); + } - public void testFulfillment() throws StopConditionException, GeneratorException, InterruptedException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGraph(graph); - mbt.setGenerator(new RandomPathGenerator(new VertexCoverage())); - assertTrue(mbt.hasNextStep()); + public void testFulfillment() throws StopConditionException, GeneratorException, InterruptedException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGraph(graph); + mbt.setGenerator(new RandomPathGenerator(new VertexCoverage())); + assertTrue(mbt.hasNextStep()); - assertEquals((double) 1 / 3, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - mbt.getNextStep(); - assertEquals((double) 2 / 3, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - mbt.getNextStep(); - assertEquals((double) 3 / 3, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - } + assertEquals((double) 1 / 3, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + mbt.getNextStep(); + assertEquals((double) 2 / 3, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + mbt.getNextStep(); + assertEquals((double) 3 / 3, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + } - public void testIsFulfilled() throws StopConditionException, GeneratorException, InterruptedException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGraph(graph); - mbt.setGenerator(new RandomPathGenerator(new VertexCoverage())); - assertTrue(mbt.hasNextStep()); + public void testIsFulfilled() throws StopConditionException, GeneratorException, InterruptedException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGraph(graph); + mbt.setGenerator(new RandomPathGenerator(new VertexCoverage())); + assertTrue(mbt.hasNextStep()); - assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); - mbt.getNextStep(); - assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); - mbt.getNextStep(); - assertEquals(true, mbt.getGenerator().getStopCondition().isFulfilled()); - } + assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); + mbt.getNextStep(); + assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); + mbt.getNextStep(); + assertEquals(true, mbt.getGenerator().getStopCondition().isFulfilled()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TestCaseLengthTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TestCaseLengthTest.java index 3bc8597f..797b3fb7 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TestCaseLengthTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TestCaseLengthTest.java @@ -26,6 +26,7 @@ package org.graphwalker.core.conditions; +import junit.framework.TestCase; import org.graphwalker.core.ModelBasedTesting; import org.graphwalker.core.Util; import org.graphwalker.core.exceptions.GeneratorException; @@ -34,67 +35,65 @@ import org.graphwalker.core.graph.Graph; import org.graphwalker.core.graph.Vertex; -import junit.framework.TestCase; - public class TestCaseLengthTest extends TestCase { - Graph graph; - Vertex start; - Vertex v1; - Vertex v2; - Edge e0; - Edge e1; + Graph graph; + Vertex start; + Vertex v1; + Vertex v2; + Edge e0; + Edge e1; - @Override - protected void setUp() throws Exception { - super.setUp(); - ModelBasedTesting.getInstance().reset(); - graph = new Graph(); + @Override + protected void setUp() throws Exception { + super.setUp(); + ModelBasedTesting.getInstance().reset(); + graph = new Graph(); - start = Util.addVertexToGraph(graph, "Start"); - v1 = Util.addVertexToGraph(graph, "V1"); - v2 = Util.addVertexToGraph(graph, "V2"); + start = Util.addVertexToGraph(graph, "Start"); + v1 = Util.addVertexToGraph(graph, "V1"); + v2 = Util.addVertexToGraph(graph, "V2"); - e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, null); - e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); - } + e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, null); + e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); + } - @Override - protected void tearDown() throws Exception { - super.tearDown(); - graph = null; - start = v1 = v2 = null; - e0 = e1 = null; - } + @Override + protected void tearDown() throws Exception { + super.tearDown(); + graph = null; + start = v1 = v2 = null; + e0 = e1 = null; + } - public void testConstructor() { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGenerator(new RandomPathGenerator(new TestCaseLength(2))); - } + public void testConstructor() { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGenerator(new RandomPathGenerator(new TestCaseLength(2))); + } - public void testFulfillment() throws GeneratorException, InterruptedException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGraph(graph); - mbt.setGenerator(new RandomPathGenerator(new TestCaseLength(2))); - assertTrue(mbt.hasNextStep()); + public void testFulfillment() throws GeneratorException, InterruptedException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGraph(graph); + mbt.setGenerator(new RandomPathGenerator(new TestCaseLength(2))); + assertTrue(mbt.hasNextStep()); - assertEquals((double) 0 / 2, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - mbt.getNextStep(); - assertEquals((double) 1 / 2, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - mbt.getNextStep(); - assertEquals((double) 2 / 2, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); - } + assertEquals((double) 0 / 2, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + mbt.getNextStep(); + assertEquals((double) 1 / 2, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + mbt.getNextStep(); + assertEquals((double) 2 / 2, mbt.getGenerator().getStopCondition().getFulfilment(), 0.01); + } - public void testIsFulfilled() throws GeneratorException, InterruptedException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGraph(graph); - mbt.setGenerator(new RandomPathGenerator(new TestCaseLength(2))); - assertTrue(mbt.hasNextStep()); + public void testIsFulfilled() throws GeneratorException, InterruptedException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGraph(graph); + mbt.setGenerator(new RandomPathGenerator(new TestCaseLength(2))); + assertTrue(mbt.hasNextStep()); - assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); - mbt.getNextStep(); - assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); - mbt.getNextStep(); - assertEquals(true, mbt.getGenerator().getStopCondition().isFulfilled()); - } + assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); + mbt.getNextStep(); + assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); + mbt.getNextStep(); + assertEquals(true, mbt.getGenerator().getStopCondition().isFulfilled()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TimeDurationTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TimeDurationTest.java index 64c9bf9b..2e0e6879 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TimeDurationTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/conditions/TimeDurationTest.java @@ -26,6 +26,7 @@ package org.graphwalker.core.conditions; +import junit.framework.TestCase; import org.graphwalker.core.Keywords; import org.graphwalker.core.ModelBasedTesting; import org.graphwalker.core.Util; @@ -35,78 +36,76 @@ import org.graphwalker.core.graph.Graph; import org.graphwalker.core.graph.Vertex; -import junit.framework.TestCase; - public class TimeDurationTest extends TestCase { - Graph graph; - Vertex start; - Vertex v1; - Vertex v2; - Edge e0; - Edge e1; + Graph graph; + Vertex start; + Vertex v1; + Vertex v2; + Edge e0; + Edge e1; - @Override - protected void setUp() throws Exception { - super.setUp(); - graph = new Graph(); + @Override + protected void setUp() throws Exception { + super.setUp(); + graph = new Graph(); - start = Util.addVertexToGraph(graph, "Start"); - v1 = Util.addVertexToGraph(graph, "V1"); - v2 = Util.addVertexToGraph(graph, "V2"); + start = Util.addVertexToGraph(graph, "Start"); + v1 = Util.addVertexToGraph(graph, "V1"); + v2 = Util.addVertexToGraph(graph, "V2"); - e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, null); - e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); - } + e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, null); + e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); + } - @Override - protected void tearDown() throws Exception { - super.tearDown(); - graph = null; - start = v1 = v2 = null; - e0 = e1 = null; - } + @Override + protected void tearDown() throws Exception { + super.tearDown(); + graph = null; + start = v1 = v2 = null; + e0 = e1 = null; + } - public void testConstructor() { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.setGenerator(new RandomPathGenerator(new TimeDuration(1))); - } + public void testConstructor() { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.setGenerator(new RandomPathGenerator(new TimeDuration(1))); + } - public void testFulfillment() throws InterruptedException, GeneratorException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - double startTime = System.currentTimeMillis(); - mbt.setGraph(graph); - mbt.setGenerator(Keywords.GENERATOR_RANDOM); - mbt.setGenerator(new RandomPathGenerator(new TimeDuration(1))); - assertTrue(mbt.hasNextStep()); + public void testFulfillment() throws InterruptedException, GeneratorException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + double startTime = System.currentTimeMillis(); + mbt.setGraph(graph); + mbt.setGenerator(Keywords.GENERATOR_RANDOM); + mbt.setGenerator(new RandomPathGenerator(new TimeDuration(1))); + assertTrue(mbt.hasNextStep()); - while ((System.currentTimeMillis() - startTime) < 10) - Thread.sleep(1); - assertEquals((System.currentTimeMillis() - startTime) / 1000, mbt.getGenerator().getStopCondition().getFulfilment(), 0.1); - while ((System.currentTimeMillis() - startTime) < 900) - Thread.sleep(1); - assertEquals((System.currentTimeMillis() - startTime) / 1000, mbt.getGenerator().getStopCondition().getFulfilment(), 0.1); - while ((System.currentTimeMillis() - startTime) < 1000) - Thread.sleep(1); - assertEquals((System.currentTimeMillis() - startTime) / 1000, mbt.getGenerator().getStopCondition().getFulfilment(), 0.1); - } + while ((System.currentTimeMillis() - startTime) < 10) + Thread.sleep(1); + assertEquals((System.currentTimeMillis() - startTime) / 1000, mbt.getGenerator().getStopCondition().getFulfilment(), 0.1); + while ((System.currentTimeMillis() - startTime) < 900) + Thread.sleep(1); + assertEquals((System.currentTimeMillis() - startTime) / 1000, mbt.getGenerator().getStopCondition().getFulfilment(), 0.1); + while ((System.currentTimeMillis() - startTime) < 1000) + Thread.sleep(1); + assertEquals((System.currentTimeMillis() - startTime) / 1000, mbt.getGenerator().getStopCondition().getFulfilment(), 0.1); + } - public void testIsFulfilled() throws InterruptedException, GeneratorException { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - double startTime = System.currentTimeMillis(); - mbt.setGraph(graph); - mbt.setGenerator(new RandomPathGenerator(new TimeDuration(1))); - assertTrue(mbt.hasNextStep()); + public void testIsFulfilled() throws InterruptedException, GeneratorException { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + double startTime = System.currentTimeMillis(); + mbt.setGraph(graph); + mbt.setGenerator(new RandomPathGenerator(new TimeDuration(1))); + assertTrue(mbt.hasNextStep()); - while ((System.currentTimeMillis() - startTime) < 10) - Thread.sleep(1); - assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); - while ((System.currentTimeMillis() - startTime) < 900) - Thread.sleep(1); - assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); - while ((System.currentTimeMillis() - startTime) < 1000) - Thread.sleep(1); - System.out.println(mbt.getGenerator().getStopCondition().getFulfilment()); - assertEquals(true, mbt.getGenerator().getStopCondition().isFulfilled()); - } + while ((System.currentTimeMillis() - startTime) < 10) + Thread.sleep(1); + assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); + while ((System.currentTimeMillis() - startTime) < 900) + Thread.sleep(1); + assertEquals(false, mbt.getGenerator().getStopCondition().isFulfilled()); + while ((System.currentTimeMillis() - startTime) < 1000) + Thread.sleep(1); + System.out.println(mbt.getGenerator().getStopCondition().getFulfilment()); + assertEquals(true, mbt.getGenerator().getStopCondition().isFulfilled()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/filters/AccessableEdgeFilterTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/filters/AccessableEdgeFilterTest.java index 09b04e8b..070d464e 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/filters/AccessableEdgeFilterTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/filters/AccessableEdgeFilterTest.java @@ -26,131 +26,129 @@ package org.graphwalker.core.filters; -import org.graphwalker.core.graph.Edge; -import org.graphwalker.core.graph.Graph; -import org.graphwalker.core.graph.Vertex; - import bsh.EvalError; import bsh.Interpreter; - import junit.framework.TestCase; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; public class AccessableEdgeFilterTest extends TestCase { - private AccessableEdgeFilter f; - private Graph g; - private Edge e; - private Interpreter dataStore; - - @Override - protected void setUp() throws Exception { - super.setUp(); - dataStore = new Interpreter(); - - Vertex v1 = new Vertex(); - Vertex v2 = new Vertex(); - g = new Graph(); - g.addVertex(v1); - g.addVertex(v2); - - e = new Edge(); - g.addEdge(e, v1, v2); - - e.setLabelKey(""); - - f = new AccessableEdgeFilter(dataStore); - } - - public void testAcceptEdgeEdge1() { - e.setLabelKey(""); - assertEquals(true, f.acceptEdge(g, e)); - } - - public void testAcceptEdgeEdge2() { - e.setLabelKey("test"); - assertEquals(true, f.acceptEdge(g, e)); - } - - public void testAcceptEdgeEdge3() { - e.setLabelKey("test"); - e.setGuardKey("true"); - assertEquals(true, f.acceptEdge(g, e)); - } - - public void testAcceptEdgeEdge4() { - e.setGuardKey("true"); - assertEquals(true, f.acceptEdge(g, e)); - } - - public void testAcceptEdgeEdge5() { - e.setGuardKey("true"); - e.setActionsKey("test"); - assertEquals(true, f.acceptEdge(g, e)); - } - - public void testAcceptEdgeEdge6() { - e.setGuardKey("false"); - assertEquals(false, f.acceptEdge(g, e)); - } - - public void testAcceptEdgeEdge7() throws EvalError { - dataStore.eval("X=false"); - e.setGuardKey("X"); - assertEquals(false, f.acceptEdge(g, e)); - } - - public void testAcceptEdgeEdge8() throws EvalError { - dataStore.eval("X=true"); - e.setGuardKey("X"); - assertEquals(true, f.acceptEdge(g, e)); - } - - public void testAcceptEdgeEdge9() throws EvalError { - dataStore.eval("X=true"); - e.setGuardKey("X==true"); - assertEquals(true, f.acceptEdge(g, e)); - } - - public void testAcceptEdgeEdge10() throws EvalError { - dataStore.eval("X=true"); - e.setGuardKey("X==false"); - assertEquals(false, f.acceptEdge(g, e)); - } - - public void testAcceptEdgeEdge11() throws EvalError { - dataStore.eval("X=true"); - dataStore.eval("Y=true"); - e.setGuardKey("X==Y"); - assertEquals(true, f.acceptEdge(g, e)); - } - - public void testAcceptEdgeEdge12() throws EvalError { - dataStore.eval("X=true"); - dataStore.eval("Y=false"); - e.setGuardKey("X==Y"); - assertEquals(false, f.acceptEdge(g, e)); - } - - public void testAcceptEdgeEdge13() throws EvalError { - dataStore.eval("X=5"); - e.setGuardKey("X==5"); - assertEquals(true, f.acceptEdge(g, e)); - } - - public void testAcceptEdgeEdge14() throws EvalError { - dataStore.eval("X=6"); - e.setGuardKey("X==5"); - assertEquals(false, f.acceptEdge(g, e)); - } - - public void testAcceptEdgeEdge15() throws EvalError { - dataStore.eval("X=6"); - e.setGuardKey("X>5"); - assertEquals(true, f.acceptEdge(g, e)); - } - - public void testAcceptEdgeEdge16() throws EvalError { - dataStore.eval("X=4"); - e.setGuardKey("X<5"); - assertEquals(true, f.acceptEdge(g, e)); - } + private AccessableEdgeFilter f; + private Graph g; + private Edge e; + private Interpreter dataStore; + + @Override + protected void setUp() throws Exception { + super.setUp(); + dataStore = new Interpreter(); + + Vertex v1 = new Vertex(); + Vertex v2 = new Vertex(); + g = new Graph(); + g.addVertex(v1); + g.addVertex(v2); + + e = new Edge(); + g.addEdge(e, v1, v2); + + e.setLabelKey(""); + + f = new AccessableEdgeFilter(dataStore); + } + + public void testAcceptEdgeEdge1() { + e.setLabelKey(""); + assertEquals(true, f.acceptEdge(g, e)); + } + + public void testAcceptEdgeEdge2() { + e.setLabelKey("test"); + assertEquals(true, f.acceptEdge(g, e)); + } + + public void testAcceptEdgeEdge3() { + e.setLabelKey("test"); + e.setGuardKey("true"); + assertEquals(true, f.acceptEdge(g, e)); + } + + public void testAcceptEdgeEdge4() { + e.setGuardKey("true"); + assertEquals(true, f.acceptEdge(g, e)); + } + + public void testAcceptEdgeEdge5() { + e.setGuardKey("true"); + e.setActionsKey("test"); + assertEquals(true, f.acceptEdge(g, e)); + } + + public void testAcceptEdgeEdge6() { + e.setGuardKey("false"); + assertEquals(false, f.acceptEdge(g, e)); + } + + public void testAcceptEdgeEdge7() throws EvalError { + dataStore.eval("X=false"); + e.setGuardKey("X"); + assertEquals(false, f.acceptEdge(g, e)); + } + + public void testAcceptEdgeEdge8() throws EvalError { + dataStore.eval("X=true"); + e.setGuardKey("X"); + assertEquals(true, f.acceptEdge(g, e)); + } + + public void testAcceptEdgeEdge9() throws EvalError { + dataStore.eval("X=true"); + e.setGuardKey("X==true"); + assertEquals(true, f.acceptEdge(g, e)); + } + + public void testAcceptEdgeEdge10() throws EvalError { + dataStore.eval("X=true"); + e.setGuardKey("X==false"); + assertEquals(false, f.acceptEdge(g, e)); + } + + public void testAcceptEdgeEdge11() throws EvalError { + dataStore.eval("X=true"); + dataStore.eval("Y=true"); + e.setGuardKey("X==Y"); + assertEquals(true, f.acceptEdge(g, e)); + } + + public void testAcceptEdgeEdge12() throws EvalError { + dataStore.eval("X=true"); + dataStore.eval("Y=false"); + e.setGuardKey("X==Y"); + assertEquals(false, f.acceptEdge(g, e)); + } + + public void testAcceptEdgeEdge13() throws EvalError { + dataStore.eval("X=5"); + e.setGuardKey("X==5"); + assertEquals(true, f.acceptEdge(g, e)); + } + + public void testAcceptEdgeEdge14() throws EvalError { + dataStore.eval("X=6"); + e.setGuardKey("X==5"); + assertEquals(false, f.acceptEdge(g, e)); + } + + public void testAcceptEdgeEdge15() throws EvalError { + dataStore.eval("X=6"); + e.setGuardKey("X>5"); + assertEquals(true, f.acceptEdge(g, e)); + } + + public void testAcceptEdgeEdge16() throws EvalError { + dataStore.eval("X=4"); + e.setGuardKey("X<5"); + assertEquals(true, f.acceptEdge(g, e)); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMBeanShellTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMBeanShellTest.java index 72ea504b..234ffef7 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMBeanShellTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMBeanShellTest.java @@ -26,6 +26,7 @@ package org.graphwalker.core.generators; +import junit.framework.TestCase; import org.graphwalker.core.Util; import org.graphwalker.core.conditions.ReachedEdge; import org.graphwalker.core.conditions.ReachedVertex; @@ -34,97 +35,95 @@ import org.graphwalker.core.graph.Vertex; import org.graphwalker.core.machines.ExtendedFiniteStateMachine; -import junit.framework.TestCase; - public class A_StarPathGeneratorEFSMBeanShellTest extends TestCase { - Graph graph; - Vertex start; - Vertex v1; - Vertex v2; - Edge e0; - Edge e1; - Edge e2; - Edge e3; + Graph graph; + Vertex start; + Vertex v1; + Vertex v2; + Edge e0; + Edge e1; + Edge e2; + Edge e3; - @Override - protected void setUp() throws Exception { - super.setUp(); - graph = new Graph(); + @Override + protected void setUp() throws Exception { + super.setUp(); + graph = new Graph(); - start = Util.addVertexToGraph(graph, "Start"); - v1 = Util.addVertexToGraph(graph, "V1"); - v2 = Util.addVertexToGraph(graph, "V2"); + start = Util.addVertexToGraph(graph, "Start"); + v1 = Util.addVertexToGraph(graph, "V1"); + v2 = Util.addVertexToGraph(graph, "V2"); - e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, "x=1;y=new Vector()"); - e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, "x=2"); - e2 = Util.addEdgeToGraph(graph, v2, v2, "E2", null, "x<4", "x++"); - e3 = Util.addEdgeToGraph(graph, v2, v1, "E3", null, "y.size()<3", "y.add(x)"); - } + e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, "x=1;y=new Vector()"); + e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, "x=2"); + e2 = Util.addEdgeToGraph(graph, v2, v2, "E2", null, "x<4", "x++"); + e3 = Util.addEdgeToGraph(graph, v2, v1, "E3", null, "y.size()<3", "y.add(x)"); + } - @Override - protected void tearDown() throws Exception { - super.tearDown(); - graph = null; - start = v1 = v2 = null; - e0 = e1 = e2 = e3 = null; - } + @Override + protected void tearDown() throws Exception { + super.tearDown(); + graph = null; + start = v1 = v2 = null; + e0 = e1 = e2 = e3 = null; + } - public void test_EFSM_StateStop() throws InterruptedException { - PathGenerator pathGenerator = new A_StarPathGenerator(new ReachedVertex("V1/x=3;y=\\[2, 3, 3\\];")); - ExtendedFiniteStateMachine machine = new ExtendedFiniteStateMachine(false); - machine.setModel(graph); - pathGenerator.setMachine(machine); + public void test_EFSM_StateStop() throws InterruptedException { + PathGenerator pathGenerator = new A_StarPathGenerator(new ReachedVertex("V1/x=3;y=\\[2, 3, 3\\];")); + ExtendedFiniteStateMachine machine = new ExtendedFiniteStateMachine(false); + machine.setModel(graph); + pathGenerator.setMachine(machine); - String[] stepPair; - stepPair = pathGenerator.getNext(); - assertEquals("E0", stepPair[0]); - assertEquals("V1/x=1;y=[];", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E1", stepPair[0]); - assertEquals("V2/x=2;y=[];", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E3", stepPair[0]); - assertEquals("V1/x=2;y=[2];", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E1", stepPair[0]); - assertEquals("V2/x=2;y=[2];", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E2", stepPair[0]); - assertEquals("V2/x=3;y=[2];", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E3", stepPair[0]); - assertEquals("V1/x=3;y=[2, 3];", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E1", stepPair[0]); - assertEquals("V2/x=2;y=[2, 3];", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E2", stepPair[0]); - assertEquals("V2/x=3;y=[2, 3];", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E3", stepPair[0]); - assertEquals("V1/x=3;y=[2, 3, 3];", stepPair[1]); - assertFalse(pathGenerator.hasNext()); + String[] stepPair; + stepPair = pathGenerator.getNext(); + assertEquals("E0", stepPair[0]); + assertEquals("V1/x=1;y=[];", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E1", stepPair[0]); + assertEquals("V2/x=2;y=[];", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E3", stepPair[0]); + assertEquals("V1/x=2;y=[2];", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E1", stepPair[0]); + assertEquals("V2/x=2;y=[2];", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E2", stepPair[0]); + assertEquals("V2/x=3;y=[2];", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E3", stepPair[0]); + assertEquals("V1/x=3;y=[2, 3];", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E1", stepPair[0]); + assertEquals("V2/x=2;y=[2, 3];", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E2", stepPair[0]); + assertEquals("V2/x=3;y=[2, 3];", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E3", stepPair[0]); + assertEquals("V1/x=3;y=[2, 3, 3];", stepPair[1]); + assertFalse(pathGenerator.hasNext()); - } + } - public void test_EFSM_EdgeStop() throws InterruptedException { - PathGenerator pathGenerator = new A_StarPathGenerator(new ReachedEdge("E2")); - ExtendedFiniteStateMachine machine = new ExtendedFiniteStateMachine(false); - machine.setModel(graph); - pathGenerator.setMachine(machine); + public void test_EFSM_EdgeStop() throws InterruptedException { + PathGenerator pathGenerator = new A_StarPathGenerator(new ReachedEdge("E2")); + ExtendedFiniteStateMachine machine = new ExtendedFiniteStateMachine(false); + machine.setModel(graph); + pathGenerator.setMachine(machine); - String[] stepPair; - stepPair = pathGenerator.getNext(); - assertEquals("E0", stepPair[0]); - assertEquals("V1/x=1;y=[];", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E1", stepPair[0]); - assertEquals("V2/x=2;y=[];", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E2", stepPair[0]); - assertEquals("V2/x=3;y=[];", stepPair[1]); - assertFalse(pathGenerator.hasNext()); + String[] stepPair; + stepPair = pathGenerator.getNext(); + assertEquals("E0", stepPair[0]); + assertEquals("V1/x=1;y=[];", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E1", stepPair[0]); + assertEquals("V2/x=2;y=[];", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E2", stepPair[0]); + assertEquals("V2/x=3;y=[];", stepPair[1]); + assertFalse(pathGenerator.hasNext()); - } + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMJavaScriptTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMJavaScriptTest.java index 110c290a..5a4814d3 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMJavaScriptTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMJavaScriptTest.java @@ -26,6 +26,7 @@ package org.graphwalker.core.generators; +import junit.framework.TestCase; import org.graphwalker.core.Util; import org.graphwalker.core.conditions.ReachedEdge; import org.graphwalker.core.conditions.ReachedVertex; @@ -34,97 +35,95 @@ import org.graphwalker.core.graph.Vertex; import org.graphwalker.core.machines.ExtendedFiniteStateMachine; -import junit.framework.TestCase; - public class A_StarPathGeneratorEFSMJavaScriptTest extends TestCase { - Graph graph; - Vertex start; - Vertex v1; - Vertex v2; - Edge e0; - Edge e1; - Edge e2; - Edge e3; + Graph graph; + Vertex start; + Vertex v1; + Vertex v2; + Edge e0; + Edge e1; + Edge e2; + Edge e3; - @Override - protected void setUp() throws Exception { - super.setUp(); - graph = new Graph(); + @Override + protected void setUp() throws Exception { + super.setUp(); + graph = new Graph(); - start = Util.addVertexToGraph(graph, "Start"); - v1 = Util.addVertexToGraph(graph, "V1"); - v2 = Util.addVertexToGraph(graph, "V2"); + start = Util.addVertexToGraph(graph, "Start"); + v1 = Util.addVertexToGraph(graph, "V1"); + v2 = Util.addVertexToGraph(graph, "V2"); - e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, "importClass(java.util.Vector);x=1;y=new Vector()"); - e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, "x=2"); - e2 = Util.addEdgeToGraph(graph, v2, v2, "E2", null, "x<4", "x++"); - e3 = Util.addEdgeToGraph(graph, v2, v1, "E3", null, "y.size()<3", "y.add(x)"); - } + e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, "importClass(java.util.Vector);x=1;y=new Vector()"); + e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, "x=2"); + e2 = Util.addEdgeToGraph(graph, v2, v2, "E2", null, "x<4", "x++"); + e3 = Util.addEdgeToGraph(graph, v2, v1, "E3", null, "y.size()<3", "y.add(x)"); + } - @Override - protected void tearDown() throws Exception { - super.tearDown(); - graph = null; - start = v1 = v2 = null; - e0 = e1 = e2 = e3 = null; - } + @Override + protected void tearDown() throws Exception { + super.tearDown(); + graph = null; + start = v1 = v2 = null; + e0 = e1 = e2 = e3 = null; + } - public void test_EFSM_StateStop() throws InterruptedException { - PathGenerator pathGenerator = new A_StarPathGenerator(new ReachedVertex("V1/y=\\[2.0, 3.0, 3.0\\];x=3.0;")); - ExtendedFiniteStateMachine machine = new ExtendedFiniteStateMachine(true); - machine.setModel(graph); - pathGenerator.setMachine(machine); + public void test_EFSM_StateStop() throws InterruptedException { + PathGenerator pathGenerator = new A_StarPathGenerator(new ReachedVertex("V1/y=\\[2.0, 3.0, 3.0\\];x=3.0;")); + ExtendedFiniteStateMachine machine = new ExtendedFiniteStateMachine(true); + machine.setModel(graph); + pathGenerator.setMachine(machine); - String[] stepPair; - stepPair = pathGenerator.getNext(); - assertEquals("E0", stepPair[0]); - assertEquals("V1/y=[];x=1.0;", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E1", stepPair[0]); - assertEquals("V2/y=[];x=2.0;", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E3", stepPair[0]); - assertEquals("V1/y=[2.0];x=2.0;", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E1", stepPair[0]); - assertEquals("V2/y=[2.0];x=2.0;", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E2", stepPair[0]); - assertEquals("V2/y=[2.0];x=3.0;", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E3", stepPair[0]); - assertEquals("V1/y=[2.0, 3.0];x=3.0;", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E1", stepPair[0]); - assertEquals("V2/y=[2.0, 3.0];x=2.0;", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E2", stepPair[0]); - assertEquals("V2/y=[2.0, 3.0];x=3.0;", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E3", stepPair[0]); - assertEquals("V1/y=[2.0, 3.0, 3.0];x=3.0;", stepPair[1]); - assertFalse(pathGenerator.hasNext()); + String[] stepPair; + stepPair = pathGenerator.getNext(); + assertEquals("E0", stepPair[0]); + assertEquals("V1/y=[];x=1.0;", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E1", stepPair[0]); + assertEquals("V2/y=[];x=2.0;", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E3", stepPair[0]); + assertEquals("V1/y=[2.0];x=2.0;", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E1", stepPair[0]); + assertEquals("V2/y=[2.0];x=2.0;", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E2", stepPair[0]); + assertEquals("V2/y=[2.0];x=3.0;", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E3", stepPair[0]); + assertEquals("V1/y=[2.0, 3.0];x=3.0;", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E1", stepPair[0]); + assertEquals("V2/y=[2.0, 3.0];x=2.0;", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E2", stepPair[0]); + assertEquals("V2/y=[2.0, 3.0];x=3.0;", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E3", stepPair[0]); + assertEquals("V1/y=[2.0, 3.0, 3.0];x=3.0;", stepPair[1]); + assertFalse(pathGenerator.hasNext()); - } + } - public void test_EFSM_EdgeStop() throws InterruptedException { - PathGenerator pathGenerator = new A_StarPathGenerator(new ReachedEdge("E2")); - ExtendedFiniteStateMachine machine = new ExtendedFiniteStateMachine(true); - machine.setModel(graph); - pathGenerator.setMachine(machine); + public void test_EFSM_EdgeStop() throws InterruptedException { + PathGenerator pathGenerator = new A_StarPathGenerator(new ReachedEdge("E2")); + ExtendedFiniteStateMachine machine = new ExtendedFiniteStateMachine(true); + machine.setModel(graph); + pathGenerator.setMachine(machine); - String[] stepPair; - stepPair = pathGenerator.getNext(); - assertEquals("E0", stepPair[0]); - assertEquals("V1/y=[];x=1.0;", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E1", stepPair[0]); - assertEquals("V2/y=[];x=2.0;", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E2", stepPair[0]); - assertEquals("V2/y=[];x=3.0;", stepPair[1]); - assertFalse(pathGenerator.hasNext()); + String[] stepPair; + stepPair = pathGenerator.getNext(); + assertEquals("E0", stepPair[0]); + assertEquals("V1/y=[];x=1.0;", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E1", stepPair[0]); + assertEquals("V2/y=[];x=2.0;", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E2", stepPair[0]); + assertEquals("V2/y=[];x=3.0;", stepPair[1]); + assertFalse(pathGenerator.hasNext()); - } + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorFSMTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorFSMTest.java index 117b21ce..7ae8f8b3 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorFSMTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorFSMTest.java @@ -26,6 +26,7 @@ package org.graphwalker.core.generators; +import junit.framework.TestCase; import org.graphwalker.core.Util; import org.graphwalker.core.conditions.ReachedEdge; import org.graphwalker.core.conditions.ReachedVertex; @@ -34,74 +35,72 @@ import org.graphwalker.core.graph.Vertex; import org.graphwalker.core.machines.FiniteStateMachine; -import junit.framework.TestCase; - public class A_StarPathGeneratorFSMTest extends TestCase { - Graph graph; - Vertex start; - Vertex v1; - Vertex v2; - Edge e0; - Edge e1; - Edge e2; - Edge e3; + Graph graph; + Vertex start; + Vertex v1; + Vertex v2; + Edge e0; + Edge e1; + Edge e2; + Edge e3; - @Override - protected void setUp() throws Exception { - super.setUp(); - graph = new Graph(); + @Override + protected void setUp() throws Exception { + super.setUp(); + graph = new Graph(); - start = Util.addVertexToGraph(graph, "Start"); - v1 = Util.addVertexToGraph(graph, "V1"); - v2 = Util.addVertexToGraph(graph, "V2"); + start = Util.addVertexToGraph(graph, "Start"); + v1 = Util.addVertexToGraph(graph, "V1"); + v2 = Util.addVertexToGraph(graph, "V2"); - e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, "importClass(java.util.Vector);x=1;y=new Vector()"); - e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, "x=2"); - e2 = Util.addEdgeToGraph(graph, v2, v2, "E2", null, "x<4", "x++"); - e3 = Util.addEdgeToGraph(graph, v2, v1, "E3", null, "y.size()<3", "y.add(x)"); - } + e0 = Util.addEdgeToGraph(graph, start, v1, "E0", null, null, "importClass(java.util.Vector);x=1;y=new Vector()"); + e1 = Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, "x=2"); + e2 = Util.addEdgeToGraph(graph, v2, v2, "E2", null, "x<4", "x++"); + e3 = Util.addEdgeToGraph(graph, v2, v1, "E3", null, "y.size()<3", "y.add(x)"); + } - @Override - protected void tearDown() throws Exception { - super.tearDown(); - graph = null; - start = v1 = v2 = null; - e0 = e1 = e2 = e3 = null; - } + @Override + protected void tearDown() throws Exception { + super.tearDown(); + graph = null; + start = v1 = v2 = null; + e0 = e1 = e2 = e3 = null; + } - public void test_FSM_StateStop() throws InterruptedException { - PathGenerator pathGenerator = new A_StarPathGenerator(new ReachedVertex("V2")); - FiniteStateMachine fsm = new FiniteStateMachine(); - fsm.setModel(graph); - pathGenerator.setMachine(fsm); + public void test_FSM_StateStop() throws InterruptedException { + PathGenerator pathGenerator = new A_StarPathGenerator(new ReachedVertex("V2")); + FiniteStateMachine fsm = new FiniteStateMachine(); + fsm.setModel(graph); + pathGenerator.setMachine(fsm); - String[] stepPair; - stepPair = pathGenerator.getNext(); - assertEquals("E0", stepPair[0]); - assertEquals("V1", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E1", stepPair[0]); - assertEquals("V2", stepPair[1]); - assertFalse(pathGenerator.hasNext()); - } + String[] stepPair; + stepPair = pathGenerator.getNext(); + assertEquals("E0", stepPair[0]); + assertEquals("V1", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E1", stepPair[0]); + assertEquals("V2", stepPair[1]); + assertFalse(pathGenerator.hasNext()); + } - public void test_FSM_EdgeStop() throws InterruptedException { - PathGenerator pathGenerator = new A_StarPathGenerator(new ReachedEdge("E2")); - FiniteStateMachine fsm = new FiniteStateMachine(); - fsm.setModel(graph); - pathGenerator.setMachine(fsm); + public void test_FSM_EdgeStop() throws InterruptedException { + PathGenerator pathGenerator = new A_StarPathGenerator(new ReachedEdge("E2")); + FiniteStateMachine fsm = new FiniteStateMachine(); + fsm.setModel(graph); + pathGenerator.setMachine(fsm); - String[] stepPair; - stepPair = pathGenerator.getNext(); - assertEquals("E0", stepPair[0]); - assertEquals("V1", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E1", stepPair[0]); - assertEquals("V2", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("E2", stepPair[0]); - assertEquals("V2", stepPair[1]); - assertFalse(pathGenerator.hasNext()); - } + String[] stepPair; + stepPair = pathGenerator.getNext(); + assertEquals("E0", stepPair[0]); + assertEquals("V1", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E1", stepPair[0]); + assertEquals("V2", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("E2", stepPair[0]); + assertEquals("V2", stepPair[1]); + assertFalse(pathGenerator.hasNext()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/AllPathPermutationsGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/AllPathPermutationsGeneratorTest.java index d1263875..bdefe513 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/AllPathPermutationsGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/AllPathPermutationsGeneratorTest.java @@ -26,8 +26,6 @@ package org.graphwalker.core.generators; -import junit.framework.TestCase; - import org.apache.log4j.Logger; import org.graphwalker.core.Util; import org.graphwalker.core.conditions.TestCaseLength; @@ -38,28 +36,28 @@ public class AllPathPermutationsGeneratorTest { //extends TestCase { - private final Logger logger = Util.setupLogger(AllPathPermutationsGeneratorTest.class); + private final Logger logger = Util.setupLogger(AllPathPermutationsGeneratorTest.class); - public void test_AllPathPermutationsGeneratior() throws StopConditionException, InterruptedException { - logger.info("TEST: test_AllPathPermutationsGeneration"); - logger.info("======================================================================="); - GraphML gml = new GraphML(); - gml.load("graphml/permutations/simple.graphml"); - FiniteStateMachine FSM = new FiniteStateMachine(); - FSM.setModel(gml.getModel()); - FSM.setWeighted(false); + public void test_AllPathPermutationsGeneratior() throws StopConditionException, InterruptedException { + logger.info("TEST: test_AllPathPermutationsGeneration"); + logger.info("======================================================================="); + GraphML gml = new GraphML(); + gml.load("graphml/permutations/simple.graphml"); + FiniteStateMachine FSM = new FiniteStateMachine(); + FSM.setModel(gml.getModel()); + FSM.setWeighted(false); - PathGenerator pathGenerator = new AllPathPermutationsGenerator(new TestCaseLength(42)); - pathGenerator.setMachine(FSM); + PathGenerator pathGenerator = new AllPathPermutationsGenerator(new TestCaseLength(42)); + pathGenerator.setMachine(FSM); - while (pathGenerator.hasNext()) { - String[] stepPair = pathGenerator.getNext(); - int stats[] = FSM.getStatistics(); - int ec = 100 * stats[1] / stats[0]; + while (pathGenerator.hasNext()) { + String[] stepPair = pathGenerator.getNext(); + int stats[] = FSM.getStatistics(); + int ec = 100 * stats[1] / stats[0]; - logger.debug("call( " + stepPair[0] + " ) then verify( " + stepPair[1] + " ) --> Edge coverage @ " + ec + "%"); - } + logger.debug("call( " + stepPair[0] + " ) then verify( " + stepPair[1] + " ) --> Edge coverage @ " + ec + "%"); + } Assert.assertEquals(3, ((AllPathPermutationsGenerator) pathGenerator).getDepth()); - logger.debug("=============================="); - } + logger.debug("=============================="); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/CodeGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/CodeGeneratorTest.java index 59027684..6957769c 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/CodeGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/CodeGeneratorTest.java @@ -26,6 +26,7 @@ package org.graphwalker.core.generators; +import junit.framework.TestCase; import org.apache.log4j.Logger; import org.graphwalker.core.Util; import org.graphwalker.core.graph.Edge; @@ -33,73 +34,71 @@ import org.graphwalker.core.graph.Vertex; import org.graphwalker.core.machines.FiniteStateMachine; -import junit.framework.TestCase; - public class CodeGeneratorTest extends TestCase { - Logger logger = Util.setupLogger(CodeGeneratorTest.class); - - public void testGetNext() { - Graph graph = new Graph(); - - Vertex v1 = new Vertex(); - v1.setIndexKey(new Integer(1)); - v1.setLabelKey("Start"); - graph.addVertex(v1); - - Vertex v2 = new Vertex(); - v2.setIndexKey(new Integer(2)); - v2.setLabelKey("V2"); - graph.addVertex(v2); - - Edge edge = new Edge(); - graph.addEdge(edge, v1, v2); - edge.setIndexKey(new Integer(3)); - edge.setLabelKey("E1"); - - FiniteStateMachine FSM = new FiniteStateMachine(); - FSM.setModel(graph); - - String[] template = { "", "{EDGE_VERTEX}: {LABEL}", "" }; - CodeGenerator generator = new CodeGenerator(); - generator.setTemplate(template); - generator.setMachine(FSM); - - assertEquals("Edge: E1", generator.getNext()[0]); - assertEquals("Vertex: V2", generator.getNext()[0]); - assertFalse(generator.hasNext()); - } - - public void testHeaderFooter() { - Graph graph = new Graph(); - - Vertex v1 = new Vertex(); - v1.setIndexKey(new Integer(1)); - v1.setLabelKey("Start"); - graph.addVertex(v1); - - Vertex v2 = new Vertex(); - v2.setIndexKey(new Integer(2)); - v2.setLabelKey("V2"); - graph.addVertex(v2); - - Edge edge = new Edge(); - graph.addEdge(edge, v1, v2); - edge.setIndexKey(new Integer(3)); - edge.setLabelKey("E1"); - - FiniteStateMachine FSM = new FiniteStateMachine(); - FSM.setModel(graph); - - String[] template = { "This is the HEADER", "{EDGE_VERTEX}: {LABEL}", "This is the FOOTER" }; - CodeGenerator generator = new CodeGenerator(); - generator.setTemplate(template); - generator.setMachine(FSM); - - StringBuffer str = new StringBuffer(); - while (generator.hasNext()) { - str.append(generator.getNext()[0]); - } - System.out.println(str.toString()); - } + Logger logger = Util.setupLogger(CodeGeneratorTest.class); + + public void testGetNext() { + Graph graph = new Graph(); + + Vertex v1 = new Vertex(); + v1.setIndexKey(new Integer(1)); + v1.setLabelKey("Start"); + graph.addVertex(v1); + + Vertex v2 = new Vertex(); + v2.setIndexKey(new Integer(2)); + v2.setLabelKey("V2"); + graph.addVertex(v2); + + Edge edge = new Edge(); + graph.addEdge(edge, v1, v2); + edge.setIndexKey(new Integer(3)); + edge.setLabelKey("E1"); + + FiniteStateMachine FSM = new FiniteStateMachine(); + FSM.setModel(graph); + + String[] template = {"", "{EDGE_VERTEX}: {LABEL}", ""}; + CodeGenerator generator = new CodeGenerator(); + generator.setTemplate(template); + generator.setMachine(FSM); + + assertEquals("Edge: E1", generator.getNext()[0]); + assertEquals("Vertex: V2", generator.getNext()[0]); + assertFalse(generator.hasNext()); + } + + public void testHeaderFooter() { + Graph graph = new Graph(); + + Vertex v1 = new Vertex(); + v1.setIndexKey(new Integer(1)); + v1.setLabelKey("Start"); + graph.addVertex(v1); + + Vertex v2 = new Vertex(); + v2.setIndexKey(new Integer(2)); + v2.setLabelKey("V2"); + graph.addVertex(v2); + + Edge edge = new Edge(); + graph.addEdge(edge, v1, v2); + edge.setIndexKey(new Integer(3)); + edge.setLabelKey("E1"); + + FiniteStateMachine FSM = new FiniteStateMachine(); + FSM.setModel(graph); + + String[] template = {"This is the HEADER", "{EDGE_VERTEX}: {LABEL}", "This is the FOOTER"}; + CodeGenerator generator = new CodeGenerator(); + generator.setTemplate(template); + generator.setMachine(FSM); + + StringBuffer str = new StringBuffer(); + while (generator.hasNext()) { + str.append(generator.getNext()[0]); + } + System.out.println(str.toString()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/CombinedPathGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/CombinedPathGeneratorTest.java index 8eff9bb9..8b042ab1 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/CombinedPathGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/CombinedPathGeneratorTest.java @@ -25,68 +25,66 @@ */ /** - * + * */ package org.graphwalker.core.generators; +import junit.framework.TestCase; import org.graphwalker.core.Util; import org.graphwalker.core.graph.Graph; import org.graphwalker.core.graph.Vertex; import org.graphwalker.core.machines.FiniteStateMachine; -import junit.framework.TestCase; - /** * @author Johan Tejle - * */ public class CombinedPathGeneratorTest extends TestCase { - Graph graph; + Graph graph; - /* - * (non-Javadoc) - * - * @see junit.framework.TestCase#setUp() - */ - @Override - protected void setUp() throws Exception { - super.setUp(); + /* + * (non-Javadoc) + * + * @see junit.framework.TestCase#setUp() + */ + @Override + protected void setUp() throws Exception { + super.setUp(); - graph = new Graph(); + graph = new Graph(); - Vertex v1 = Util.addVertexToGraph(graph, "Start"); - Vertex v2 = Util.addVertexToGraph(graph, "V1"); - Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); - } + Vertex v1 = Util.addVertexToGraph(graph, "Start"); + Vertex v2 = Util.addVertexToGraph(graph, "V1"); + Util.addEdgeToGraph(graph, v1, v2, "E1", null, null, null); + } - public void testCodeList() throws InterruptedException { - FiniteStateMachine FSM = new FiniteStateMachine(); - FSM.setModel(graph); + public void testCodeList() throws InterruptedException { + FiniteStateMachine FSM = new FiniteStateMachine(); + FSM.setModel(graph); - String[] template = { "", "{EDGE_VERTEX}: {LABEL}", "" }; - CodeGenerator generator1 = new CodeGenerator(); - generator1.setTemplate(template); - ListGenerator generator2 = new ListGenerator(); + String[] template = {"", "{EDGE_VERTEX}: {LABEL}", ""}; + CodeGenerator generator1 = new CodeGenerator(); + generator1.setTemplate(template); + ListGenerator generator2 = new ListGenerator(); - CombinedPathGenerator pathGenerator = new CombinedPathGenerator(); - pathGenerator.addPathGenerator(generator1); - pathGenerator.addPathGenerator(generator2); - pathGenerator.setMachine(FSM); + CombinedPathGenerator pathGenerator = new CombinedPathGenerator(); + pathGenerator.addPathGenerator(generator1); + pathGenerator.addPathGenerator(generator2); + pathGenerator.setMachine(FSM); - String[] stepPair; + String[] stepPair; - stepPair = pathGenerator.getNext(); - assertEquals("Edge: E1", stepPair[0]); - stepPair = pathGenerator.getNext(); - assertEquals("Vertex: V1", stepPair[0]); - stepPair = pathGenerator.getNext(); - assertEquals("E1", stepPair[0]); - assertEquals("Edge", stepPair[1]); - stepPair = pathGenerator.getNext(); - assertEquals("V1", stepPair[0]); - assertEquals("Vertex", stepPair[1]); - assertFalse(pathGenerator.hasNext()); + stepPair = pathGenerator.getNext(); + assertEquals("Edge: E1", stepPair[0]); + stepPair = pathGenerator.getNext(); + assertEquals("Vertex: V1", stepPair[0]); + stepPair = pathGenerator.getNext(); + assertEquals("E1", stepPair[0]); + assertEquals("Edge", stepPair[1]); + stepPair = pathGenerator.getNext(); + assertEquals("V1", stepPair[0]); + assertEquals("Vertex", stepPair[1]); + assertFalse(pathGenerator.hasNext()); - } + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/ListGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/ListGeneratorTest.java index 118683b1..b887bfda 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/ListGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/ListGeneratorTest.java @@ -26,6 +26,7 @@ package org.graphwalker.core.generators; +import junit.framework.TestCase; import org.apache.log4j.Logger; import org.graphwalker.core.Util; import org.graphwalker.core.graph.Edge; @@ -33,40 +34,38 @@ import org.graphwalker.core.graph.Vertex; import org.graphwalker.core.machines.FiniteStateMachine; -import junit.framework.TestCase; - public class ListGeneratorTest extends TestCase { - Logger logger = Util.setupLogger(ListGeneratorTest.class); + Logger logger = Util.setupLogger(ListGeneratorTest.class); - public void testGetNext() { - Graph graph = new Graph(); + public void testGetNext() { + Graph graph = new Graph(); - Vertex v1 = new Vertex(); - v1.setIndexKey(new Integer(1)); - v1.setLabelKey("Start"); - graph.addVertex(v1); + Vertex v1 = new Vertex(); + v1.setIndexKey(new Integer(1)); + v1.setLabelKey("Start"); + graph.addVertex(v1); - Vertex v2 = new Vertex(); - v2.setIndexKey(new Integer(2)); - v2.setLabelKey("V2"); - graph.addVertex(v2); + Vertex v2 = new Vertex(); + v2.setIndexKey(new Integer(2)); + v2.setLabelKey("V2"); + graph.addVertex(v2); - Edge edge = new Edge(); - edge.setIndexKey(new Integer(3)); - edge.setLabelKey("E1"); - graph.addEdge(edge, v1, v2); + Edge edge = new Edge(); + edge.setIndexKey(new Integer(3)); + edge.setLabelKey("E1"); + graph.addEdge(edge, v1, v2); - ListGenerator generator = new ListGenerator(); - FiniteStateMachine fsm = new FiniteStateMachine(); - fsm.setModel(graph); - generator.setMachine(fsm); + ListGenerator generator = new ListGenerator(); + FiniteStateMachine fsm = new FiniteStateMachine(); + fsm.setModel(graph); + generator.setMachine(fsm); - String[] s = generator.getNext(); - assertEquals("E1", s[0]); - assertEquals("Edge", s[1]); - s = generator.getNext(); - assertEquals("V2", s[0]); - assertEquals("Vertex", s[1]); - assertFalse(generator.hasNext()); - } + String[] s = generator.getNext(); + assertEquals("E1", s[0]); + assertEquals("Edge", s[1]); + s = generator.getNext(); + assertEquals("V2", s[0]); + assertEquals("Vertex", s[1]); + assertFalse(generator.hasNext()); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/RandomPathGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/RandomPathGeneratorTest.java index 15a7d749..f686c10d 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/RandomPathGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/RandomPathGeneratorTest.java @@ -26,6 +26,7 @@ package org.graphwalker.core.generators; +import junit.framework.TestCase; import org.apache.log4j.Logger; import org.graphwalker.core.Util; import org.graphwalker.core.conditions.EdgeCoverage; @@ -33,59 +34,57 @@ import org.graphwalker.core.io.GraphML; import org.graphwalker.core.machines.FiniteStateMachine; -import junit.framework.TestCase; - public class RandomPathGeneratorTest extends TestCase { - private Logger logger = Util.setupLogger(RandomPathGeneratorTest.class); + private Logger logger = Util.setupLogger(RandomPathGeneratorTest.class); - @Override - protected void setUp() throws Exception { - super.setUp(); - } + @Override + protected void setUp() throws Exception { + super.setUp(); + } - public void test_WeightedRandomGeneration() throws StopConditionException, InterruptedException { - logger.info("TEST: test_WeightedRandomGeneration"); - logger.info("======================================================================="); - GraphML gml = new GraphML(); - gml.load("graphml/weight/FSM.graphml"); - FiniteStateMachine FSM = new FiniteStateMachine(); - FSM.setModel(gml.getModel()); - FSM.setWeighted(true); + public void test_WeightedRandomGeneration() throws StopConditionException, InterruptedException { + logger.info("TEST: test_WeightedRandomGeneration"); + logger.info("======================================================================="); + GraphML gml = new GraphML(); + gml.load("graphml/weight/FSM.graphml"); + FiniteStateMachine FSM = new FiniteStateMachine(); + FSM.setModel(gml.getModel()); + FSM.setWeighted(true); - PathGenerator pathGenerator = new RandomPathGenerator(new EdgeCoverage(1.0)); - pathGenerator.setMachine(FSM); + PathGenerator pathGenerator = new RandomPathGenerator(new EdgeCoverage(1.0)); + pathGenerator.setMachine(FSM); - while (pathGenerator.hasNext()) { - String[] stepPair = pathGenerator.getNext(); + while (pathGenerator.hasNext()) { + String[] stepPair = pathGenerator.getNext(); - int stats[] = FSM.getStatistics(); - int ec = 100 * stats[1] / stats[0]; + int stats[] = FSM.getStatistics(); + int ec = 100 * stats[1] / stats[0]; - logger.debug("call( " + stepPair[0] + " ) then verify( " + stepPair[1] + " ) --> Edge coverage @ " + ec + "%"); - } - logger.debug("=============================="); - } + logger.debug("call( " + stepPair[0] + " ) then verify( " + stepPair[1] + " ) --> Edge coverage @ " + ec + "%"); + } + logger.debug("=============================="); + } - public void test_RandomGeneration() throws StopConditionException, InterruptedException { - logger.info("TEST: test_RandomGeneration"); - logger.info("======================================================================="); - GraphML gml = new GraphML(); - gml.load("graphml/weight/FSM.graphml"); - FiniteStateMachine FSM = new FiniteStateMachine(); - FSM.setModel(gml.getModel()); - FSM.setWeighted(false); - PathGenerator pathGenerator = new RandomPathGenerator(new EdgeCoverage(1.0)); - pathGenerator.setMachine(FSM); + public void test_RandomGeneration() throws StopConditionException, InterruptedException { + logger.info("TEST: test_RandomGeneration"); + logger.info("======================================================================="); + GraphML gml = new GraphML(); + gml.load("graphml/weight/FSM.graphml"); + FiniteStateMachine FSM = new FiniteStateMachine(); + FSM.setModel(gml.getModel()); + FSM.setWeighted(false); + PathGenerator pathGenerator = new RandomPathGenerator(new EdgeCoverage(1.0)); + pathGenerator.setMachine(FSM); - while (pathGenerator.hasNext()) { - String[] stepPair = pathGenerator.getNext(); + while (pathGenerator.hasNext()) { + String[] stepPair = pathGenerator.getNext(); - int stats[] = FSM.getStatistics(); - int ec = 100 * stats[1] / stats[0]; + int stats[] = FSM.getStatistics(); + int ec = 100 * stats[1] / stats[0]; - logger.debug("call( " + stepPair[0] + " ) then verify( " + stepPair[1] + " ) --> Edge coverage @ " + ec + "%"); - } - logger.debug("=============================="); - } + logger.debug("call( " + stepPair[0] + " ) then verify( " + stepPair[1] + " ) --> Edge coverage @ " + ec + "%"); + } + logger.debug("=============================="); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/io/GraphMLTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/io/GraphMLTest.java index bf595403..f7e78480 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/io/GraphMLTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/io/GraphMLTest.java @@ -26,416 +26,415 @@ package org.graphwalker.core.io; +import junit.framework.TestCase; import org.graphwalker.core.ModelBasedTesting; import org.graphwalker.core.graph.Edge; import org.graphwalker.core.graph.Graph; import org.graphwalker.core.graph.Vertex; -import junit.framework.TestCase; - public class GraphMLTest extends TestCase { - @Override - protected void setUp() throws Exception { - super.setUp(); - ModelBasedTesting.getInstance().reset(); - } - - public void testGraphNode() { - try { - GraphML modelHandler = new GraphML(); - modelHandler.load("graphml/multiple/switch/A.graphml"); - assertEquals(modelHandler.getModel().getVertexCount(), 5); - assertEquals(modelHandler.getModel().getEdgeCount(), 8); - assertEquals(modelHandler.getModel().getLabelKey(), "v_ClientNotRunning"); - - Vertex clientNotRunning = modelHandler.getModel().findVertex("v_ClientNotRunning"); - assertNotNull(clientNotRunning); - assertTrue(clientNotRunning.isGraphVertex()); - - Vertex whatsNew = modelHandler.getModel().findVertex("v_WhatsNew"); - assertNotNull(whatsNew); - assertFalse(whatsNew.isGraphVertex()); - - } catch (Exception e) { - System.out.println(e.getMessage()); - fail(e.getMessage()); - } - } - - public void testSwitchModelKeyWord() { - try { - GraphML modelHandler = new GraphML(); - modelHandler.load("graphml/multiple/switch/A.graphml"); - assertEquals(modelHandler.getModel().getVertexCount(), 5); - assertEquals(modelHandler.getModel().getEdgeCount(), 8); - assertEquals(modelHandler.getModel().getLabelKey(), "v_ClientNotRunning"); - - Vertex clientNotRunning = modelHandler.getModel().findVertex("v_ClientNotRunning"); - assertNotNull(clientNotRunning); - assertFalse(clientNotRunning.isSwitchModelKey()); - - Vertex whatsNew = modelHandler.getModel().findVertex("v_WhatsNew"); - assertNotNull(whatsNew); - assertTrue(whatsNew.isSwitchModelKey()); - - } catch (Exception e) { - System.out.println(e.getMessage()); - fail(e.getMessage()); - } - } - - // Test various types of efsm labels - public void testMergeFiles() { - try { - GraphML modelHandler = new GraphML(); - modelHandler.load("graphml/merging"); - assertEquals(modelHandler.getModel().getVertexCount(), 37); - assertEquals(modelHandler.getModel().getEdgeCount(), 92); - assertEquals(modelHandler.getModel().getLabelKey(), "v_A"); - } catch (Exception e) { - System.out.println(e.getMessage()); - fail(e.getMessage()); - } - } - - // Test various types of efsm labels - public void testMergeEFSM_Lables() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/efsm_lables/testMergeEFSM_Lables.graphml"); - } catch (Exception e) { - System.out.println(e.getMessage()); - fail(e.getMessage()); - } - } - - // Test merging and verifying that unique id's are created - public void testVerifyIds() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/test23"); - verifyIds(mbt.getGraph()); - } catch (Exception e) { - System.out.println(e.getMessage()); - fail(e.getMessage()); - } - } - - // Verify that mbt checks that subgraphs are unique. - public void testUniqueSubGraphs() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/test09"); - fail("Missing error message"); - } catch (RuntimeException e) { - String msg = e.getMessage(); - System.out.println(msg); - assertTrue(msg - .matches("Found 2 subgraphs using the same name: 'B', they are defined in files: '.*graphml.test09.(C|B).graphml', and :'.*graphml.test09.(B|C).graphml'")); - } - } - - // Verify that mbt reports and exits when an node without name is found - public void testEmptyVertexLabel() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/test10"); - fail("Missing error message"); - } catch (RuntimeException e) { - String msg = e.getMessage(); - System.out.println(msg); - assertTrue(msg.matches("Could not parse file: '.*test10.B\\.graphml'. Vertex is missing mandatory label")); - } - } - - // Verify that mbt reports and exits when a recursive subgraph situation - // emerges - public void testRecuresiveIncident() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/test11"); - fail("Missing error message"); - } catch (RuntimeException e) { - String msg = e.getMessage(); - System.out.println(msg); - assertTrue(msg.matches("Found a subgraph containing a duplicate vertex with name: 'C', in file: '.*test11.C\\.graphml'")); - } - } - - // Verify that mbt reports and exits when an edge containing a whitespace - // (tab) is found - public void testWhiteSpaceInEdgeLabel() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/test13"); - } catch (RuntimeException e) { - System.out.println(e.getMessage()); - fail(e.getMessage()); - } - } - - // Verify that mbt reports and exits when a vertex containing a whitespace - // (tab) is found - public void testWhiteSpaceInVertexLabel() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/test14"); - fail("Missing error message"); - } catch (RuntimeException e) { - String msg = e.getMessage(); - System.out.println(msg); - assertTrue(msg - .matches("Could not parse file: '.*graphml.test14.C\\.graphml'. Label of vertex: 'Containing a whitespace', containing whitespaces")); - } - } - - // Verify that a single graphml file with an edge coming from the START vertex - // with an empty label is catched. - public void testMainGraphWithStartVertexOutEdgeEmptyLabel() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/test15"); - fail("Missing error message"); - } catch (Exception e) { - String msg = e.getMessage(); - System.out.println(msg); - assertTrue(msg.matches("Did not find a Start vertex with an out edge with a label.")); - } - } - - // Verify that a file with 2 Start vertices is catched. Both Start vertices - // has edges with labels. - public void testTwoStartVerticesWithLabels() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/test17/test17.graphml"); - fail("Missing error message"); - } catch (Exception e) { - String msg = e.getMessage(); - System.out.println(msg); - assertTrue(msg.matches("Only one Start vertex can exist in one file, see file 'graphml/test17/test17.graphml'")); - } - } - - // Verify that a file with 2 Start vertices is catched. One edge has a label, - // the other has not. - public void testTwoStartVerticesOneLabel() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/test18/test18.graphml"); - fail("Missing error message"); - } catch (Exception e) { - String msg = e.getMessage(); - System.out.println(msg); - assertTrue(msg.matches("Only one Start vertex can exist in one file, see file 'graphml/test18/test18.graphml'")); - } - } - - // Verify that a file with 2 Start vertices is catched. Both edges has no - // labels. - public void testTwoStartVerticesNoLabel() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/test19/test19.graphml"); - fail("Missing error message"); - } catch (Exception e) { - String msg = e.getMessage(); - System.out.println(msg); - assertTrue(msg.matches("Only one Start vertex can exist in one file, see file 'graphml/test19/test19.graphml'")); - } - } - - // Verify that a file with 2 out edges from the Start vertex is catched. - public void testTwoOutEdgesFromStart() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/test20/test20.graphml"); - fail("Missing error message"); - } catch (Exception e) { - String msg = e.getMessage(); - System.out.println(msg); - assertTrue(msg.matches("A Start vertex can only have one out edge, look in file: graphml/test20/test20.graphml")); - } - } - - // Verify that merging of subgraphs works for graphml/mergeSubgraphs_01. - public void test_mergeSubgraphs_01() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/mergeSubgraphs_01"); - assertTrue(mbt.getGraph().getVertices().size() == 6); - assertTrue(mbt.getGraph().getEdges().size() == 16); - verifyIds(mbt.getGraph()); - } catch (Exception e) { - System.out.println(e.getMessage()); - fail(e.getMessage()); - } - } - - // Verify that merging of subgraphs works for graphml/mergeSubgraphs_02. - public void test_mergeSubgraphs_02() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/mergeSubgraphs_02"); - assertTrue(mbt.getGraph().getVertices().size() == 16); - assertTrue(mbt.getGraph().getEdges().size() == 55); - verifyIds(mbt.getGraph()); - } catch (Exception e) { - System.out.println(e.getMessage()); - fail(e.getMessage()); - } - } - - // Test merging of 2 simple graphs - public void testMergeSimpleGraph() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/test01"); - assertTrue(mbt.getGraph().getEdges().size() == 9); - assertTrue(mbt.getGraph().getVertices().size() == 7); - verifyIds(mbt.getGraph()); - } catch (Exception e) { - System.out.println(e.getMessage()); - fail(e.getMessage()); - } - } - - // Test merging of 2 simple graphs, with nodes containing key word NO_MERGE - public void testMergeSimpleGraph_Keyword_NO_MERGE() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/test02"); - assertTrue(mbt.getGraph().getEdges().size() == 11); - assertTrue(mbt.getGraph().getVertices().size() == 8); - verifyIds(mbt.getGraph()); - } catch (Exception e) { - System.out.println(e.getMessage()); - fail(e.getMessage()); - } - } - - // Test merging a folder consisting 162 graphs - public void xtestMergeLargeGraph() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/test03"); - assertTrue(mbt.getGraph().getEdges().size() == 1550); - assertTrue(mbt.getGraph().getVertices().size() == 788); - verifyIds(mbt.getGraph()); - } catch (Exception e) { - System.out.println(e.getMessage()); - fail(e.getMessage()); - } - } - - // Verify that a graph containing a Stop vertex is correctly merged. - public void testMergeSubGraphUsingStopVertex() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/test22"); - assertTrue(mbt.getGraph().getEdges().size() == 8); - assertTrue(mbt.getGraph().getVertices().size() == 8); - verifyIds(mbt.getGraph()); - } catch (Exception e) { - System.out.println(e.getMessage()); - fail(e.getMessage()); - } - } - - // Merging with subgraphs containing Stop vertices - public void testMergeSubGraphUsingStopVertices() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/test23"); - assertTrue(mbt.getGraph().getEdges().size() == 14); - assertTrue(mbt.getGraph().getVertices().size() == 9); - verifyIds(mbt.getGraph()); - } catch (Exception e) { - System.out.println(e.getMessage()); - fail(e.getMessage()); - } - } - - // - public void testGetDescriptionVertex() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/modelWithDescr.graphml"); - assertTrue(mbt.getGraph().findVertex("v_WithDescription").getDescriptionKey() - .equals("

    \nA very fine description in a vertex\n
")); - assertTrue(mbt.getGraph().findVertex("v_WithNoDescription").getDescriptionKey().isEmpty()); - } catch (Exception e) { - System.out.println(e.getMessage()); - fail(e.getMessage()); - } - } - - public void testGetDescriptionEdge() { - try { - ModelBasedTesting mbt = ModelBasedTesting.getInstance(); - mbt.readGraph("graphml/modelWithDescr.graphml"); - assertTrue(mbt.getGraph().findEdge("e_WithDescription").getDescriptionKey().equals("
    \nA very fine description in a edge\n
")); - assertTrue(mbt.getGraph().findEdge("e_WithNoDescription").getDescriptionKey().isEmpty()); - } catch (Exception e) { - System.out.println(e.getMessage()); - fail(e.getMessage()); - } - } - - // Verify that all vertices and edges has indexes, and that no duplicates - // exists. - private void verifyIds(Graph g) { - Object[] vertices1 = g.getVertices().toArray(); - for (int i = 0; i < vertices1.length; i++) { - Vertex v1 = (Vertex) vertices1[i]; - int hits = 0; - Integer index1 = v1.getIndexKey(); - Object[] vertices2 = g.getVertices().toArray(); - for (int j = 0; j < vertices1.length; j++) { - Vertex v2 = (Vertex) vertices2[j]; - Integer index2 = v2.getIndexKey(); - if (index1.intValue() == index2.intValue()) { - hits++; - } - } - assertTrue(hits == 1); - - Object[] edges = g.getEdges().toArray(); - for (int j = 0; j < edges.length; j++) { - Edge e = (Edge) edges[j]; - Integer index2 = e.getIndexKey(); - if (index1.intValue() == index2.intValue()) { - hits++; - } - } - assertTrue(hits == 1); - } - - Object[] edges1 = g.getEdges().toArray(); - for (int i = 0; i < edges1.length; i++) { - Edge e1 = (Edge) edges1[i]; - int hits = 0; - Integer index1 = e1.getIndexKey(); - Object[] edges2 = g.getEdges().toArray(); - for (int j = 0; j < edges2.length; j++) { - Edge e2 = (Edge) edges2[j]; - Integer index2 = e2.getIndexKey(); - if (index1.intValue() == index2.intValue()) { - hits++; - } - } - assertTrue(hits == 1); - - Object[] vertices2 = g.getVertices().toArray(); - for (int j = 0; j < vertices1.length; j++) { - Vertex v2 = (Vertex) vertices2[j]; - Integer index2 = v2.getIndexKey(); - if (index1.intValue() == index2.intValue()) { - hits++; - } - } - assertTrue(hits == 1); - } - } + @Override + protected void setUp() throws Exception { + super.setUp(); + ModelBasedTesting.getInstance().reset(); + } + + public void testGraphNode() { + try { + GraphML modelHandler = new GraphML(); + modelHandler.load("graphml/multiple/switch/A.graphml"); + assertEquals(modelHandler.getModel().getVertexCount(), 5); + assertEquals(modelHandler.getModel().getEdgeCount(), 8); + assertEquals(modelHandler.getModel().getLabelKey(), "v_ClientNotRunning"); + + Vertex clientNotRunning = modelHandler.getModel().findVertex("v_ClientNotRunning"); + assertNotNull(clientNotRunning); + assertTrue(clientNotRunning.isGraphVertex()); + + Vertex whatsNew = modelHandler.getModel().findVertex("v_WhatsNew"); + assertNotNull(whatsNew); + assertFalse(whatsNew.isGraphVertex()); + + } catch (Exception e) { + System.out.println(e.getMessage()); + fail(e.getMessage()); + } + } + + public void testSwitchModelKeyWord() { + try { + GraphML modelHandler = new GraphML(); + modelHandler.load("graphml/multiple/switch/A.graphml"); + assertEquals(modelHandler.getModel().getVertexCount(), 5); + assertEquals(modelHandler.getModel().getEdgeCount(), 8); + assertEquals(modelHandler.getModel().getLabelKey(), "v_ClientNotRunning"); + + Vertex clientNotRunning = modelHandler.getModel().findVertex("v_ClientNotRunning"); + assertNotNull(clientNotRunning); + assertFalse(clientNotRunning.isSwitchModelKey()); + + Vertex whatsNew = modelHandler.getModel().findVertex("v_WhatsNew"); + assertNotNull(whatsNew); + assertTrue(whatsNew.isSwitchModelKey()); + + } catch (Exception e) { + System.out.println(e.getMessage()); + fail(e.getMessage()); + } + } + + // Test various types of efsm labels + public void testMergeFiles() { + try { + GraphML modelHandler = new GraphML(); + modelHandler.load("graphml/merging"); + assertEquals(modelHandler.getModel().getVertexCount(), 37); + assertEquals(modelHandler.getModel().getEdgeCount(), 92); + assertEquals(modelHandler.getModel().getLabelKey(), "v_A"); + } catch (Exception e) { + System.out.println(e.getMessage()); + fail(e.getMessage()); + } + } + + // Test various types of efsm labels + public void testMergeEFSM_Lables() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/efsm_lables/testMergeEFSM_Lables.graphml"); + } catch (Exception e) { + System.out.println(e.getMessage()); + fail(e.getMessage()); + } + } + + // Test merging and verifying that unique id's are created + public void testVerifyIds() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/test23"); + verifyIds(mbt.getGraph()); + } catch (Exception e) { + System.out.println(e.getMessage()); + fail(e.getMessage()); + } + } + + // Verify that mbt checks that subgraphs are unique. + public void testUniqueSubGraphs() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/test09"); + fail("Missing error message"); + } catch (RuntimeException e) { + String msg = e.getMessage(); + System.out.println(msg); + assertTrue(msg + .matches("Found 2 subgraphs using the same name: 'B', they are defined in files: '.*graphml.test09.(C|B).graphml', and :'.*graphml.test09.(B|C).graphml'")); + } + } + + // Verify that mbt reports and exits when an node without name is found + public void testEmptyVertexLabel() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/test10"); + fail("Missing error message"); + } catch (RuntimeException e) { + String msg = e.getMessage(); + System.out.println(msg); + assertTrue(msg.matches("Could not parse file: '.*test10.B\\.graphml'. Vertex is missing mandatory label")); + } + } + + // Verify that mbt reports and exits when a recursive subgraph situation + // emerges + public void testRecuresiveIncident() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/test11"); + fail("Missing error message"); + } catch (RuntimeException e) { + String msg = e.getMessage(); + System.out.println(msg); + assertTrue(msg.matches("Found a subgraph containing a duplicate vertex with name: 'C', in file: '.*test11.C\\.graphml'")); + } + } + + // Verify that mbt reports and exits when an edge containing a whitespace + // (tab) is found + public void testWhiteSpaceInEdgeLabel() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/test13"); + } catch (RuntimeException e) { + System.out.println(e.getMessage()); + fail(e.getMessage()); + } + } + + // Verify that mbt reports and exits when a vertex containing a whitespace + // (tab) is found + public void testWhiteSpaceInVertexLabel() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/test14"); + fail("Missing error message"); + } catch (RuntimeException e) { + String msg = e.getMessage(); + System.out.println(msg); + assertTrue(msg + .matches("Could not parse file: '.*graphml.test14.C\\.graphml'. Label of vertex: 'Containing a whitespace', containing whitespaces")); + } + } + + // Verify that a single graphml file with an edge coming from the START vertex + // with an empty label is catched. + public void testMainGraphWithStartVertexOutEdgeEmptyLabel() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/test15"); + fail("Missing error message"); + } catch (Exception e) { + String msg = e.getMessage(); + System.out.println(msg); + assertTrue(msg.matches("Did not find a Start vertex with an out edge with a label.")); + } + } + + // Verify that a file with 2 Start vertices is catched. Both Start vertices + // has edges with labels. + public void testTwoStartVerticesWithLabels() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/test17/test17.graphml"); + fail("Missing error message"); + } catch (Exception e) { + String msg = e.getMessage(); + System.out.println(msg); + assertTrue(msg.matches("Only one Start vertex can exist in one file, see file 'graphml/test17/test17.graphml'")); + } + } + + // Verify that a file with 2 Start vertices is catched. One edge has a label, + // the other has not. + public void testTwoStartVerticesOneLabel() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/test18/test18.graphml"); + fail("Missing error message"); + } catch (Exception e) { + String msg = e.getMessage(); + System.out.println(msg); + assertTrue(msg.matches("Only one Start vertex can exist in one file, see file 'graphml/test18/test18.graphml'")); + } + } + + // Verify that a file with 2 Start vertices is catched. Both edges has no + // labels. + public void testTwoStartVerticesNoLabel() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/test19/test19.graphml"); + fail("Missing error message"); + } catch (Exception e) { + String msg = e.getMessage(); + System.out.println(msg); + assertTrue(msg.matches("Only one Start vertex can exist in one file, see file 'graphml/test19/test19.graphml'")); + } + } + + // Verify that a file with 2 out edges from the Start vertex is catched. + public void testTwoOutEdgesFromStart() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/test20/test20.graphml"); + fail("Missing error message"); + } catch (Exception e) { + String msg = e.getMessage(); + System.out.println(msg); + assertTrue(msg.matches("A Start vertex can only have one out edge, look in file: graphml/test20/test20.graphml")); + } + } + + // Verify that merging of subgraphs works for graphml/mergeSubgraphs_01. + public void test_mergeSubgraphs_01() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/mergeSubgraphs_01"); + assertTrue(mbt.getGraph().getVertices().size() == 6); + assertTrue(mbt.getGraph().getEdges().size() == 16); + verifyIds(mbt.getGraph()); + } catch (Exception e) { + System.out.println(e.getMessage()); + fail(e.getMessage()); + } + } + + // Verify that merging of subgraphs works for graphml/mergeSubgraphs_02. + public void test_mergeSubgraphs_02() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/mergeSubgraphs_02"); + assertTrue(mbt.getGraph().getVertices().size() == 16); + assertTrue(mbt.getGraph().getEdges().size() == 55); + verifyIds(mbt.getGraph()); + } catch (Exception e) { + System.out.println(e.getMessage()); + fail(e.getMessage()); + } + } + + // Test merging of 2 simple graphs + public void testMergeSimpleGraph() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/test01"); + assertTrue(mbt.getGraph().getEdges().size() == 9); + assertTrue(mbt.getGraph().getVertices().size() == 7); + verifyIds(mbt.getGraph()); + } catch (Exception e) { + System.out.println(e.getMessage()); + fail(e.getMessage()); + } + } + + // Test merging of 2 simple graphs, with nodes containing key word NO_MERGE + public void testMergeSimpleGraph_Keyword_NO_MERGE() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/test02"); + assertTrue(mbt.getGraph().getEdges().size() == 11); + assertTrue(mbt.getGraph().getVertices().size() == 8); + verifyIds(mbt.getGraph()); + } catch (Exception e) { + System.out.println(e.getMessage()); + fail(e.getMessage()); + } + } + + // Test merging a folder consisting 162 graphs + public void xtestMergeLargeGraph() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/test03"); + assertTrue(mbt.getGraph().getEdges().size() == 1550); + assertTrue(mbt.getGraph().getVertices().size() == 788); + verifyIds(mbt.getGraph()); + } catch (Exception e) { + System.out.println(e.getMessage()); + fail(e.getMessage()); + } + } + + // Verify that a graph containing a Stop vertex is correctly merged. + public void testMergeSubGraphUsingStopVertex() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/test22"); + assertTrue(mbt.getGraph().getEdges().size() == 8); + assertTrue(mbt.getGraph().getVertices().size() == 8); + verifyIds(mbt.getGraph()); + } catch (Exception e) { + System.out.println(e.getMessage()); + fail(e.getMessage()); + } + } + + // Merging with subgraphs containing Stop vertices + public void testMergeSubGraphUsingStopVertices() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/test23"); + assertTrue(mbt.getGraph().getEdges().size() == 14); + assertTrue(mbt.getGraph().getVertices().size() == 9); + verifyIds(mbt.getGraph()); + } catch (Exception e) { + System.out.println(e.getMessage()); + fail(e.getMessage()); + } + } + + // + public void testGetDescriptionVertex() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/modelWithDescr.graphml"); + assertTrue(mbt.getGraph().findVertex("v_WithDescription").getDescriptionKey() + .equals("
    \nA very fine description in a vertex\n
")); + assertTrue(mbt.getGraph().findVertex("v_WithNoDescription").getDescriptionKey().isEmpty()); + } catch (Exception e) { + System.out.println(e.getMessage()); + fail(e.getMessage()); + } + } + + public void testGetDescriptionEdge() { + try { + ModelBasedTesting mbt = ModelBasedTesting.getInstance(); + mbt.readGraph("graphml/modelWithDescr.graphml"); + assertTrue(mbt.getGraph().findEdge("e_WithDescription").getDescriptionKey().equals("
    \nA very fine description in a edge\n
")); + assertTrue(mbt.getGraph().findEdge("e_WithNoDescription").getDescriptionKey().isEmpty()); + } catch (Exception e) { + System.out.println(e.getMessage()); + fail(e.getMessage()); + } + } + + // Verify that all vertices and edges has indexes, and that no duplicates + // exists. + private void verifyIds(Graph g) { + Object[] vertices1 = g.getVertices().toArray(); + for (int i = 0; i < vertices1.length; i++) { + Vertex v1 = (Vertex) vertices1[i]; + int hits = 0; + Integer index1 = v1.getIndexKey(); + Object[] vertices2 = g.getVertices().toArray(); + for (int j = 0; j < vertices1.length; j++) { + Vertex v2 = (Vertex) vertices2[j]; + Integer index2 = v2.getIndexKey(); + if (index1.intValue() == index2.intValue()) { + hits++; + } + } + assertTrue(hits == 1); + + Object[] edges = g.getEdges().toArray(); + for (int j = 0; j < edges.length; j++) { + Edge e = (Edge) edges[j]; + Integer index2 = e.getIndexKey(); + if (index1.intValue() == index2.intValue()) { + hits++; + } + } + assertTrue(hits == 1); + } + + Object[] edges1 = g.getEdges().toArray(); + for (int i = 0; i < edges1.length; i++) { + Edge e1 = (Edge) edges1[i]; + int hits = 0; + Integer index1 = e1.getIndexKey(); + Object[] edges2 = g.getEdges().toArray(); + for (int j = 0; j < edges2.length; j++) { + Edge e2 = (Edge) edges2[j]; + Integer index2 = e2.getIndexKey(); + if (index1.intValue() == index2.intValue()) { + hits++; + } + } + assertTrue(hits == 1); + + Object[] vertices2 = g.getVertices().toArray(); + for (int j = 0; j < vertices1.length; j++) { + Vertex v2 = (Vertex) vertices2[j]; + Integer index2 = v2.getIndexKey(); + if (index1.intValue() == index2.intValue()) { + hits++; + } + } + assertTrue(hits == 1); + } + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/multiple/ModelHandlerTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/ModelHandlerTest.java index fd485186..91889b87 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/multiple/ModelHandlerTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/ModelHandlerTest.java @@ -27,138 +27,138 @@ import org.apache.log4j.Logger; import org.graphwalker.core.Util; -import org.junit.Ignore; -import org.junit.Test; -import static org.junit.Assert.*; - import org.graphwalker.core.conditions.EdgeCoverage; import org.graphwalker.core.conditions.NeverCondition; import org.graphwalker.core.conditions.ReachedVertex; import org.graphwalker.core.generators.RandomPathGenerator; import org.graphwalker.core.multipleModels.ModelAPI; import org.graphwalker.core.multipleModels.ModelHandler; +import org.junit.Ignore; +import org.junit.Test; + +import static org.junit.Assert.*; public class ModelHandlerTest { - static Logger logger = Util.setupLogger(ModelHandlerTest.class); - - @Test - public void contructor() throws Exception { - ModelHandler modelhandler = new ModelHandler(); - assertNotNull(modelhandler); - assertNotNull(modelhandler.getModels()); - } - - @Test - public void addModels() throws Exception { - ModelHandler modelhandler = new ModelHandler(); - modelhandler.add("A", new ModelAPI("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator(new NeverCondition()), false)); - assertTrue(modelhandler.getModels().size() == 1); - modelhandler.add("B", new ModelAPI("graphml/multiple/switch/B.graphml", true, new RandomPathGenerator(new NeverCondition()), false)); - assertTrue(modelhandler.getModels().size() == 2); - } - - @Test(expected = IllegalArgumentException.class) - public void addDuplicateNameModels() throws Exception { - ModelHandler modelhandler = new ModelHandler(); - modelhandler.add("A", new ModelAPI("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator(new NeverCondition()), false)); - modelhandler.add("A", new ModelAPI("graphml/multiple/switch/B.graphml", true, new RandomPathGenerator(new NeverCondition()), false)); - } - - @Test - public void removeModel() throws Exception { - ModelHandler modelhandler = new ModelHandler(); - modelhandler.add("A", new ModelAPI("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator(new NeverCondition()), false)); - modelhandler.remove(0); - assertTrue(modelhandler.getModels().isEmpty()); - } - - @Test(expected = IllegalArgumentException.class) - public void executeIncorrectName() throws Exception { - ModelHandler modelhandler = new ModelHandler(); - modelhandler.add("A", new ModelAPI("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator(new NeverCondition()), false)); - modelhandler.execute("a"); - } - - @Test - public void executeSingleModel() throws Exception { - ModelHandler modelhandler = new ModelHandler(); - modelhandler.add("A", new Model_A_API("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); - modelhandler.execute("A"); - assertTrue(modelhandler.isAllModelsDone()); - } - - @Test - public void executeTwoModel() throws Exception { - ModelHandler modelhandler = new ModelHandler(); - modelhandler.add("A", new Model_A_API("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); - modelhandler.add("B", new Model_B_API("graphml/multiple/switch/B.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); - modelhandler.execute("A"); - assertTrue(modelhandler.isAllModelsDone()); - } - - @Test - public void executeTwoModelsCulDeSac() throws Exception { - ModelHandler modelhandler = new ModelHandler(); - - modelhandler.add("Login", new Model_A1_API("graphml/multiple/switch/A1.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); - modelhandler.add("ExitClient", new Model_B1_API("graphml/multiple/switch/B1.graphml", true, new RandomPathGenerator(new EdgeCoverage( - 1.0)))); - - modelhandler.execute("Login"); - assertTrue(modelhandler.isAllModelsDone()); - } - - @Ignore - public void executeModelThatStops() throws Exception { - ModelHandler modelhandler = new ModelHandler(); - - modelhandler.add("A", new Model_A_API("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator( - new ReachedVertex("v_WhatsNew")))); - modelhandler.add("B", new Model_B_API("graphml/multiple/switch/B.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); - - modelhandler.execute("A"); - assertTrue(modelhandler.isAllModelsDone()); - } - - @Test - public void executeThreeModel() throws Exception { - ModelHandler modelhandler = new ModelHandler(); - modelhandler.add("A", new Model_A_API("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator( - new ReachedVertex("v_WhatsNew")))); - modelhandler.add("B", new Model_B_API("graphml/multiple/switch/B.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); - modelhandler.add("C", new Model_C_API("graphml/multiple/switch/C.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); - modelhandler.execute("A"); - assertTrue(modelhandler.isAllModelsDone()); - } - - @Test - public void getStatistics() throws Exception { - ModelHandler modelhandler = new ModelHandler(); - modelhandler.add("A", new Model_A_API("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator( - new ReachedVertex("v_WhatsNew")))); - modelhandler.execute("A"); - assertTrue(modelhandler.isAllModelsDone()); - - String actualResult = modelhandler.getStatistics(); - assertTrue(actualResult, actualResult.contains("Statistics for A:")); - assertFalse(actualResult, actualResult.contains("Statistics for B:")); - assertFalse(actualResult, actualResult.contains("Statistics for C:")); - } - - @Test - public void getStatisticsMultipleModels() throws Exception { - ModelHandler modelhandler = new ModelHandler(); - modelhandler.add("A", new Model_A_API("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator( - new ReachedVertex("v_WhatsNew")))); - modelhandler.add("B", new Model_B_API("graphml/multiple/switch/B.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); - modelhandler.add("C", new Model_C_API("graphml/multiple/switch/C.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); - modelhandler.execute("A"); - assertTrue(modelhandler.isAllModelsDone()); - - String actualResult = modelhandler.getStatistics(); - assertTrue(actualResult, actualResult.contains("Statistics for A:")); - assertTrue(actualResult, actualResult.contains("Statistics for B:")); - assertTrue(actualResult, actualResult.contains("Statistics for C:")); - } + static Logger logger = Util.setupLogger(ModelHandlerTest.class); + + @Test + public void contructor() throws Exception { + ModelHandler modelhandler = new ModelHandler(); + assertNotNull(modelhandler); + assertNotNull(modelhandler.getModels()); + } + + @Test + public void addModels() throws Exception { + ModelHandler modelhandler = new ModelHandler(); + modelhandler.add("A", new ModelAPI("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator(new NeverCondition()), false)); + assertTrue(modelhandler.getModels().size() == 1); + modelhandler.add("B", new ModelAPI("graphml/multiple/switch/B.graphml", true, new RandomPathGenerator(new NeverCondition()), false)); + assertTrue(modelhandler.getModels().size() == 2); + } + + @Test(expected = IllegalArgumentException.class) + public void addDuplicateNameModels() throws Exception { + ModelHandler modelhandler = new ModelHandler(); + modelhandler.add("A", new ModelAPI("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator(new NeverCondition()), false)); + modelhandler.add("A", new ModelAPI("graphml/multiple/switch/B.graphml", true, new RandomPathGenerator(new NeverCondition()), false)); + } + + @Test + public void removeModel() throws Exception { + ModelHandler modelhandler = new ModelHandler(); + modelhandler.add("A", new ModelAPI("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator(new NeverCondition()), false)); + modelhandler.remove(0); + assertTrue(modelhandler.getModels().isEmpty()); + } + + @Test(expected = IllegalArgumentException.class) + public void executeIncorrectName() throws Exception { + ModelHandler modelhandler = new ModelHandler(); + modelhandler.add("A", new ModelAPI("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator(new NeverCondition()), false)); + modelhandler.execute("a"); + } + + @Test + public void executeSingleModel() throws Exception { + ModelHandler modelhandler = new ModelHandler(); + modelhandler.add("A", new Model_A_API("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); + modelhandler.execute("A"); + assertTrue(modelhandler.isAllModelsDone()); + } + + @Test + public void executeTwoModel() throws Exception { + ModelHandler modelhandler = new ModelHandler(); + modelhandler.add("A", new Model_A_API("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); + modelhandler.add("B", new Model_B_API("graphml/multiple/switch/B.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); + modelhandler.execute("A"); + assertTrue(modelhandler.isAllModelsDone()); + } + + @Test + public void executeTwoModelsCulDeSac() throws Exception { + ModelHandler modelhandler = new ModelHandler(); + + modelhandler.add("Login", new Model_A1_API("graphml/multiple/switch/A1.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); + modelhandler.add("ExitClient", new Model_B1_API("graphml/multiple/switch/B1.graphml", true, new RandomPathGenerator(new EdgeCoverage( + 1.0)))); + + modelhandler.execute("Login"); + assertTrue(modelhandler.isAllModelsDone()); + } + + @Ignore + public void executeModelThatStops() throws Exception { + ModelHandler modelhandler = new ModelHandler(); + + modelhandler.add("A", new Model_A_API("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator( + new ReachedVertex("v_WhatsNew")))); + modelhandler.add("B", new Model_B_API("graphml/multiple/switch/B.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); + + modelhandler.execute("A"); + assertTrue(modelhandler.isAllModelsDone()); + } + + @Test + public void executeThreeModel() throws Exception { + ModelHandler modelhandler = new ModelHandler(); + modelhandler.add("A", new Model_A_API("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator( + new ReachedVertex("v_WhatsNew")))); + modelhandler.add("B", new Model_B_API("graphml/multiple/switch/B.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); + modelhandler.add("C", new Model_C_API("graphml/multiple/switch/C.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); + modelhandler.execute("A"); + assertTrue(modelhandler.isAllModelsDone()); + } + + @Test + public void getStatistics() throws Exception { + ModelHandler modelhandler = new ModelHandler(); + modelhandler.add("A", new Model_A_API("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator( + new ReachedVertex("v_WhatsNew")))); + modelhandler.execute("A"); + assertTrue(modelhandler.isAllModelsDone()); + + String actualResult = modelhandler.getStatistics(); + assertTrue(actualResult, actualResult.contains("Statistics for A:")); + assertFalse(actualResult, actualResult.contains("Statistics for B:")); + assertFalse(actualResult, actualResult.contains("Statistics for C:")); + } + + @Test + public void getStatisticsMultipleModels() throws Exception { + ModelHandler modelhandler = new ModelHandler(); + modelhandler.add("A", new Model_A_API("graphml/multiple/switch/A.graphml", true, new RandomPathGenerator( + new ReachedVertex("v_WhatsNew")))); + modelhandler.add("B", new Model_B_API("graphml/multiple/switch/B.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); + modelhandler.add("C", new Model_C_API("graphml/multiple/switch/C.graphml", true, new RandomPathGenerator(new EdgeCoverage(1.0)))); + modelhandler.execute("A"); + assertTrue(modelhandler.isAllModelsDone()); + + String actualResult = modelhandler.getStatistics(); + assertTrue(actualResult, actualResult.contains("Statistics for A:")); + assertTrue(actualResult, actualResult.contains("Statistics for B:")); + assertTrue(actualResult, actualResult.contains("Statistics for C:")); + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_A1_API.java b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_A1_API.java index 83a42dad..620712ff 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_A1_API.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_A1_API.java @@ -30,29 +30,28 @@ /** * Hello world! - * */ public class Model_A1_API extends ModelAPI { - public Model_A1_API(String model, boolean efsm, PathGenerator generator) { - super(model, efsm, generator, false); - } + public Model_A1_API(String model, boolean efsm, PathGenerator generator) { + super(model, efsm, generator, false); + } - public void e_Init() { - } + public void e_Init() { + } - public void e_StartClient() { - } + public void e_StartClient() { + } - public void e_ValidPremiumCredentials() { - } + public void e_ValidPremiumCredentials() { + } - public void v_ClientNotRunning() { - } + public void v_ClientNotRunning() { + } - public void v_LoginPrompted() { - } + public void v_LoginPrompted() { + } - public void v_WhatsNew() { - } + public void v_WhatsNew() { + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_A_API.java b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_A_API.java index dbdc6b23..9a39113d 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_A_API.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_A_API.java @@ -30,41 +30,40 @@ /** * Hello world! - * */ public class Model_A_API extends ModelAPI { - public Model_A_API(String model, boolean efsm, PathGenerator generator) { - super(model, efsm, generator, false); - } + public Model_A_API(String model, boolean efsm, PathGenerator generator) { + super(model, efsm, generator, false); + } - public void e_ExitClient() { - } + public void e_ExitClient() { + } - public void e_Init() { - } + public void e_Init() { + } - public void e_LogOut() { - } + public void e_LogOut() { + } - public void e_Start() { - } + public void e_Start() { + } - public void e_ToggleRememberMe() { - } + public void e_ToggleRememberMe() { + } - public void e_ValidLogin() { - } + public void e_ValidLogin() { + } - public void v_ClientNotRunning() { - } + public void v_ClientNotRunning() { + } - public void v_ClientRunning() { - } + public void v_ClientRunning() { + } - public void v_Login() { - } + public void v_Login() { + } - public void v_WhatsNew() { - } + public void v_WhatsNew() { + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_B1_API.java b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_B1_API.java index 1b5b8579..311514c4 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_B1_API.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_B1_API.java @@ -30,32 +30,31 @@ /** * Hello world! - * */ public class Model_B1_API extends ModelAPI { - public Model_B1_API(String model, boolean efsm, PathGenerator generator) { - super(model, efsm, generator, false); - } + public Model_B1_API(String model, boolean efsm, PathGenerator generator) { + super(model, efsm, generator, false); + } - public void e_Init() { - } + public void e_Init() { + } - public void e_Logout() { - } + public void e_Logout() { + } - public void e_Close() { - } + public void e_Close() { + } - public void e_ExitClient() { - } + public void e_ExitClient() { + } - public void v_ClientNotRunning() { - } + public void v_ClientNotRunning() { + } - public void v_LoginPrompted() { - } + public void v_LoginPrompted() { + } - public void v_WhatsNew() { - } + public void v_WhatsNew() { + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_B_API.java b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_B_API.java index 80c55962..1563a07f 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_B_API.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_B_API.java @@ -30,26 +30,25 @@ /** * Hello world! - * */ public class Model_B_API extends ModelAPI { - public Model_B_API(String model, boolean efsm, PathGenerator generator) { - super(model, efsm, generator, false); - } + public Model_B_API(String model, boolean efsm, PathGenerator generator) { + super(model, efsm, generator, false); + } - public void e_CreatePlaylist() { - } + public void e_CreatePlaylist() { + } - public void e_DeletePlaylist() { - } + public void e_DeletePlaylist() { + } - public void e_Init() { - } + public void e_Init() { + } - public void v_PaylistCreated() { - } + public void v_PaylistCreated() { + } - public void v_WhatsNew() { - } + public void v_WhatsNew() { + } } diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_C_API.java b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_C_API.java index 6112549a..ac7ed996 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_C_API.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_C_API.java @@ -30,26 +30,25 @@ /** * Hello world! - * */ public class Model_C_API extends ModelAPI { - public Model_C_API(String model, boolean efsm, PathGenerator generator) { - super(model, efsm, generator, false); - } + public Model_C_API(String model, boolean efsm, PathGenerator generator) { + super(model, efsm, generator, false); + } - public void e_GotoWhatsNew() { - } + public void e_GotoWhatsNew() { + } - public void e_ViewPlaylist() { - } + public void e_ViewPlaylist() { + } - public void e_Init() { - } + public void e_Init() { + } - public void v_PaylistCreated() { - } + public void v_PaylistCreated() { + } - public void v_WhatsNew() { - } + public void v_WhatsNew() { + } } diff --git a/graphwalker-core/src/test/resources/xml/bugs/Issue_10.xml b/graphwalker-core/src/test/resources/xml/bugs/Issue_10.xml index 7bd77551..d368a07e 100644 --- a/graphwalker-core/src/test/resources/xml/bugs/Issue_10.xml +++ b/graphwalker-core/src/test/resources/xml/bugs/Issue_10.xml @@ -27,8 +27,8 @@ - - - - + + + + diff --git a/graphwalker-core/src/test/resources/xml/bugs/Issue_9.xml b/graphwalker-core/src/test/resources/xml/bugs/Issue_9.xml index 49a8ffbb..7605cf9c 100644 --- a/graphwalker-core/src/test/resources/xml/bugs/Issue_9.xml +++ b/graphwalker-core/src/test/resources/xml/bugs/Issue_9.xml @@ -27,8 +27,8 @@ - - - - + + + + diff --git a/graphwalker-core/src/test/resources/xml/multipleA.xml b/graphwalker-core/src/test/resources/xml/multipleA.xml index 08bcc527..7b268294 100644 --- a/graphwalker-core/src/test/resources/xml/multipleA.xml +++ b/graphwalker-core/src/test/resources/xml/multipleA.xml @@ -24,11 +24,11 @@ THE SOFTWARE. #L% --> - - - - - - - - + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/multipleB.xml b/graphwalker-core/src/test/resources/xml/multipleB.xml index 51f3c5d2..f2388891 100644 --- a/graphwalker-core/src/test/resources/xml/multipleB.xml +++ b/graphwalker-core/src/test/resources/xml/multipleB.xml @@ -24,11 +24,11 @@ THE SOFTWARE. #L% --> - - - - - - - - + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml index 8743b0cf..23020d24 100644 --- a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml @@ -27,8 +27,8 @@ - - - - + + + + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml index 688da140..ab69b954 100644 --- a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml @@ -27,8 +27,8 @@ - - - - + + + + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml index 302312d9..e10b05e2 100644 --- a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml @@ -27,8 +27,8 @@ - - - - + + + + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml index 8b8bc0cc..05473131 100644 --- a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml @@ -27,8 +27,8 @@ - - - - + + + + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml index ab4f103c..0838e539 100644 --- a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml @@ -27,8 +27,8 @@ - - - - + + + + diff --git a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml index 6b23f747..d99e50cd 100644 --- a/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml +++ b/graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml @@ -27,8 +27,8 @@ - - - - + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqCoverage.xml b/graphwalker-core/src/test/resources/xml/reqCoverage.xml index ae8633e5..b2d83d77 100644 --- a/graphwalker-core/src/test/resources/xml/reqCoverage.xml +++ b/graphwalker-core/src/test/resources/xml/reqCoverage.xml @@ -27,9 +27,9 @@ - - - - + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init.xml index 32b65290..6e470542 100644 --- a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init.xml +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init.xml @@ -24,11 +24,11 @@ THE SOFTWARE. #L% --> - - - - - - - - + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init10.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init10.xml index 2bc19a4f..5e5f1dbe 100644 --- a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init10.xml +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init10.xml @@ -24,14 +24,14 @@ THE SOFTWARE. #L% --> - - - - - - - - - - - + + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init11.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init11.xml index f7ecb15e..57c0b557 100644 --- a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init11.xml +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init11.xml @@ -24,11 +24,11 @@ THE SOFTWARE. #L% --> - - - - - - - - + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init2.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init2.xml index d62e479d..521ea156 100644 --- a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init2.xml +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init2.xml @@ -24,17 +24,17 @@ THE SOFTWARE. #L% --> - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init3.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init3.xml index 13464110..431beff5 100644 --- a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init3.xml +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init3.xml @@ -24,23 +24,23 @@ THE SOFTWARE. #L% --> - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init4.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init4.xml index 18c155eb..94d307ff 100644 --- a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init4.xml +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init4.xml @@ -1,57 +1,57 @@ - - + + - - - + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init5.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init5.xml index 72056084..dbd2bef6 100644 --- a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init5.xml +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init5.xml @@ -27,8 +27,8 @@ - + - - + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init6.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init6.xml index d8835294..c88fa662 100644 --- a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init6.xml +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init6.xml @@ -24,9 +24,9 @@ THE SOFTWARE. #L% --> - - - - - - + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init7.xml b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init7.xml index d8835294..c88fa662 100644 --- a/graphwalker-core/src/test/resources/xml/reqtags/mbt_init7.xml +++ b/graphwalker-core/src/test/resources/xml/reqtags/mbt_init7.xml @@ -24,9 +24,9 @@ THE SOFTWARE. #L% --> - - - - - - + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/switch/A.xml b/graphwalker-core/src/test/resources/xml/switch/A.xml index ccd862df..e8ff1594 100644 --- a/graphwalker-core/src/test/resources/xml/switch/A.xml +++ b/graphwalker-core/src/test/resources/xml/switch/A.xml @@ -24,11 +24,11 @@ THE SOFTWARE. #L% --> - - - - - - - - + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/switch/B.xml b/graphwalker-core/src/test/resources/xml/switch/B.xml index ff6d8624..8033c97f 100644 --- a/graphwalker-core/src/test/resources/xml/switch/B.xml +++ b/graphwalker-core/src/test/resources/xml/switch/B.xml @@ -24,11 +24,11 @@ THE SOFTWARE. #L% --> - - - - - - - - + + + + + + + + diff --git a/graphwalker-core/src/test/resources/xml/switch/C.xml b/graphwalker-core/src/test/resources/xml/switch/C.xml index ea0bddab..6695673c 100644 --- a/graphwalker-core/src/test/resources/xml/switch/C.xml +++ b/graphwalker-core/src/test/resources/xml/switch/C.xml @@ -24,11 +24,11 @@ THE SOFTWARE. #L% --> - - - - - - - - + + + + + + + + From 1ec8d581d37ea93acb85c9f12cd1d59facab627c Mon Sep 17 00:00:00 2001 From: Nils Olsson Date: Fri, 21 Oct 2011 13:44:27 +0200 Subject: [PATCH 007/371] Added interface for statistics and fixed javadoc --- .../main/java/org/graphwalker/cli/CLI.java | 22 +- .../src/test/resources/graphml/UC01.graphml | 679 ++-- .../graphml/methods/ExtendedMain.graphml | 941 ++--- .../resources/graphml/methods/Main.graphml | 959 ++--- .../graphml/misc/missing_inedges.graphml | 904 ++--- .../graphml/misc/no_missing_inedges.graphml | 928 ++--- .../graphml/reqtags/ExtendedMain.graphml | 949 ++--- .../graphml/test24/AddressBook.graphml | 3382 +++++++---------- .../graphml/test24/AddressBookContact.graphml | 1371 +++---- .../test24/AddressBookReadOnly.graphml | 519 ++- .../resources/graphml/test24/Alarm.graphml | 1899 ++++----- .../graphml/test24/AlarmEdit.graphml | 1656 ++++---- .../resources/graphml/test24/Audio.graphml | 952 ++--- .../graphml/test24/Calculator.graphml | 534 ++- .../resources/graphml/test24/Calendar.graphml | 1757 ++++----- .../test24/CalendarAppointment.graphml | 2223 +++++------ .../graphml/test24/Calendar_ToolsMenu.graphml | 622 ++- .../graphml/test24/CallHistory.graphml | 707 ++-- .../resources/graphml/test24/Camera.graphml | 2017 +++++----- .../graphml/test24/ContactFavorites.graphml | 1316 +++---- .../test24/ContactFavoritesReadOnly.graphml | 186 +- .../test24/ContactTapToSelectNumber.graphml | 1113 +++--- .../resources/graphml/test24/Contacts.graphml | 518 ++- .../graphml/test24/ContactsReadOnly.graphml | 438 +-- .../resources/graphml/test24/Date.graphml | 250 +- .../graphml/test24/DefaultValues.graphml | 588 ++- .../graphml/test24/DeleteItems.graphml | 584 ++- .../graphml/test24/GlobalSettings.graphml | 1090 +++--- .../graphml/test24/ImageViewer.graphml | 287 +- .../graphml/test24/KeyboardNumeric.graphml | 577 ++- .../graphml/test24/KeyboardText.graphml | 847 ++--- .../graphml/test24/KeyboardToolsMenu.graphml | 1752 ++++----- .../resources/graphml/test24/Main.graphml | 2089 +++++----- .../resources/graphml/test24/MakeCall.graphml | 324 +- .../graphml/test24/MediaPlayer.graphml | 1975 +++++----- .../graphml/test24/MessagingCompose.graphml | 1076 +++--- .../graphml/test24/MessagingDrafts.graphml | 304 +- .../graphml/test24/MessagingInbox.graphml | 535 ++- .../graphml/test24/MessagingSent.graphml | 304 +- .../graphml/test24/NeoBrowser.graphml | 2192 +++++------ .../resources/graphml/test24/Notes.graphml | 1020 +++-- .../graphml/test24/NumberToDial.graphml | 479 +-- .../test24/RunningApplications.graphml | 549 ++- .../graphml/test24/SendMessage.graphml | 520 ++- .../graphml/test24/SendPictureAsMMS.graphml | 1021 +++-- .../graphml/test24/SendVCard.graphml | 1343 +++---- .../resources/graphml/test24/SysFiles.graphml | 218 +- .../resources/graphml/test24/Tetris.graphml | 318 +- .../resources/graphml/test24/Time.graphml | 218 +- .../src/test/resources/xml/ReachedVertex.xml | 10 +- .../src/test/resources/xml/javaExecutor.xml | 18 +- .../test/resources/xml/reqtags/mbt_init6.xml | 14 +- .../test/resources/xml/reqtags/mbt_init8.xml | 32 +- .../test/resources/xml/reqtags/mbt_init9.xml | 32 +- .../org/graphwalker/core/Application.java | 25 + .../org/graphwalker/core/ClassPathHack.java | 18 + .../graphwalker/core/EventDrivenModels.java | 42 + .../org/graphwalker/core/ExtendedMain.java | 325 +- .../java/org/graphwalker/core/Keywords.java | 41 +- .../main/java/org/graphwalker/core/Model.java | 17 + .../graphwalker/core/ModelBasedTesting.java | 325 +- .../org/graphwalker/core/MultipleModels.java | 527 +-- .../graphwalker/core/StatisticsManager.java | 338 +- .../java/org/graphwalker/core/Status.java | 82 + .../main/java/org/graphwalker/core/Util.java | 158 +- .../conditions/AbstractStopCondition.java | 12 + .../core/conditions/AlternativeCondition.java | 192 +- .../conditions/CombinationalCondition.java | 190 +- .../core/conditions/EdgeCoverage.java | 156 +- .../core/conditions/NeverCondition.java | 110 +- .../core/conditions/ReachedEdge.java | 261 +- .../core/conditions/ReachedRequirement.java | 151 +- .../core/conditions/ReachedVertex.java | 307 +- .../core/conditions/RequirementCoverage.java | 147 +- .../core/conditions/StopCondition.java | 114 +- .../core/conditions/TestCaseLength.java | 118 +- .../core/conditions/TimeDuration.java | 138 +- .../core/conditions/VertexCoverage.java | 150 +- .../org/graphwalker/core/events/AppEvent.java | 9 + .../org/graphwalker/core/events/MbtEvent.java | 9 + .../core/exceptions/FoundNoEdgeException.java | 91 +- .../core/exceptions/GeneratorException.java | 11 + .../core/exceptions/GuiStoppedExecution.java | 3 + .../core/exceptions/InvalidDataException.java | 5 + .../exceptions/StopConditionException.java | 5 + .../core/filters/AccessableEdgeFilter.java | 183 +- .../core/generators/A_StarPathGenerator.java | 469 +-- .../generators/AbstractPathGenerator.java | 41 + .../AllPathPermutationsGenerator.java | 418 +- .../core/generators/CodeGenerator.java | 208 +- .../generators/CombinedPathGenerator.java | 260 +- .../core/generators/ListGenerator.java | 199 +- .../generators/NonOptimizedShortestPath.java | 19 + .../core/generators/PathGenerator.java | 161 +- .../core/generators/RandomPathGenerator.java | 266 +- .../generators/RequirementsGenerator.java | 17 + .../core/graph/AbstractElement.java | 209 +- .../java/org/graphwalker/core/graph/Edge.java | 52 +- .../org/graphwalker/core/graph/Graph.java | 40 + .../org/graphwalker/core/graph/Vertex.java | 104 +- .../core/io/AbstractModelHandler.java | 123 +- .../java/org/graphwalker/core/io/GraphML.java | 9 +- .../org/graphwalker/core/io/ParseLog.java | 13 + .../core/io/PrintHTMLTestSequence.java | 12 + .../machines/ExtendedFiniteStateMachine.java | 748 ++-- .../core/machines/FiniteStateMachine.java | 1604 ++++---- .../core/multipleModels/ModelAPI.java | 125 +- .../core/multipleModels/ModelHandler.java | 23 +- .../core/statistics/AbstractStatistics.java | 35 + .../statistics/EdgeCoverageStatistics.java | 176 +- .../EdgeSequenceCoverageStatistics.java | 300 +- .../RequirementCoverageStatistics.java | 208 +- .../core/statistics/Statistics.java | 99 +- .../statistics/VertexCoverageStatistics.java | 178 +- .../main/java/org/graphwalker/gui/App.java | 99 + .../java/org/graphwalker/gui/StatusBar.java | 15 +- .../graphwalker/webservice/SoapServices.java | 63 + 117 files changed, 26810 insertions(+), 30901 deletions(-) create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/statistics/AbstractStatistics.java diff --git a/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java b/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java index 88de21bc..4da731d0 100644 --- a/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java +++ b/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java @@ -107,6 +107,9 @@ * *

*
+ * + * @author nilols + * @version $Id: $ */ public class CLI { @@ -129,6 +132,9 @@ public void run() { private Options opt = new Options(); private static Endpoint endpoint = null; + /** + *

Constructor for CLI.

+ */ public CLI() { mbt = new ModelBasedTesting(); } @@ -144,6 +150,11 @@ private void setMbt(ModelBasedTesting mbt) { this.mbt = mbt; } + /** + *

main.

+ * + * @param args an array of {@link java.lang.String} objects. + */ public static void main(String[] args) { CLI cli = new CLI(); Thread shutDownThread = new CLI.VerboseStatisticsLogger(cli.getMbt()); @@ -1061,6 +1072,15 @@ private void RunCommandLog(CommandLine cl) throws IOException { App.main(new String[] { cl.getOptionValue("f"), cl.getOptionValue("l") }); } */ + /* + private void RunCommandLog(CommandLine cl) throws IOException { + if (helpNeeded("log", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") + || helpNeeded("log", !cl.hasOption("l"), "Missing the log file. See -l")) + return; + + App.main(new String[] { cl.getOptionValue("f"), cl.getOptionValue("l") }); + } + */ private boolean helpNeeded(String module, boolean condition, String message) { if (condition) { System.out.println(message); @@ -1072,4 +1092,4 @@ private boolean helpNeeded(String module, boolean condition, String message) { private Endpoint GetEndpoint() { return endpoint; } -} \ No newline at end of file +} diff --git a/graphwalker-cli/src/test/resources/graphml/UC01.graphml b/graphwalker-cli/src/test/resources/graphml/UC01.graphml index ef957848..96f6d8f6 100644 --- a/graphwalker-cli/src/test/resources/graphml/UC01.graphml +++ b/graphwalker-cli/src/test/resources/graphml/UC01.graphml @@ -1,387 +1,296 @@ - - - - - - - - - - - - - - Start - - - - - - - - - - - - - - v_BrowserStarted - - - - - - - - - - - - - - v_BaseURL - REQTAG=UC01 2.2.1 - - - - - - - - - - - - - - v_SearchResult - REQTAG=UC01 2.2.2 - - - - - - - - - - - - - - v_BrowserStopped - - - - - - - - - - - - - - v_BookInformation - REQTAG=UC01 2.2.3 - - - - - - - - - - - - - - v_OtherBoughtBooks - - - - - - - - - - - - - - v_ShoppingCart - REQTAG=UC01 2.3 - - - - - - - - - - - - - - e_init / - num_of_books = 0; MAX_BOOKS = 5; - - - - - - - - - - - - - e_EnterBaseURL - - - - - - - - - - - - - e_SearchBook - - - - - - - - - - - - - e_StartBrowser - - - - - - - - - - - - - - e_ClickBook - - - - - - - - - - - - - - - - - e_AddBookToCart [num_of_books<=MAX_BOOKS] / num_of_books++; - - - - - - - - - - - - - - - - - - e_ShoppingCart - - - - - - - - - - - - - - - - - e_ShoppingCart - - - - - - - - - - - - - - - - - - - e_ShoppingCart - - - - - - - - - - - - - - - - - - e_SearchBook - - - - - - - - - - - - - - - - - - - e_SearchBook - - - - - - - - - - - - - - - - - - e_SearchBook - - - - - - - - - - + + + + + + + + + + + + + + Start + + + + + + + + + + + + + v_BrowserStarted + + + + + + + + + + + + + v_BaseURL +REQTAG=UC01 2.2.1 + + + + + + + + + + + + + v_SearchResult +REQTAG=UC01 2.2.2 + + + + + + + + + + + + + v_BrowserStopped + + + + + + + + + + + + + v_BookInformation +REQTAG=UC01 2.2.3 + + + + + + + + + + + + + v_OtherBoughtBooks + + + + + + + + + + + + + v_ShoppingCart +REQTAG=UC01 2.3 + + + + + + + + + + + + + e_init / num_of_books = 0; MAX_BOOKS = 5; + + + + + + + + + + + + e_EnterBaseURL + + + + + + + + + + + + e_SearchBook + + + + + + + + + + + + e_StartBrowser + + + + + + + + + + + + e_ClickBook + + + + + + + + + + + + + + + e_AddBookToCart [num_of_books<=MAX_BOOKS] / num_of_books++; + + + + + + + + + + + + + + + + + e_ShoppingCart + + + + + + + + + + + + + + + e_ShoppingCart + + + + + + + + + + + + + + + + + e_ShoppingCart + + + + + + + + + + + + + + + + + e_SearchBook + + + + + + + + + + + + + + + + + e_SearchBook + + + + + + + + + + + + + + + + + e_SearchBook + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/methods/ExtendedMain.graphml b/graphwalker-cli/src/test/resources/graphml/methods/ExtendedMain.graphml index 3f4da238..4ea8af8d 100644 --- a/graphwalker-cli/src/test/resources/graphml/methods/ExtendedMain.graphml +++ b/graphwalker-cli/src/test/resources/graphml/methods/ExtendedMain.graphml @@ -1,533 +1,412 @@ - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_KeePassNotRunning - - - - - - - - - - - - - v_MainWindowEmpty - - - - - - - - - - - - - - v_EnterMasterCompositeMasterKey - - - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - - - v_MainWindow_DB_Loaded - - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - - e_Initialize / - incorrect=0; databaseChanged=false - - - - - - - - - - - - - - - - - - e_Start - - - - - - - - - - - - - - - - - e_StartWithDatabase - - - - - - - - - - - - - - - - - e_EnterInvalidKey/incorrect=incorrect+1 - - - - - - - - - - - - - - - - - - e_CloseDialog[incorrect<3] - - - - - - - - - - - - - - - - - - - e_CloseDialog[incorrect==3]/incorrect=0 - - - - - - - - - - - - - - - - - e_EnterCorrectKey/incorrect=0 - - - - - - - - - - - - - - - - - - - e_CloseApp[databaseChanged==false] - - - - - - - - - - - - - - - - - - e_CloseApp - - - - - - - - - - - - - - - - - e_CloseApp[databaseChanged==true&&incorrect==0] - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - - - e_CloseDB[databaseChanged==true] - - - - - - - - - - - - - - - - - e_CloseDB[databaseChanged==false] - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - - - e_ChangeDatabase/databaseChanged=true - - - - - - - - - - + + + + + + + + + + + + + + Start + + + + + + + + + + + + v_KeePassNotRunning + + + + + + + + + + + + v_MainWindowEmpty + + + + + + + + + + + + v_EnterMasterCompositeMasterKey + + + + + + + + + + + + v_InvalidKey + + + + + + + + + + + + v_MainWindow_DB_Loaded + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + e_Initialize / incorrect=0; databaseChanged=false + + + + + + + + + + + + + + + + + e_Start + + + + + + + + + + + + + + + e_StartWithDatabase + + + + + + + + + + + + + + + e_EnterInvalidKey/incorrect=incorrect+1 + + + + + + + + + + + + + + + + + e_CloseDialog[incorrect<3] + + + + + + + + + + + + + + + + + e_CloseDialog[incorrect==3]/incorrect=0 + + + + + + + + + + + + + + + e_EnterCorrectKey/incorrect=0 + + + + + + + + + + + + + + + + + e_CloseApp[databaseChanged==false] + + + + + + + + + + + + + + + + + e_CloseApp + + + + + + + + + + + + + + + e_CloseApp[databaseChanged==true&&incorrect==0] + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + + + e_CloseDB[databaseChanged==true] + + + + + + + + + + + + + + + e_CloseDB[databaseChanged==false] + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + + e_ChangeDatabase/databaseChanged=true + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/methods/Main.graphml b/graphwalker-cli/src/test/resources/graphml/methods/Main.graphml index 583a93ef..54c6267e 100644 --- a/graphwalker-cli/src/test/resources/graphml/methods/Main.graphml +++ b/graphwalker-cli/src/test/resources/graphml/methods/Main.graphml @@ -1,542 +1,421 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - - v_KeePassNotRunning - - - - - - - - - - - - - - v_MainWindowEmpty - - - - - - - - - - - - - - - v_EnterMasterCompositeMasterKey - - - - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - - - - v_MainWindow_DB_Loaded - - - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - - - - e_Initialize - - - - - - - - - - - - - - - - - - - - e_Start - - - - - - - - - - - - - - - - - - e_StartWithDatabase - - - - - - - - - - - - - - - e_EnterInvalidKey - - - - - - - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect < 3 times */ - - - - - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect key 3 times */ - - - - - - - - - - - - - - - - - - - - e_EnterCorrectKey - - - - - - - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - - - - - e_CloseApp - - - - - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database changed */ - - - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - e_CloseDB BACKTRACK /* If database changed */ - - - - - - - - - - - - - - - - - - e_CloseDB BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + v_KeePassNotRunning + + + + + + + + + + + + + v_MainWindowEmpty + + + + + + + + + + + + + v_EnterMasterCompositeMasterKey + + + + + + + + + + + + + v_InvalidKey + + + + + + + + + + + + + v_MainWindow_DB_Loaded + + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + + e_Initialize + + + + + + + + + + + + + + + + + + e_Start + + + + + + + + + + + + + + + + e_StartWithDatabase + + + + + + + + + + + + + e_EnterInvalidKey + + + + + + + + + + + + + + + + + + e_CloseDialog BACKTRACK /* If incorrect < 3 times */ + + + + + + + + + + + + + + + + e_CloseDialog BACKTRACK /* If incorrect key 3 times */ + + + + + + + + + + + + + + + + + + e_EnterCorrectKey + + + + + + + + + + + + + + + + + + + + e_CloseApp BACKTRACK /* If database unchanged */ + + + + + + + + + + + + + + + + + + e_CloseApp + + + + + + + + + + + + + + + + + + e_CloseApp BACKTRACK /* If database changed */ + + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + e_CloseDB BACKTRACK /* If database changed */ + + + + + + + + + + + + + + + + e_CloseDB BACKTRACK /* If database unchanged */ + + + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/misc/missing_inedges.graphml b/graphwalker-cli/src/test/resources/graphml/misc/missing_inedges.graphml index 40234d63..b987cf04 100644 --- a/graphwalker-cli/src/test/resources/graphml/misc/missing_inedges.graphml +++ b/graphwalker-cli/src/test/resources/graphml/misc/missing_inedges.graphml @@ -1,519 +1,389 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_KeePassNotRunning - - - - - - - - - - - - v_MainWindowEmpty - - - - - - - - - - - - - v_EnterMasterCompositeMasterKey - - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - - v_MainWindow_DB_Loaded - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - - - e_Initialize - - - - - - - - - - - - - - - - - - e_Start - - - - - - - - - - - - - - - - e_StartWithDatabase - - - - - - - - - - - - - e_EnterInvalidKey - - - - - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect < 3 times */ - - - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect key 3 times */ - - - - - - - - - - - - - - - - - - e_EnterCorrectKey - - - - - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - - - e_CloseApp - - - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database changed */ - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - e_CloseDB BACKTRACK /* If database changed */ - - - - - - - - - - - - - - - - e_CloseDB BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect key 3 times */ - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_KeePassNotRunning + + + + + + + + + + + v_MainWindowEmpty + + + + + + + + + + + v_EnterMasterCompositeMasterKey + + + + + + + + + + + v_InvalidKey + + + + + + + + + + + v_MainWindow_DB_Loaded + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + v_InvalidKey + + + + + + + + + + + e_Initialize + + + + + + + + + + + + + + + + e_Start + + + + + + + + + + + + + + e_StartWithDatabase + + + + + + + + + + + e_EnterInvalidKey + + + + + + + + + + + + + + + + e_CloseDialog BACKTRACK /* If incorrect < 3 times */ + + + + + + + + + + + + + + e_CloseDialog BACKTRACK /* If incorrect key 3 times */ + + + + + + + + + + + + + + + + e_EnterCorrectKey + + + + + + + + + + + + + + + + + + e_CloseApp BACKTRACK /* If database unchanged */ + + + + + + + + + + + + + + + + e_CloseApp + + + + + + + + + + + + + + + + e_CloseApp BACKTRACK /* If database changed */ + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + + e_No + + + + + + + + + + + e_CloseDB BACKTRACK /* If database changed */ + + + + + + + + + + + + + + e_CloseDB BACKTRACK /* If database unchanged */ + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + e_CloseDialog BACKTRACK /* If incorrect key 3 times */ + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/misc/no_missing_inedges.graphml b/graphwalker-cli/src/test/resources/graphml/misc/no_missing_inedges.graphml index cc3109b2..e98dfc75 100644 --- a/graphwalker-cli/src/test/resources/graphml/misc/no_missing_inedges.graphml +++ b/graphwalker-cli/src/test/resources/graphml/misc/no_missing_inedges.graphml @@ -1,531 +1,401 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_KeePassNotRunning - - - - - - - - - - - - v_MainWindowEmpty - - - - - - - - - - - - - v_EnterMasterCompositeMasterKey - - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - - v_MainWindow_DB_Loaded - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - - - e_Initialize - - - - - - - - - - - - - - - - - - e_Start - - - - - - - - - - - - - - - - e_StartWithDatabase - - - - - - - - - - - - - e_EnterInvalidKey - - - - - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect < 3 times */ - - - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect key 3 times */ - - - - - - - - - - - - - - - - - - e_EnterCorrectKey - - - - - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - - - e_CloseApp - - - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database changed */ - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - e_CloseDB BACKTRACK /* If database changed */ - - - - - - - - - - - - - - - - e_CloseDB BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect key 3 times */ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_KeePassNotRunning + + + + + + + + + + + v_MainWindowEmpty + + + + + + + + + + + v_EnterMasterCompositeMasterKey + + + + + + + + + + + v_InvalidKey + + + + + + + + + + + v_MainWindow_DB_Loaded + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + v_InvalidKey + + + + + + + + + + + e_Initialize + + + + + + + + + + + + + + + + e_Start + + + + + + + + + + + + + + e_StartWithDatabase + + + + + + + + + + + e_EnterInvalidKey + + + + + + + + + + + + + + + + e_CloseDialog BACKTRACK /* If incorrect < 3 times */ + + + + + + + + + + + + + + e_CloseDialog BACKTRACK /* If incorrect key 3 times */ + + + + + + + + + + + + + + + + e_EnterCorrectKey + + + + + + + + + + + + + + + + + + e_CloseApp BACKTRACK /* If database unchanged */ + + + + + + + + + + + + + + + + e_CloseApp + + + + + + + + + + + + + + + + e_CloseApp BACKTRACK /* If database changed */ + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + + e_No + + + + + + + + + + + e_CloseDB BACKTRACK /* If database changed */ + + + + + + + + + + + + + + e_CloseDB BACKTRACK /* If database unchanged */ + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + e_CloseDialog BACKTRACK /* If incorrect key 3 times */ + + + + + + + + + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/reqtags/ExtendedMain.graphml b/graphwalker-cli/src/test/resources/graphml/reqtags/ExtendedMain.graphml index 719106da..687b8720 100644 --- a/graphwalker-cli/src/test/resources/graphml/reqtags/ExtendedMain.graphml +++ b/graphwalker-cli/src/test/resources/graphml/reqtags/ExtendedMain.graphml @@ -1,537 +1,416 @@ - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_KeePassNotRunning - - - - - - - - - - - - - v_MainWindowEmpty - REQTAG=req 79 - - - - - - - - - - - - - - v_EnterMasterCompositeMasterKey - - - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - - - v_MainWindow_DB_Loaded - REQTAG=req 55, req 78 - - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - - e_Initialize / - incorrect=0; databaseChanged=false - - - - - - - - - - - - - - - - - - e_Start - - - - - - - - - - - - - - - - - e_StartWithDatabase - REQTAG=req1 - - - - - - - - - - - - - - - - - e_EnterInvalidKey/incorrect=incorrect+1 - - - - - - - - - - - - - - - - - - e_CloseDialog[incorrect<3] - - - - - - - - - - - - - - - - - - - e_CloseDialog[incorrect==3]/incorrect=0 - - - - - - - - - - - - - - - - - e_EnterCorrectKey/incorrect=0 - REQTAG=req2, req 23 - - - - - - - - - - - - - - - - - - - e_CloseApp[databaseChanged==false] - - - - - - - - - - - - - - - - - - e_CloseApp - - - - - - - - - - - - - - - - - e_CloseApp[databaseChanged==true&&incorrect==0] - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - - - e_CloseDB[databaseChanged==true] - - - - - - - - - - - - - - - - - e_CloseDB[databaseChanged==false] - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - - - e_ChangeDatabase/databaseChanged=true - - - - - - - - - - + + + + + + + + + + + + + + Start + + + + + + + + + + + + v_KeePassNotRunning + + + + + + + + + + + + v_MainWindowEmpty +REQTAG=req 79 + + + + + + + + + + + + v_EnterMasterCompositeMasterKey + + + + + + + + + + + + v_InvalidKey + + + + + + + + + + + + v_MainWindow_DB_Loaded +REQTAG=req 55, req 78 + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + v_SaveBeforeCloseLock + + + + + + + + + + + + e_Initialize / incorrect=0; databaseChanged=false + + + + + + + + + + + + + + + + + e_Start + + + + + + + + + + + + + + + e_StartWithDatabase +REQTAG=req1 + + + + + + + + + + + + + + + e_EnterInvalidKey/incorrect=incorrect+1 + + + + + + + + + + + + + + + + + e_CloseDialog[incorrect<3] + + + + + + + + + + + + + + + + + e_CloseDialog[incorrect==3]/incorrect=0 + + + + + + + + + + + + + + + e_EnterCorrectKey/incorrect=0 +REQTAG=req2, req 23 + + + + + + + + + + + + + + + + + e_CloseApp[databaseChanged==false] + + + + + + + + + + + + + + + + + e_CloseApp + + + + + + + + + + + + + + + e_CloseApp[databaseChanged==true&&incorrect==0] + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + + + e_CloseDB[databaseChanged==true] + + + + + + + + + + + + + + + e_CloseDB[databaseChanged==false] + + + + + + + + + + + + + + + e_Yes + + + + + + + + + + + + + + + e_No + + + + + + + + + + + + + + + + + e_Cancel + + + + + + + + + + + + + + + + e_ChangeDatabase/databaseChanged=true + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/AddressBook.graphml b/graphwalker-cli/src/test/resources/graphml/test24/AddressBook.graphml index 750ae8e2..0a483c30 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/AddressBook.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/AddressBook.graphml @@ -1,1927 +1,1459 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_AddressBook - - - - - - - - - - - - v_AddressBook_ToolsMenu_1 - - - - - - - - - - - - v_AddressBook_AddContact SUBGRAPH - - - - - - - - - - - - v_DeleteItems SUBGRAPH - - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - - v_AddressBook_AddFavorite - - - - - - - - - - - - v_ContactTapToSelectNumber SUBGRAPH - - - - - - - - - - - - v_AddressBook_ToolsMenu_2 - - - - - - - - - - - - v_AddressBook_ContactSettings - - - - - - - - - - - - Stop - - - - - - - - - - - - v_SelectNameFormat - - - - - - - - - - - - v_Prefer - - - - - - - - - - - - v_BirthdayReminderSettingsEnabled - - - - - - - - - - - - v_BirthdayReminderSettingsDisabled - - - - - - - - - - - - v_DefaultValues SUBGRAPH - - - - - - - - - - - - v_DefaultValues SUBGRAPH - - - - - - - - - - - - v_DefaultValues SUBGRAPH - - - - - - - - - - - - v_ReminderWhen - - - - - - - - - - - - v_Time SUBGRAPH - - - - - - - - - - - - v_Audio SUBGRAPH - - - - - - - - - - - - v_SendVCard SUBGRAPH - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACKING /* If Icon 2 is enabled. */ - - - - - - - - - - - - - - - - e_SweepShowKeyboard - - - - - - - - - - - - - e_TapIcon_4 BACKTRACKING /* If Icon 4 is enabled. */ - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapRandomListItem BACKTRACKING /* If an item exists in the list. */ - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - - - e_TapItem3 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_TapItem4 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACKING /* If sending a SMS, and close app was called, we gor - here */ - - - - - - - - - - - - - - - - e_TapItem3 - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_AddressBook + + + + + + + + + + + v_AddressBook_ToolsMenu_1 + + + + + + + + + + + v_AddressBook_AddContact SUBGRAPH + + + + + + + + + + + v_DeleteItems SUBGRAPH + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + v_AddressBook_AddFavorite + + + + + + + + + + + v_ContactTapToSelectNumber SUBGRAPH + + + + + + + + + + + v_AddressBook_ToolsMenu_2 + + + + + + + + + + + v_AddressBook_ContactSettings + + + + + + + + + + + Stop + + + + + + + + + + + v_SelectNameFormat + + + + + + + + + + + v_Prefer + + + + + + + + + + + v_BirthdayReminderSettingsEnabled + + + + + + + + + + + v_BirthdayReminderSettingsDisabled + + + + + + + + + + + v_DefaultValues SUBGRAPH + + + + + + + + + + + v_DefaultValues SUBGRAPH + + + + + + + + + + + v_DefaultValues SUBGRAPH + + + + + + + + + + + v_ReminderWhen + + + + + + + + + + + v_Time SUBGRAPH + + + + + + + + + + + v_Audio SUBGRAPH + + + + + + + + + + + v_SendVCard SUBGRAPH + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACKING /* If Icon 2 is enabled. */ + + + + + + + + + + + + + + e_SweepShowKeyboard + + + + + + + + + + + e_TapIcon_4 BACKTRACKING /* If Icon 4 is enabled. */ + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapRandomListItem BACKTRACKING /* If an item exists in the list. */ + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_TapScreen + + + + + + + + + + + + + + + + e_TapItem2 + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + e_TapScreen + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + e_TapItem2 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_TapScreen + + + + + + + + + + + + + + + + e_TapItem3 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + e_TapItem4 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp BACKTRACKING /* If sending a SMS, and close app was called, we gor here */ + + + + + + + + + + + + + + e_TapItem3 + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + BACKTRACK + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/AddressBookContact.graphml b/graphwalker-cli/src/test/resources/graphml/test24/AddressBookContact.graphml index 659918eb..8de79cbb 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/AddressBookContact.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/AddressBookContact.graphml @@ -1,775 +1,600 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - - v_AddressBook_AddContact - - - - - - - - - - - - - - v_ContactMustHaveName - - - - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - - - - v_Camera SUBGRAPH - - - - - - - - - - - - - - v_AudioTone - - - - - - - - - - - - - - v_KeyboardNumeric SUBGRAPH - - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - v_ContactHasChanged - - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_TapInListStringFirst_name - - - - - - - - - - - - - - - - - - e_TapInListStringPicture - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapInListStringRing_tone - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapInListStringMobile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - BACKTRACK /* - No name set */ - - - - - - - - - - - - - - - - - - - BACKTRACK /* - Mandatory fields OK */ - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - BACKTRACK /* - Fields OK */ - - - - - - - - - - - - - - - - - - - BACKTRACK /* - No name set */ - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + v_AddressBook_AddContact + + + + + + + + + + + + + v_ContactMustHaveName + + + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + + + v_Camera SUBGRAPH + + + + + + + + + + + + + v_AudioTone + + + + + + + + + + + + + v_KeyboardNumeric SUBGRAPH + + + + + + + + + + + + + Stop + + + + + + + + + + + + + v_ContactHasChanged + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_TapInListStringFirst_name + + + + + + + + + + + + + + + + e_TapInListStringPicture + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapInListStringRing_tone + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapInListStringMobile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + BACKTRACK /* No name set */ + + + + + + + + + + + + + + + + + + BACKTRACK /* Mandatory fields OK */ + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + BACKTRACK /* Fields OK */ + + + + + + + + + + + + + + + + + + BACKTRACK /* No name set */ + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/AddressBookReadOnly.graphml b/graphwalker-cli/src/test/resources/graphml/test24/AddressBookReadOnly.graphml index f4122236..a5d0b79a 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/AddressBookReadOnly.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/AddressBookReadOnly.graphml @@ -1,297 +1,226 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_AddressBookReadOnly - - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - - v_ContactTapToSelectNumber NO_MERGE - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - e_SweepShowKeyboard - - - - - - - - - - - - - - - - e_TapRandomListItem BACKTRACK /* If an item exists in the list. */ - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapRandomListItem BACKTRACK /* Only allowed when there are numbers in the list */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_AddressBookReadOnly + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + v_ContactTapToSelectNumber NO_MERGE + + + + + + + + + + + Stop + + + + + + + + + + + + + + e_SweepShowKeyboard + + + + + + + + + + + + + + e_TapRandomListItem BACKTRACK /* If an item exists in the list. */ + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_TapRandomListItem BACKTRACK /* Only allowed when there are numbers in the list */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + e_SweepAccept + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Alarm.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Alarm.graphml index d99c76b7..643a24df 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Alarm.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Alarm.graphml @@ -1,1085 +1,818 @@ - + - - - - - - - - - - - v_Audio SUBGRAPH - - - - - - - - - - - - v_AlarmHistory_ToolsMenu - - - - - - - - - - - - v_AlarmHistory - - - - - - - - - - - - v_Audio SUBGRAPH - - - - - - - - - - - - v_AlarmEdit SUBGRAPH - - - - - - - - - - - - v_DeleteItems SUBGRAPH - - - - - - - - - - - - v_AlarmToolsMenu - - - - - - - - - - - - v_AlarmDateAlreadyOccured - - - - - - - - - - - - v_AlarmEdit SUBGRAPH - - - - - - - - - - - - v_Date SUBGRAPH - - - - - - - - - - - - v_Time SUBGRAPH - - - - - - - - - - - - v_Alarm - - - - - - - - - - - - Start - - - - - - - - - - - - Stop - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapListItemFirst - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If an alarm exists in the list. */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_3 BACKTRACK /* If an alarm exists in the list. */ - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - - e_SelectRandomListItem /* 'Add Alarm...' do always exist. New Alarms gets added to - the list. */ - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - e_SelectRandomListItem /* Listan kan vara tom */ - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TryTapListItemNotFirst BACKTRACK /* If a Alarm is selected from the list. */ - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseView BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - BACKTRACK - - - - - - + + + + + + + + + + + v_Audio SUBGRAPH + + + + + + + + + + + v_AlarmHistory_ToolsMenu + + + + + + + + + + + v_AlarmHistory + + + + + + + + + + + v_Audio SUBGRAPH + + + + + + + + + + + v_AlarmEdit SUBGRAPH + + + + + + + + + + + v_DeleteItems SUBGRAPH + + + + + + + + + + + v_AlarmToolsMenu + + + + + + + + + + + v_AlarmDateAlreadyOccured + + + + + + + + + + + v_AlarmEdit SUBGRAPH + + + + + + + + + + + v_Date SUBGRAPH + + + + + + + + + + + v_Time SUBGRAPH + + + + + + + + + + + v_Alarm + + + + + + + + + + + Start + + + + + + + + + + + Stop + + + + + + + + + + + v_Dummy + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_TapListItemFirst + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* If an alarm exists in the list. */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapIcon_3 BACKTRACK /* If an alarm exists in the list. */ + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + e_SelectRandomListItem /* 'Add Alarm...' do always exist. New Alarms gets added to the list. */ + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + e_SelectRandomListItem /* Listan kan vara tom */ + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_TryTapListItemNotFirst BACKTRACK /* If a Alarm is selected from the list. */ + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseView BACKTRACK + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + BACKTRACK + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/AlarmEdit.graphml b/graphwalker-cli/src/test/resources/graphml/test24/AlarmEdit.graphml index 9ca97b44..ac02274e 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/AlarmEdit.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/AlarmEdit.graphml @@ -1,946 +1,714 @@ - + - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - - v_AlarmEdit - - - - - - - - - - - - Start - - - - - - - - - - - - v_Time SUBGRAPH - - - - - - - - - - - - v_Date SUBGRAPH - - - - - - - - - - - - v_AlarmAction - - - - - - - - - - - - v_AlarmDateAlreadyOccured - - - - - - - - - - - - Stop - - - - - - - - - - - - v_EditAlarmChanged - - - - - - - - - - - - v_AlarmDateAlreadyOccured - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_TapItem3 - - - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - - - - e_TapItem4 - - - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + v_AlarmEdit + + + + + + + + + + + Start + + + + + + + + + + + v_Time SUBGRAPH + + + + + + + + + + + v_Date SUBGRAPH + + + + + + + + + + + v_AlarmAction + + + + + + + + + + + v_AlarmDateAlreadyOccured + + + + + + + + + + + Stop + + + + + + + + + + + v_EditAlarmChanged + + + + + + + + + + + v_AlarmDateAlreadyOccured + + + + + + + + + + + v_Dummy + + + + + + + + + + + v_Dummy + + + + + + + + + + + v_Dummy + + + + + + + + + + + v_Dummy + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + e_TapItem3 + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + e_TapItem2 + + + + + + + + + + + + + + + + e_TapItem4 + + + + + + + + + + + + + + + + e_TapRandomListItem + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Audio.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Audio.graphml index d6568c8b..e53e523f 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Audio.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Audio.graphml @@ -1,545 +1,411 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_Audio - - - - - - - - - - - - v_AudioAction - - - - - - - - - - - - v_AudioTone /* TODO: Implement selection - of audio file.*/ - - - - - - - - - - - - v_AudioTone_ToolsMenu - - - - - - - - - - - - v_ChangeVolume - - - - - - - - - - - - v_DefaultValues SUBGRAPH - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_Audio + + + + + + + + + + + v_AudioAction + + + + + + + + + + + v_AudioTone /* TODO: Implement selection of audio file.*/ + + + + + + + + + + + v_AudioTone_ToolsMenu + + + + + + + + + + + v_ChangeVolume + + + + + + + + + + + v_DefaultValues SUBGRAPH + + + + + + + + + + + Stop + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + e_TapItem2 + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + e_TapIcon_4 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapRandomListItem + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Calculator.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Calculator.graphml index a13abd17..c1c3f1d8 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Calculator.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Calculator.graphml @@ -1,304 +1,234 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_Calculator - - - - - - - - - - - - v_KeyboardNumeric SUBGRAPH - - - - - - - - - - - - v_Calculator_Error - - - - - - - - - - - - Stop - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACK - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_Calculator + + + + + + + + + + + v_KeyboardNumeric SUBGRAPH + + + + + + + + + + + v_Calculator_Error + + + + + + + + + + + Stop + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.05 + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp BACKTRACK + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Calendar.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Calendar.graphml index 44ec9b07..e50f307b 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Calendar.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Calendar.graphml @@ -1,1001 +1,760 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_CalendarMonthView - - - - - - - - - - - - v_Calendar_ToolsMenu SUBGRAPH - - - - - - - - - - - - v_CalendarWeekView - - - - - - - - - - - - v_CalendarDayView - - - - - - - - - - - - v_Calendar_ToolsMenu SUBGRAPH - - - - - - - - - - - - v_Calendar_ToolsMenu SUBGRAPH - - - - - - - - - - - - v_CalendarAppointment SUBGRAPH - - - - - - - - - - - - v_Calendar SUBGRAPH - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapCalendarItem - - - - - - - - - - - - - - - - - - e_TapCalendarItem - - - - - - - - - - - - - - - - e_TryTapRandomListItem BACKTRACK - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - e_LeftKey - - - - - - - - - - - - - - - - - e_RightKey - - - - - - - - - - - - - - - - - e_UpKey - - - - - - - - - - - - - - - - - e_DownKey - - - - - - - - - - - - - - - - - e_LeftKey - - - - - - - - - - - - - - - - - e_RightKey - - - - - - - - - - - - - - - - - e_UpKey - - - - - - - - - - - - - - - - - e_DownKey - - - - - - - - - - - - - - - - - e_LeftKey - - - - - - - - - - - - - - - - - e_RightKey - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACK weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_CalendarMonthView + + + + + + + + + + + v_Calendar_ToolsMenu SUBGRAPH + + + + + + + + + + + v_CalendarWeekView + + + + + + + + + + + v_CalendarDayView + + + + + + + + + + + v_Calendar_ToolsMenu SUBGRAPH + + + + + + + + + + + v_Calendar_ToolsMenu SUBGRAPH + + + + + + + + + + + v_CalendarAppointment SUBGRAPH + + + + + + + + + + + v_Calendar SUBGRAPH + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapCalendarItem + + + + + + + + + + + + + + + + e_TapCalendarItem + + + + + + + + + + + + + + e_TryTapRandomListItem BACKTRACK + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + e_LeftKey + + + + + + + + + + + + + + + e_RightKey + + + + + + + + + + + + + + + e_UpKey + + + + + + + + + + + + + + + e_DownKey + + + + + + + + + + + + + + + e_LeftKey + + + + + + + + + + + + + + + e_RightKey + + + + + + + + + + + + + + + e_UpKey + + + + + + + + + + + + + + + e_DownKey + + + + + + + + + + + + + + + e_LeftKey + + + + + + + + + + + + + + + e_RightKey + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp BACKTRACK weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/CalendarAppointment.graphml b/graphwalker-cli/src/test/resources/graphml/test24/CalendarAppointment.graphml index f603b501..d624c0a6 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/CalendarAppointment.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/CalendarAppointment.graphml @@ -1,1251 +1,976 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - - v_CalendarAppointment - - - - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - - - - v_Date SUBGRAPH - - - - - - - - - - - - - - v_Time SUBGRAPH - - - - - - - - - - - - - - v_CalendarAppointmentStatus - - - - - - - - - - - - - - v_CalendarAppointmentReminder - - - - - - - - - - - - - - v_CalendarAppointmentReminderCustom - - - - - - - - - - - - - - v_Time SUBGRAPH - - - - - - - - - - - - - - v_Date SUBGRAPH - - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - v_CalendarAppointmentSaveChanges - - - - - - - - - - - - - - v_TimeMustBeLess - - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - e_TapInListStringSubject BACKTRACK - - - - - - - - - - - - - - - - - - - e_SelectRandomListItem BACKTRACK - - - - - - - - - - - - - - - - - - - - e_SweepCloseView BACKTRACK - - - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapInListStringStart_date BACKTRACK - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapInListStringStart_time BACKTRACK - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapInListStringStatus BACKTRACK - - - - - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_TapInListStringReminder BACKTRACK - - - - - - - - - - - - - - - - - - - - e_TapRandomListItemNotLast BACKTRACK /* If not 'Custom...' is selected. */ - - - - - - - - - - - - - - - - - - e_TapListItemLast - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseView BACKTRACK - - - - - - - - - - - - - - - - - - - - e_TapItem2 BACKTRACK /* If 'Time:' is selected. */ - - - - - - - - - - - - - - - - - - - - e_TapItem1 BACKTRACK /* If 'Date:' is selected. */ - - - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACK weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACK weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + v_CalendarAppointment + + + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + + + v_Date SUBGRAPH + + + + + + + + + + + + + v_Time SUBGRAPH + + + + + + + + + + + + + v_CalendarAppointmentStatus + + + + + + + + + + + + + v_CalendarAppointmentReminder + + + + + + + + + + + + + v_CalendarAppointmentReminderCustom + + + + + + + + + + + + + v_Time SUBGRAPH + + + + + + + + + + + + + v_Date SUBGRAPH + + + + + + + + + + + + + Stop + + + + + + + + + + + + + v_CalendarAppointmentSaveChanges + + + + + + + + + + + + + v_TimeMustBeLess + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + e_TapInListStringSubject BACKTRACK + + + + + + + + + + + + + + + + + e_SelectRandomListItem BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseView BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapInListStringStart_date BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapInListStringStart_time BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapInListStringStatus BACKTRACK + + + + + + + + + + + + + + + + + + e_TapRandomListItem + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_TapInListStringReminder BACKTRACK + + + + + + + + + + + + + + + + + + e_TapRandomListItemNotLast BACKTRACK /* If not 'Custom...' is selected. */ + + + + + + + + + + + + + + + + e_TapListItemLast + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView BACKTRACK + + + + + + + + + + + + + + + + + + e_TapItem2 BACKTRACK /* If 'Time:' is selected. */ + + + + + + + + + + + + + + + + + + e_TapItem1 BACKTRACK /* If 'Date:' is selected. */ + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp BACKTRACK weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseApp BACKTRACK weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml index 80439411..eb81ddcb 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml @@ -1,359 +1,267 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_Calendar_ToolsMenu - - - - - - - - - - - - v_CalendarAppointment SUBGRAPH - - - - - - - - - - - - Stop - - - - - - - - - - - - v_DeleteItems SUBGRAPH - - - - - - - - - - - - v_Date SUBGRAPH - - - - - - - - - - - - v_Audio SUBGRAPH - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_Calendar_ToolsMenu + + + + + + + + + + + v_CalendarAppointment SUBGRAPH + + + + + + + + + + + Stop + + + + + + + + + + + v_DeleteItems SUBGRAPH + + + + + + + + + + + v_Date SUBGRAPH + + + + + + + + + + + v_Audio SUBGRAPH + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + + e_TapIcon_4 + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/CallHistory.graphml b/graphwalker-cli/src/test/resources/graphml/test24/CallHistory.graphml index 3237d432..8292ff5c 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/CallHistory.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/CallHistory.graphml @@ -1,400 +1,313 @@ - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - - v_CallHistory - - - - - - - - - - - - - - v_CallHistory_ToolsMenu - - - - - - - - - - - - - - v_DeleteItems SUBGRAPH - - - - - - - - - - - - - - v_AddressBook_AddContact SUBGRAPH - - - - - - - - - - - - - - v_ContactTapToSelectNumber SUBGRAPH - - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* Only if enabled */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* Only if enabled */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_4 BACKTRACK /* Only if enabled */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + v_CallHistory + + + + + + + + + + + + + v_CallHistory_ToolsMenu + + + + + + + + + + + + + v_DeleteItems SUBGRAPH + + + + + + + + + + + + + v_AddressBook_AddContact SUBGRAPH + + + + + + + + + + + + + v_ContactTapToSelectNumber SUBGRAPH + + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* Only if enabled */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapIcon_1 BACKTRACK /* Only if enabled */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapIcon_4 BACKTRACK /* Only if enabled */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Camera.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Camera.graphml index ef184b46..e724e867 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Camera.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Camera.graphml @@ -1,1152 +1,871 @@ - - - - - - - - - - - Start - - - - - - - - - - - - v_CameraViewFinder - - - - - - - - - - - - v_Camera_ToolsMenu - - - - - - - - - - - - v_Camera_Settings - - - - - - - - - - - - v_Camera_Settings_Resolution - - - - - - - - - - - - v_Camera_ResetDefaultValues - - - - - - - - - - - - v_Camera_ToolsMenu_Reset - - - - - - - - - - - - v_Camera_Settings_WhiteBalance - - - - - - - - - - - - v_Camera_Settings_Brightness - - - - - - - - - - - - v_SavingImage - - - - - - - - - - - - v_SavingImage - - - - - - - - - - - - v_SendPictureAsMMS SUBGRAPH - - - - - - - - - - - - v_ImageViewer SUBGRAPH - - - - - - - - - - - - v_Camera_Settings_ColorSaturation - - - - - - - - - - - - v_Camera - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - e_TapTakePicture - - - - - - - - - - - - - - - - - - e_Wait_2s - - - - - - - - - - - - - - - - - - - - e_Wait_4s - - - - - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepCloseApp BLOCKED weight=0.05 - - - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* If enabled */ - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - e_TapItem3 - - - - - - - - - - - - - - - - e_TapItem4 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_CameraViewFinder + + + + + + + + + + + v_Camera_ToolsMenu + + + + + + + + + + + v_Camera_Settings + + + + + + + + + + + v_Camera_Settings_Resolution + + + + + + + + + + + v_Camera_ResetDefaultValues + + + + + + + + + + + v_Camera_ToolsMenu_Reset + + + + + + + + + + + v_Camera_Settings_WhiteBalance + + + + + + + + + + + v_Camera_Settings_Brightness + + + + + + + + + + + v_SavingImage + + + + + + + + + + + v_SavingImage + + + + + + + + + + + v_SendPictureAsMMS SUBGRAPH + + + + + + + + + + + v_ImageViewer SUBGRAPH + + + + + + + + + + + v_Camera_Settings_ColorSaturation + + + + + + + + + + + v_Camera + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + e_TapTakePicture + + + + + + + + + + + + + + + + e_Wait_2s + + + + + + + + + + + + + + + + + + e_Wait_4s + + + + + + + + + + + + + + + + + + e_TapRandomListItem + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + e_SweepCloseApp BLOCKED weight=0.05 + + + + + + + + + + + + + + e_TapIcon_1 BACKTRACK /* If enabled */ + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_TapItem2 + + + + + + + + + + + e_TapItem3 + + + + + + + + + + + + + + e_TapItem4 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/ContactFavorites.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ContactFavorites.graphml index 5443d68a..2dfeb832 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/ContactFavorites.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/ContactFavorites.graphml @@ -1,741 +1,579 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - - v_ContactFavorites - - - - - - - - - - - - - - v_ContactFavorites_ToolsMenu_1 - - - - - - - - - - - - - - v_ContactFavorites_ToolsMenu_2 - - - - - - - - - - - - - - v_AddressBook_AddContact SUBGRAPH - - - - - - - - - - - - - - v_ContactFavorite_DeleteFavorite - - - - - - - - - - - - - - v_AddressBook_ImportFromSIM - - - - - - - - - - - - - - v_AddressBook_ExportToSIM - - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK - - - - - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + v_ContactFavorites + + + + + + + + + + + + + v_ContactFavorites_ToolsMenu_1 + + + + + + + + + + + + + v_ContactFavorites_ToolsMenu_2 + + + + + + + + + + + + + v_AddressBook_AddContact SUBGRAPH + + + + + + + + + + + + + v_ContactFavorite_DeleteFavorite + + + + + + + + + + + + + v_AddressBook_ImportFromSIM + + + + + + + + + + + + + v_AddressBook_ExportToSIM + + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK + + + + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + + + + e_TapIcon_4 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml index 463eaf94..9e860bcd 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml @@ -1,107 +1,83 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_ContactFavoritesReadOnly SUBGRAPH - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_ContactFavoritesReadOnly SUBGRAPH + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml index 4ec59627..34757f09 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml @@ -1,637 +1,480 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_ContactTapToSelectNumber - - - - - - - - - - - - v_AddressBook_Contact_ToolsMenu - - - - - - - - - - - - v_SendMessage SUBGRAPH - - - - - - - - - - - - Stop - - - - - - - - - - - - v_KeyboardNumeric SUBGRAPH - - - - - - - - - - - - v_AddressBook_AddContact SUBGRAPH - - - - - - - - - - - - v_AddressBook_AddContact SUBGRAPH - - - - - - - - - - - - v_SendVCard SUBGRAPH - - - - - - - - - - - - v_MessagingInbox NO_MERGE - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled. */ - - - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - e_SweepShowKeyboard BACKTRACK /* Only if contact has a number */ - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - e_SweepClose - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_ContactTapToSelectNumber + + + + + + + + + + + v_AddressBook_Contact_ToolsMenu + + + + + + + + + + + v_SendMessage SUBGRAPH + + + + + + + + + + + Stop + + + + + + + + + + + v_KeyboardNumeric SUBGRAPH + + + + + + + + + + + v_AddressBook_AddContact SUBGRAPH + + + + + + + + + + + v_AddressBook_AddContact SUBGRAPH + + + + + + + + + + + v_SendVCard SUBGRAPH + + + + + + + + + + + v_MessagingInbox NO_MERGE + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled. */ + + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + e_SweepShowKeyboard BACKTRACK /* Only if contact has a number */ + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + e_SweepClose + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Contacts.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Contacts.graphml index 4f724681..d127a7c7 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Contacts.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Contacts.graphml @@ -1,294 +1,228 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_AddressBook SUBGRAPH - - - - - - - - - - - - v_ContactFavorites SUBGRAPH - - - - - - - - - - - - v_Contacts - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_AddressBook SUBGRAPH + + + + + + + + + + + v_ContactFavorites SUBGRAPH + + + + + + + + + + + v_Contacts + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/ContactsReadOnly.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ContactsReadOnly.graphml index 5caf84aa..a0bb43e9 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/ContactsReadOnly.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/ContactsReadOnly.graphml @@ -1,248 +1,194 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_AddressBookReadOnly SUBGRAPH - - - - - - - - - - - - v_ContactFavoritesReadOnly SUBGRAPH - - - - - - - - - - - - v_ContactsReadOnly - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_AddressBookReadOnly SUBGRAPH + + + + + + + + + + + v_ContactFavoritesReadOnly SUBGRAPH + + + + + + + + + + + v_ContactsReadOnly + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Date.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Date.graphml index f97eea17..96e909be 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Date.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Date.graphml @@ -1,139 +1,115 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - - v_Date - - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_PressRandomKey - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + v_Date + + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_PressRandomKey + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/DefaultValues.graphml b/graphwalker-cli/src/test/resources/graphml/test24/DefaultValues.graphml index ebd4ea61..4b8ed698 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/DefaultValues.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/DefaultValues.graphml @@ -1,337 +1,255 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_DefaultValues - - - - - - - - - - - - v_ResetDefaultValues - - - - - - - - - - - - v_SelectItems - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled. */ - - - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ - - - - - - - - - - - - - - - - - e_SelectRandomListItem /* Values different from default, will be listed. */ - - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_DefaultValues + + + + + + + + + + + v_ResetDefaultValues + + + + + + + + + + + v_SelectItems + + + + + + + + + + + Stop + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled. */ + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ + + + + + + + + + + + + + + + e_SelectRandomListItem /* Values different from default, will be listed. */ + + + + + + + + + + + + + + + e_TapRandomListItem + + + + + + + + + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/DeleteItems.graphml b/graphwalker-cli/src/test/resources/graphml/test24/DeleteItems.graphml index be1c27c8..d1651024 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/DeleteItems.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/DeleteItems.graphml @@ -1,335 +1,253 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_DeleteItems - - - - - - - - - - - - v_SelectItems - - - - - - - - - - - - Stop - - - - - - - - - - - - v_ConfirmDeleteItem - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled */ - - - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK /* If any items is selected */ - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - e_TryTapRandomListItem BACKTRACK - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseApp BLOCKED weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp BLOCKED weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp BLOCKED weight=0.05 - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_DeleteItems + + + + + + + + + + + v_SelectItems + + + + + + + + + + + Stop + + + + + + + + + + + v_ConfirmDeleteItem + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled */ + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled */ + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + e_SweepAccept BACKTRACK /* If any items is selected */ + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + e_TryTapRandomListItem BACKTRACK + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + e_SweepCloseApp BLOCKED weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp BLOCKED weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp BLOCKED weight=0.05 + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/GlobalSettings.graphml b/graphwalker-cli/src/test/resources/graphml/test24/GlobalSettings.graphml index 474e0642..1269b901 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/GlobalSettings.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/GlobalSettings.graphml @@ -1,628 +1,466 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_GlobalSettings - - - - - - - - - - - - Stop - - - - - - - - - - - - v_DisplaySettings - - - - - - - - - - - - v_SystemSettings - - - - - - - - - - - - v_CommunicationSettings - - - - - - - - - - - - v_AudioSettings - - - - - - - - - - - - v_GPRSSettings - - - - - - - - - - - - v_GPRSSettingsToolsMenu - - - - - - - - - - - - v_GPRSAddAPN - - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - v_TheNameAlreadyExists - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - e_TapIcon_2 - - - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_GlobalSettings + + + + + + + + + + + Stop + + + + + + + + + + + v_DisplaySettings + + + + + + + + + + + v_SystemSettings + + + + + + + + + + + v_CommunicationSettings + + + + + + + + + + + v_AudioSettings + + + + + + + + + + + v_GPRSSettings + + + + + + + + + + + v_GPRSSettingsToolsMenu + + + + + + + + + + + v_GPRSAddAPN + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + v_Dummy + + + + + + + + + + + v_TheNameAlreadyExists + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + e_TapIcon_2 + + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + + e_TapIcon_4 + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.05 + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_TapItem2 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + BACKTRACK + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/ImageViewer.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ImageViewer.graphml index 1ff4ad48..b9882ced 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/ImageViewer.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/ImageViewer.graphml @@ -1,165 +1,126 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_ImageViewer - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_ImageViewer + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardNumeric.graphml b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardNumeric.graphml index 880707a1..9fc8a618 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardNumeric.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardNumeric.graphml @@ -1,331 +1,250 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - Stop - - - - - - - - - - - - v_KeyboardNumeric - - - - - - - - - - - - v_PasteText - - - - - - - - - - - - v_KeyboardToolsMenu SUBGRAPH - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - e_SweepCloseView BACKTRACK weight=0.05 - - - - - - - - - - - - - - - - - e_PressRandomKey BACKTRACK weight=0.8 - - - - - - - - - - - - - - - - e_SweepShowKeyboard BACKTRACK /* If text exists in the clipboard. */ - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepShowTools BACKTRACK - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACK weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + Stop + + + + + + + + + + + v_KeyboardNumeric + + + + + + + + + + + v_PasteText + + + + + + + + + + + v_KeyboardToolsMenu SUBGRAPH + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + e_SweepCloseView BACKTRACK weight=0.05 + + + + + + + + + + + + + + + e_PressRandomKey BACKTRACK weight=0.8 + + + + + + + + + + + + + + e_SweepShowKeyboard BACKTRACK /* If text exists in the clipboard. */ + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_TapRandomListItem + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepShowTools BACKTRACK + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp BACKTRACK weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardText.graphml b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardText.graphml index a46bba76..eeebb502 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardText.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardText.graphml @@ -1,484 +1,367 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - Stop - - - - - - - - - - - - v_KeyboardText - - - - - - - - - - - - v_PasteText - - - - - - - - - - - - v_KeyboardToolsMenu SUBGRAPH - - - - - - - - - - - - v_KeyboardSelectWord - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - - - - - e_SweepCloseView BACKTRACK weight=0.25 - - - - - - - - - - - - - - - - - e_PressRandomKey BACKTRACK weight=0.5 - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - e_TryTapRandomListItem - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepShowTools BACKTRACK - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp BLOCKED BACKTRACK weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepShowKeyboard BACKTRACK - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - BACKTRACK - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + Stop + + + + + + + + + + + v_KeyboardText + + + + + + + + + + + v_PasteText + + + + + + + + + + + v_KeyboardToolsMenu SUBGRAPH + + + + + + + + + + + v_KeyboardSelectWord + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseView BACKTRACK weight=0.25 + + + + + + + + + + + + + + + e_PressRandomKey BACKTRACK weight=0.5 + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + e_TryTapRandomListItem + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepShowTools BACKTRACK + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + e_TapScreen + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp BLOCKED BACKTRACK weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepShowKeyboard BACKTRACK + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + BACKTRACK + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml index 2921b2da..21171880 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml @@ -1,1004 +1,752 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_KeyboardSettings - - - - - - - - - - - - v_SelectFavoriteKeyboards - - - - - - - - - - - - v_SelectKeyboardSpeed - - - - - - - - - - - - v_ChangeButtonVibration - - - - - - - - - - - - v_DefaultValues SUBGRAPH - - - - - - - - - - - - v_KeyboardToolsMenu - - - - - - - - - - - - v_SelectKeyboard - - - - - - - - - - - - Stop - - - - - - - - - - - - v_ConfirmClear - - - - - - - - - - - - v_CopyTo - - - - - - - - - - - - v_PasteText - - - - - - - - - - - - v_Preview - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - - e_TapItem3 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - e_MoveSliderRandom - - - - - - - - - - - - - - - - - e_MoveSliderRandom - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled */ - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled */ - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_TapIcon_3 BACKTRACK /* If Icon 3 is enabled */ - - - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - e_TapIcon_4 BACKTRACK /* If Icon 4 is enabled */ - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TryTapRandomListItem - - - - - - - - - - - - - - - - e_TapIcon_6 BACKTRACK /* If Icon 6 is enabled */ - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_KeyboardSettings + + + + + + + + + + + v_SelectFavoriteKeyboards + + + + + + + + + + + v_SelectKeyboardSpeed + + + + + + + + + + + v_ChangeButtonVibration + + + + + + + + + + + v_DefaultValues SUBGRAPH + + + + + + + + + + + v_KeyboardToolsMenu + + + + + + + + + + + v_SelectKeyboard + + + + + + + + + + + Stop + + + + + + + + + + + v_ConfirmClear + + + + + + + + + + + v_CopyTo + + + + + + + + + + + v_PasteText + + + + + + + + + + + v_Preview + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + e_TapItem2 + + + + + + + + + + + + + + e_TapItem3 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + e_MoveSliderRandom + + + + + + + + + + + + + + + e_MoveSliderRandom + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled */ + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled */ + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + e_TapIcon_3 BACKTRACK /* If Icon 3 is enabled */ + + + + + + + + + + + + + + + + e_TapRandomListItem + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + e_TapIcon_4 BACKTRACK /* If Icon 4 is enabled */ + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_TryTapRandomListItem + + + + + + + + + + + + + + e_TapIcon_6 BACKTRACK /* If Icon 6 is enabled */ + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Main.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Main.graphml index 928899f3..b97a7f85 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Main.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Main.graphml @@ -1,1170 +1,925 @@ - - - - - - - - - - - Start - - - - - - - - - - - - v_Contacts SUBGRAPH - - - - - - - - - - - - v_StatusScreen - - - - - - - - - - - - v_StartMenu - - - - - - - - - - - - v_Camera SUBGRAPH - - - - - - - - - - - - v_MessagingInbox SUBGRAPH - - - - - - - - - - - - v_MediaPlayer SUBGRAPH - - - - - - - - - - - - v_StartMenu_2 - - - - - - - - - - - - v_StartMenu_3 - - - - - - - - - - - - v_ShortCuts - - - - - - - - - - - - v_SysFiles SUBGRAPH - - - - - - - - - - - - v_RunningApplications SUBGRAPH - - - - - - - - - - - - v_Calendar SUBGRAPH - - - - - - - - - - - - v_Notes SUBGRAPH - - - - - - - - - - - - v_Tetris SUBGRAPH - - - - - - - - - - - - v_Alarm SUBGRAPH - - - - - - - - - - - - v_NeoBrowser SUBGRAPH - - - - - - - - - - - - v_Calculator SUBGRAPH - - - - - - - - - - - - v_NumberToDial SUBGRAPH - - - - - - - - - - - - v_GlobalSettings SUBGRAPH - - - - - - - - - - - - e_Init - - - - - - - - - - - - - - - - e_TapIcon_2 - - - - - - - - - - - - - - - - - - e_SweepShowStartMenu - - - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - - - e_TapIcon_6 - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepTabLeft weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepTabLeft weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepTabLeft weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepTabLeft weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - - - e_TapIcon_2 - - - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - e_TapIcon_6 - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - e_TapIcon_2 - - - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - - - e_SweepShowKeyboard - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_Contacts SUBGRAPH + + + + + + + + + + + v_StatusScreen + + + + + + + + + + + v_StartMenu + + + + + + + + + + + v_Camera SUBGRAPH + + + + + + + + + + + v_MessagingInbox SUBGRAPH + + + + + + + + + + + v_MediaPlayer SUBGRAPH + + + + + + + + + + + v_StartMenu_2 + + + + + + + + + + + v_StartMenu_3 + + + + + + + + + + + v_ShortCuts + + + + + + + + + + + v_SysFiles SUBGRAPH + + + + + + + + + + + v_RunningApplications SUBGRAPH + + + + + + + + + + + v_Calendar SUBGRAPH + + + + + + + + + + + v_Notes SUBGRAPH + + + + + + + + + + + v_Tetris SUBGRAPH + + + + + + + + + + + v_Alarm SUBGRAPH + + + + + + + + + + + v_NeoBrowser SUBGRAPH + + + + + + + + + + + v_Calculator SUBGRAPH + + + + + + + + + + + v_NumberToDial SUBGRAPH + + + + + + + + + + + v_GlobalSettings SUBGRAPH + + + + + + + + + + + e_Init + + + + + + + + + + + + + + e_TapIcon_2 + + + + + + + + + + + + + + + + e_SweepShowStartMenu + + + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + e_TapIcon_6 + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + e_SweepTabLeft weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepTabLeft weight=0.05 + + + + + + + + + + + + + + + + e_SweepTabLeft weight=0.05 + + + + + + + + + + + + + + + + e_SweepTabLeft weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.05 + + + + + + + + + + + + + + + + e_TapIcon_2 + + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + + e_TapIcon_4 + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + e_TapIcon_6 + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + e_TapIcon_2 + + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + + e_SweepShowKeyboard + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MakeCall.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MakeCall.graphml index 83af131b..98bf9575 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/MakeCall.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/MakeCall.graphml @@ -1,185 +1,143 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_MakeCall - - - - - - - - - - - - v_OutgoingCall - - - - - - - - - - - - v_NoSIMCard - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - e_NoSIMCard BACKTRACK /* If no SIM card inserted in the phone */ - - - - - - - - - - - - - - - - - - e_Wait_5s - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_MakeCall + + + + + + + + + + + v_OutgoingCall + + + + + + + + + + + v_NoSIMCard + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + e_NoSIMCard BACKTRACK /* If no SIM card inserted in the phone */ + + + + + + + + + + + + + + + + e_Wait_5s + + + + + + + + + + + + + + e_SweepCloseView + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MediaPlayer.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MediaPlayer.graphml index 1b24d5cc..cfa9757f 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/MediaPlayer.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/MediaPlayer.graphml @@ -1,1125 +1,854 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_MediaPlayerChoose - - - - - - - - - - - - v_MediaPlayerPlayList - - - - - - - - - - - - v_MediaPlayerToolsMenu1 - - - - - - - - - - - - v_MediaPlayerVolume - - - - - - - - - - - - v_MediaPlayerToolsMenu2 - - - - - - - - - - - - v_MediaPlayerToolsMenu - - - - - - - - - - - - v_MediaPlayerPlayer - - - - - - - - - - - - v_MediaPlayerSettings - - - - - - - - - - - - v_CreatePlaylist - - - - - - - - - - - - v_MediaPlayerAddFile - - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - - v_MediaPlayerPosition - - - - - - - - - - - - v_EditPlaylist - - - - - - - - - - - - v_MediaPlayer - - - - - - - - - - - - Stop - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - v_SavePlaylistError - - - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - e_SweepShowTools BACKTRACK - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - - - - e_MoveSliderRandom - - - - - - - - - - - - - - - - e_TapIcon_3 BACKTRACK - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - e_MoveSliderRandom - - - - - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK - - - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK - - - - - - - - - - - - - - - - - - e_TapIcon_5 BACKTRACK - - - - - - - - - - - - - - - - - - e_TapIcon_6 BACKTRACK - - - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.1 - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.1 - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_MediaPlayerChoose + + + + + + + + + + + v_MediaPlayerPlayList + + + + + + + + + + + v_MediaPlayerToolsMenu1 + + + + + + + + + + + v_MediaPlayerVolume + + + + + + + + + + + v_MediaPlayerToolsMenu2 + + + + + + + + + + + v_MediaPlayerToolsMenu + + + + + + + + + + + v_MediaPlayerPlayer + + + + + + + + + + + v_MediaPlayerSettings + + + + + + + + + + + v_CreatePlaylist + + + + + + + + + + + v_MediaPlayerAddFile + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + v_MediaPlayerPosition + + + + + + + + + + + v_EditPlaylist + + + + + + + + + + + v_MediaPlayer + + + + + + + + + + + Stop + + + + + + + + + + + v_Dummy + + + + + + + + + + + v_SavePlaylistError + + + + + + + + + + + + + + e_TapIcon_4 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + e_TapItem2 + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + e_SweepShowTools BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_TapIcon_4 + + + + + + + + + + + + + + + e_MoveSliderRandom + + + + + + + + + + + + + + e_TapIcon_3 BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + e_MoveSliderRandom + + + + + + + + + + + + + + + + e_TapIcon_1 BACKTRACK + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK + + + + + + + + + + + + + + + + e_TapIcon_5 BACKTRACK + + + + + + + + + + + + + + + + e_TapIcon_6 BACKTRACK + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.1 + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.1 + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MessagingCompose.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MessagingCompose.graphml index 794df213..29d25974 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/MessagingCompose.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/MessagingCompose.graphml @@ -1,616 +1,466 @@ - - - - - - - - - - - Start - - - - - - - - - - - - v_MessagingCompose - - - - - - - - - - - - v_MessagingCompose_ToolsMenu - - - - - - - - - - - - v_ContactsReadOnly SUBGRAPH - - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - - Stop - - - - - - - - - - - - v_MessageEmpty - - - - - - - - - - - - v_NoRecipient - - - - - - - - - - - - v_SendFailed - - - - - - - - - - - - v_SendingMessage - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_TapInListStringTo - - - - - - - - - - - - - - - - - - e_TapInListStringText - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_Wait_5s - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - e_Wait_5s - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_MessagingCompose + + + + + + + + + + + v_MessagingCompose_ToolsMenu + + + + + + + + + + + v_ContactsReadOnly SUBGRAPH + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + Stop + + + + + + + + + + + v_MessageEmpty + + + + + + + + + + + v_NoRecipient + + + + + + + + + + + v_SendFailed + + + + + + + + + + + v_SendingMessage + + + + + + + + + + + v_Dummy + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_TapInListStringTo + + + + + + + + + + + + + + + + e_TapInListStringText + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_Wait_5s + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + e_Wait_5s + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + BACKTRACK + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MessagingDrafts.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MessagingDrafts.graphml index bf2e09bf..1ab48945 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/MessagingDrafts.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/MessagingDrafts.graphml @@ -1,175 +1,133 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_MessagingInbox MERGE - - - - - - - - - - - - v_MessagingDrafts - - - - - - - - - - - - v_MessagingSent MERGE - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_MessagingInbox MERGE + + + + + + + + + + + v_MessagingDrafts + + + + + + + + + + + v_MessagingSent MERGE + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MessagingInbox.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MessagingInbox.graphml index 4923039d..24980d58 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/MessagingInbox.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/MessagingInbox.graphml @@ -1,306 +1,233 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_MessagingInbox - - - - - - - - - - - - v_MessagingDrafts SUBGRAPH - - - - - - - - - - - - v_MessagingSent SUBGRAPH - - - - - - - - - - - - v_MessagingInbox_ToolsMenu - - - - - - - - - - - - v_MessagingCompose SUBGRAPH - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_MessagingInbox + + + + + + + + + + + v_MessagingDrafts SUBGRAPH + + + + + + + + + + + v_MessagingSent SUBGRAPH + + + + + + + + + + + v_MessagingInbox_ToolsMenu + + + + + + + + + + + v_MessagingCompose SUBGRAPH + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MessagingSent.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MessagingSent.graphml index 04ff97cb..249a9191 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/MessagingSent.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/MessagingSent.graphml @@ -1,175 +1,133 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_MessagingInbox MERGE - - - - - - - - - - - - v_MessagingSent - - - - - - - - - - - - v_MessagingDrafts MERGE - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_MessagingInbox MERGE + + + + + + + + + + + v_MessagingSent + + + + + + + + + + + v_MessagingDrafts MERGE + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + e_SweepTabRight + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/NeoBrowser.graphml b/graphwalker-cli/src/test/resources/graphml/test24/NeoBrowser.graphml index 720fe164..a4822855 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/NeoBrowser.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/NeoBrowser.graphml @@ -1,1245 +1,951 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_NeoBrowser - - - - - - - - - - - - v_NeoBrowserToolsMenu_1 - - - - - - - - - - - - v_URLEntered - - - - - - - - - - - - v_NoPageToDisplay - - - - - - - - - - - - v_QuitBrowser - - - - - - - - - - - - v_InternetConnErr - - - - - - - - - - - - v_EnterURL - - - - - - - - - - - - v_SelectFontSize - - - - - - - - - - - - v_Favorites - - - - - - - - - - - - v_NeoBrowserToolsMenu_2 - - - - - - - - - - - - v_NeoBrowserSettings - - - - - - - - - - - - v_KeyboardText - - - - - - - - - - - - v_SelectWWWAPN - - - - - - - - - - - - v_NeoBrowserWin - - - - - - - - - - - - v_NoInternetConnErr - - - - - - - - - - - - Stop - - - - - - - - - - - - v_BrowserStatusScreen - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - e_EnterValidURL - - - - - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - e_TapIcon_6 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_SweepShowKeyboard - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_EnterInvalidURL - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_TryTapRandomListItem BACKTRACK - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_NeoBrowser + + + + + + + + + + + v_NeoBrowserToolsMenu_1 + + + + + + + + + + + v_URLEntered + + + + + + + + + + + v_NoPageToDisplay + + + + + + + + + + + v_QuitBrowser + + + + + + + + + + + v_InternetConnErr + + + + + + + + + + + v_EnterURL + + + + + + + + + + + v_SelectFontSize + + + + + + + + + + + v_Favorites + + + + + + + + + + + v_NeoBrowserToolsMenu_2 + + + + + + + + + + + v_NeoBrowserSettings + + + + + + + + + + + v_KeyboardText + + + + + + + + + + + v_SelectWWWAPN + + + + + + + + + + + v_NeoBrowserWin + + + + + + + + + + + v_NoInternetConnErr + + + + + + + + + + + Stop + + + + + + + + + + + v_BrowserStatusScreen + + + + + + + + + + + v_Dummy + + + + + + + + + + + v_Dummy + + + + + + + + + + + v_Dummy + + + + + + + + + + + v_Dummy + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + e_EnterValidURL + + + + + + + + + + + + + + + + e_TapIcon_3 + + + + + + + + + + + e_TapIcon_6 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapRandomListItem + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + + + e_SweepTabLeft + + + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + e_SweepShowKeyboard + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + e_EnterInvalidURL + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + e_TryTapRandomListItem BACKTRACK + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Notes.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Notes.graphml index df2d59a9..8a45f8af 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Notes.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Notes.graphml @@ -1,584 +1,440 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_Notes - - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - - v_NoteHasChanged - - - - - - - - - - - - v_Notes_View - - - - - - - - - - - - v_Notes_ToolsMenu - - - - - - - - - - - - v_DeleteItems SUBGRAPH - - - - - - - - - - - - Stop - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_TryTapListItemNotFirst BACKTRACK /* If note exists */ - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If icon enabled */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapListItemFirst - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseView BLOCKED weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_Notes + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + v_NoteHasChanged + + + + + + + + + + + v_Notes_View + + + + + + + + + + + v_Notes_ToolsMenu + + + + + + + + + + + v_DeleteItems SUBGRAPH + + + + + + + + + + + Stop + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + e_SweepCloseView weight=0.05 + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + + + e_SweepAccept BACKTRACK + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + e_TryTapListItemNotFirst BACKTRACK /* If note exists */ + + + + + + + + + + + + + + + + + + + + + + e_TapIcon_2 BACKTRACK /* If icon enabled */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_TapListItemFirst + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + e_SweepCloseView BLOCKED weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + BACKTRACK + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/NumberToDial.graphml b/graphwalker-cli/src/test/resources/graphml/test24/NumberToDial.graphml index 69c19caf..273f4634 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/NumberToDial.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/NumberToDial.graphml @@ -1,275 +1,208 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_NumberToDial - - - - - - - - - - - - Stop - - - - - - - - - - - - v_PasteText - - - - - - - - - - - - v_KeyboardToolsMenu SUBGRAPH - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepShowKeyboard BACKTRACK /* If text exists in the clipboard. */ - - - - - - - - - - - - - - - - - - e_TryTapRandomListItem BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_NumberToDial + + + + + + + + + + + Stop + + + + + + + + + + + v_PasteText + + + + + + + + + + + v_KeyboardToolsMenu SUBGRAPH + + + + + + + + + + + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + e_SweepShowKeyboard BACKTRACK /* If text exists in the clipboard. */ + + + + + + + + + + + + + + + + e_TryTapRandomListItem BACKTRACK + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/RunningApplications.graphml b/graphwalker-cli/src/test/resources/graphml/test24/RunningApplications.graphml index 45559b26..5492292d 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/RunningApplications.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/RunningApplications.graphml @@ -1,315 +1,238 @@ - + - - - - - - - - - - - Start - - - - - - - - - - - - v_RunningApplications - - - - - - - - - - - - v_RunningApplicationsToolMenu - - - - - - - - - - - - v_RunningApplicationsSettings - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - - - e_TapIcon_3 BACKTRACK - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_RunningApplications + + + + + + + + + + + v_RunningApplicationsToolMenu + + + + + + + + + + + v_RunningApplicationsSettings + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + e_SweepShowTools + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_TapIcon_1 + + + + + + + + + + + + + + e_TapIcon_5 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + e_TapItem1 + + + + + + + + + + + + + + + + e_TapIcon_3 BACKTRACK + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/SendMessage.graphml b/graphwalker-cli/src/test/resources/graphml/test24/SendMessage.graphml index 365d3495..bacc8f4e 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/SendMessage.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/SendMessage.graphml @@ -1,293 +1,231 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - - v_MessagingCompose SUBGRAPH - - - - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - v_SendMessage. - - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - BACKTRACK /* - No text entered */ - - - - - - - - - - - - - - - - - BACKTRACK /* - Text entered */ - - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + v_MessagingCompose SUBGRAPH + + + + + + + + + + + + + v_KeyboardText SUBGRAPH + + + + + + + + + + + + + Stop + + + + + + + + + + + + + v_SendMessage. + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + BACKTRACK /* No text entered */ + + + + + + + + + + + + + + + + BACKTRACK /* Text entered */ + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/SendPictureAsMMS.graphml b/graphwalker-cli/src/test/resources/graphml/test24/SendPictureAsMMS.graphml index 8774889b..119fa590 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/SendPictureAsMMS.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/SendPictureAsMMS.graphml @@ -1,577 +1,448 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - - v_SendPictureAsMMS - - - - - - - - - - - - - - v_ConfirmResize - - - - - - - - - - - - - - v_EditSlide - - - - - - - - - - - - - - v_SaveSlideChanges - - - - - - - - - - - - - - v_ComposeMMS MERGE - - - - - - - - - - - - - - v_Slides - - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - BACKTRACK /* - Image resized */ - - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + v_SendPictureAsMMS + + + + + + + + + + + + + v_ConfirmResize + + + + + + + + + + + + + v_EditSlide + + + + + + + + + + + + + v_SaveSlideChanges + + + + + + + + + + + + + v_ComposeMMS MERGE + + + + + + + + + + + + + v_Slides + + + + + + + + + + + + + Stop + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + e_TapScreen + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + BACKTRACK /* Image resized */ + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/SendVCard.graphml b/graphwalker-cli/src/test/resources/graphml/test24/SendVCard.graphml index 3d578bea..e1dbeb94 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/SendVCard.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/SendVCard.graphml @@ -1,758 +1,589 @@ - + - - - - - - - - - - - - - - - v_SendVCard - - - - - - - - - - - - - - Start - - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - v_MessagingInbox NO_MERGE - - - - - - - - - - - - - - v_KeyboardNumeric SUBGRAPH - - - - - - - - - - - - - - v_EditTo - - - - - - - - - - - - - - v_NoRecipient - - - - - - - - - - - - - - v_ContactsReadOnly - - - - - - - - - - - - - - v_ContactTapToSelectNumber NO_MERGE - - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepShowKeyboard BACKTRACK /* Only contact has a number */ - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - - - - - e_TapRandomListItem BACKTRACK /* Only allowed when there are numbers in the list */ - - - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - BACKTRACK /* - Recipient dose no exist */ - - - - - - - - - - - - - - BACKTRACK /* - Recipient exists */ - - - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - + + + + + + + + + + + + + + + v_SendVCard + + + + + + + + + + + + + Start + + + + + + + + + + + + + Stop + + + + + + + + + + + + + v_MessagingInbox NO_MERGE + + + + + + + + + + + + + v_KeyboardNumeric SUBGRAPH + + + + + + + + + + + + + v_EditTo + + + + + + + + + + + + + v_NoRecipient + + + + + + + + + + + + + v_ContactsReadOnly + + + + + + + + + + + + + v_ContactTapToSelectNumber NO_MERGE + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + v_Dummy + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepShowKeyboard BACKTRACK /* Only contact has a number */ + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + e_SelectRandomListItem + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + + + + + + + e_TapRandomListItem BACKTRACK /* Only allowed when there are numbers in the list */ + + + + + + + + + + + + + + + + e_TapScreen + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + + + + + + + + + + BACKTRACK /* Recipient dose no exist */ + + + + + + + + + + + + + BACKTRACK /* Recipient exists */ + + + + + + + + + + + + + + + + e_TapScreen + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/SysFiles.graphml b/graphwalker-cli/src/test/resources/graphml/test24/SysFiles.graphml index a8858704..0adaa6f2 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/SysFiles.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/SysFiles.graphml @@ -1,123 +1,99 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - - v_SysFiles - - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + v_SysFiles + + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Tetris.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Tetris.graphml index 64c90a13..9fb3fec2 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Tetris.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Tetris.graphml @@ -1,180 +1,142 @@ - + - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - - v_Tetris - - - - - - - - - - - - - - v_QuitTetris - - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - + + + + + + + + + + + + + + + Start + + + + + + + + + + + + + v_Tetris + + + + + + + + + + + + + v_QuitTetris + + + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + e_SweepCloseView + + + + + + + + + + + + + + + + + + e_SweepAccept + + + + + + + diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Time.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Time.graphml index f3a21e48..9b2b3d7f 100644 --- a/graphwalker-cli/src/test/resources/graphml/test24/Time.graphml +++ b/graphwalker-cli/src/test/resources/graphml/test24/Time.graphml @@ -1,126 +1,98 @@ - - - - - - - - - - - Start - - - - - - - - - - - - v_Time - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - e_PressRandomKey - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - + + + + + + + + + + + Start + + + + + + + + + + + v_Time + + + + + + + + + + + Stop + + + + + + + + + + + + + + + + + + + + + + + + + e_PressRandomKey + + + + + + + + + + + + + + + + BACKTRACK + + + + + + + + + + + + + + + + e_SweepCloseApp weight=0.05 + + + + + diff --git a/graphwalker-cli/src/test/resources/xml/ReachedVertex.xml b/graphwalker-cli/src/test/resources/xml/ReachedVertex.xml index f8986ff9..2c947cd0 100644 --- a/graphwalker-cli/src/test/resources/xml/ReachedVertex.xml +++ b/graphwalker-cli/src/test/resources/xml/ReachedVertex.xml @@ -1,7 +1,7 @@ - - - - - - - - + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init6.xml b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init6.xml index c88fa662..b656623e 100644 --- a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init6.xml +++ b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init6.xml @@ -1,7 +1,7 @@ - - - - - - + + + + + + diff --git a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init8.xml b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init8.xml index a086f3fb..9af92c78 100644 --- a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init8.xml +++ b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init8.xml @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init9.xml b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init9.xml index 7882c2bd..82b9b5f4 100644 --- a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init9.xml +++ b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init9.xml @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Application.java b/graphwalker-core/src/main/java/org/graphwalker/core/Application.java index 59fe482d..ea1ca61e 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Application.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Application.java @@ -25,14 +25,39 @@ */ package org.graphwalker.core; +/** + *

Application interface.

+ * + * @author nilols + * @version $Id: $ + */ public interface Application { + /** + *

getStatus.

+ * + * @return a {@link org.graphwalker.core.Status} object. + */ Status getStatus(); + /** + *

setButtons.

+ */ void setButtons(); + /** + *

updateLayout.

+ */ void updateLayout(); + /** + *

pause.

+ */ void pause(); + /** + *

executingJavaTest.

+ * + * @param flag a boolean. + */ void executingJavaTest(boolean flag); } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java b/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java index f6995e49..bab63712 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java @@ -31,15 +31,33 @@ import java.net.URL; import java.net.URLClassLoader; +/** + *

ClassPathHack class.

+ * + * @author nilols + * @version $Id: $ + */ public class ClassPathHack { private static final Class[] parameters = new Class[]{URL.class}; + /** + *

addFile.

+ * + * @param f a {@link java.io.File} object. + * @throws java.io.IOException if any. + */ @SuppressWarnings("deprecation") public static void addFile(File f) throws IOException { // f.toURL is deprecated addURL(f.toURL()); } + /** + *

addURL.

+ * + * @param u a {@link java.net.URL} object. + * @throws java.io.IOException if any. + */ protected static void addURL(URL u) throws IOException { URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader(); Class sysclass = URLClassLoader.class; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java b/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java index 02a2d9e3..14905ee7 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java @@ -31,6 +31,12 @@ import java.util.Stack; import java.util.Vector; +/** + *

EventDrivenModels class.

+ * + * @author nilols + * @version $Id: $ + */ public class EventDrivenModels { private static Logger logger = Util.setupLogger(EventDrivenModels.class); Vector models = new Vector(); @@ -39,25 +45,53 @@ public class EventDrivenModels { private ThreadWrapper executingModel = null; private static final Object lockbox = new Object(); + /** + *

Constructor for EventDrivenModels.

+ * + * @param executionClass a {@link java.lang.Object} object. + */ public EventDrivenModels(Object executionClass) { this.executionClass = executionClass; } + /** + *

Constructor for EventDrivenModels.

+ */ public EventDrivenModels() { } + /** + *

Getter for the field models.

+ * + * @return a {@link java.util.Vector} object. + */ public Vector getModels() { return models; } + /** + *

addModel.

+ * + * @param model a {@link org.graphwalker.core.ModelBasedTesting} object. + */ public void addModel(ModelBasedTesting model) { models.add(model); } + /** + *

runModel.

+ * + * @param modelName a {@link java.lang.String} object. + */ public void runModel(String modelName) { stopAndSwitchModel(modelName); } + /** + *

stopAndSwitchModel.

+ * + * @param modelName a {@link java.lang.String} object. + */ public void stopAndSwitchModel(String modelName) { logger.debug("Will switch to model: " + modelName); if (executingModel != null) { @@ -76,6 +110,11 @@ public void stopAndSwitchModel(String modelName) { throw new RuntimeException("Did not find a model: " + modelName); } + /** + *

pauseAndSwitchModel.

+ * + * @param modelName a {@link java.lang.String} object. + */ public void pauseAndSwitchModel(String modelName) { logger.debug("Will switch to model: " + modelName); if (executingModel != null) { @@ -95,6 +134,9 @@ public void pauseAndSwitchModel(String modelName) { throw new RuntimeException("Did not find a model: " + modelName); } + /** + *

waitToFinish.

+ */ public void waitToFinish() { try { while (true) { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java b/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java index ea5cb89e..c2853e42 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java @@ -1,161 +1,164 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -/** - * - */ -package org.graphwalker.core; - -/** - * @author Johan Tejle - */ -public class ExtendedMain { - /** - * This method implements the Edge 'e_Cancel' - */ - public void e_Cancel() { - System.out.println("Edge: e_Cancel"); - } - - /** - * This method implements the Edge 'e_ChangeDatabase' - */ - public void e_ChangeDatabase() { - System.out.println("Edge: e_ChangeDatabase"); - } - - /** - * This method implements the Edge 'e_CloseApp' - */ - public void e_CloseApp() { - System.out.println("Edge: e_CloseApp"); - } - - /** - * This method implements the Edge 'e_CloseDB' - */ - public void e_CloseDB() { - System.out.println("Edge: e_CloseDB"); - } - - /** - * This method implements the Edge 'e_CloseDialog' - */ - public void e_CloseDialog() { - System.out.println("Edge: e_CloseDialog"); - } - - /** - * This method implements the Edge 'e_EnterCorrectKey' - */ - public void e_EnterCorrectKey() { - System.out.println("Edge: e_EnterCorrectKey"); - } - - /** - * This method implements the Edge 'e_EnterInvalidKey' - */ - public void e_EnterInvalidKey() { - System.out.println("Edge: e_EnterInvalidKey"); - } - - /** - * This method implements the Edge 'e_Initialize' - */ - public void e_Initialize() { - System.out.println("Edge: e_Initialize"); - } - - /** - * This method implements the Edge 'e_No' - */ - public void e_No() { - System.out.println("Edge: e_No"); - } - - /** - * This method implements the Edge 'e_Start' - */ - public void e_Start() { - System.out.println("Edge: e_Start"); - } - - /** - * This method implements the Edge 'e_StartWithDatabase' - */ - public void e_StartWithDatabase() { - System.out.println("Edge: e_StartWithDatabase"); - } - - /** - * This method implements the Edge 'e_Yes' - */ - public void e_Yes() { - System.out.println("Edge: e_Yes"); - } - - /** - * This method implements the Vertex 'v_EnterMasterCompositeMasterKey' - */ - public void v_EnterMasterCompositeMasterKey() { - System.out.println("Vertex: v_EnterMasterCompositeMasterKey"); - } - - /** - * This method implements the Vertex 'v_InvalidKey' - */ - public void v_InvalidKey() { - System.out.println("Vertex: v_InvalidKey"); - } - - /** - * This method implements the Vertex 'v_KeePassNotRunning' - */ - public void v_KeePassNotRunning() { - System.out.println("Vertex: v_KeePassNotRunning"); - } - - /** - * This method implements the Vertex 'v_MainWindowEmpty' - */ - public void v_MainWindowEmpty() { - System.out.println("Vertex: v_MainWindowEmpty"); - } - - /** - * This method implements the Vertex 'v_MainWindow_DB_Loaded' - */ - public void v_MainWindow_DB_Loaded() { - System.out.println("Vertex: v_MainWindow_DB_Loaded"); - } - - /** - * This method implements the Vertex 'v_SaveBeforeCloseLock' - */ - public void v_SaveBeforeCloseLock() { - System.out.println("Vertex: v_SaveBeforeCloseLock"); - } -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +/** + * + */ +package org.graphwalker.core; + +/** + *

ExtendedMain class.

+ * + * @author Johan Tejle + * @version $Id: $ + */ +public class ExtendedMain { + /** + * This method implements the Edge 'e_Cancel' + */ + public void e_Cancel() { + System.out.println("Edge: e_Cancel"); + } + + /** + * This method implements the Edge 'e_ChangeDatabase' + */ + public void e_ChangeDatabase() { + System.out.println("Edge: e_ChangeDatabase"); + } + + /** + * This method implements the Edge 'e_CloseApp' + */ + public void e_CloseApp() { + System.out.println("Edge: e_CloseApp"); + } + + /** + * This method implements the Edge 'e_CloseDB' + */ + public void e_CloseDB() { + System.out.println("Edge: e_CloseDB"); + } + + /** + * This method implements the Edge 'e_CloseDialog' + */ + public void e_CloseDialog() { + System.out.println("Edge: e_CloseDialog"); + } + + /** + * This method implements the Edge 'e_EnterCorrectKey' + */ + public void e_EnterCorrectKey() { + System.out.println("Edge: e_EnterCorrectKey"); + } + + /** + * This method implements the Edge 'e_EnterInvalidKey' + */ + public void e_EnterInvalidKey() { + System.out.println("Edge: e_EnterInvalidKey"); + } + + /** + * This method implements the Edge 'e_Initialize' + */ + public void e_Initialize() { + System.out.println("Edge: e_Initialize"); + } + + /** + * This method implements the Edge 'e_No' + */ + public void e_No() { + System.out.println("Edge: e_No"); + } + + /** + * This method implements the Edge 'e_Start' + */ + public void e_Start() { + System.out.println("Edge: e_Start"); + } + + /** + * This method implements the Edge 'e_StartWithDatabase' + */ + public void e_StartWithDatabase() { + System.out.println("Edge: e_StartWithDatabase"); + } + + /** + * This method implements the Edge 'e_Yes' + */ + public void e_Yes() { + System.out.println("Edge: e_Yes"); + } + + /** + * This method implements the Vertex 'v_EnterMasterCompositeMasterKey' + */ + public void v_EnterMasterCompositeMasterKey() { + System.out.println("Vertex: v_EnterMasterCompositeMasterKey"); + } + + /** + * This method implements the Vertex 'v_InvalidKey' + */ + public void v_InvalidKey() { + System.out.println("Vertex: v_InvalidKey"); + } + + /** + * This method implements the Vertex 'v_KeePassNotRunning' + */ + public void v_KeePassNotRunning() { + System.out.println("Vertex: v_KeePassNotRunning"); + } + + /** + * This method implements the Vertex 'v_MainWindowEmpty' + */ + public void v_MainWindowEmpty() { + System.out.println("Vertex: v_MainWindowEmpty"); + } + + /** + * This method implements the Vertex 'v_MainWindow_DB_Loaded' + */ + public void v_MainWindow_DB_Loaded() { + System.out.println("Vertex: v_MainWindow_DB_Loaded"); + } + + /** + * This method implements the Vertex 'v_SaveBeforeCloseLock' + */ + public void v_SaveBeforeCloseLock() { + System.out.println("Vertex: v_SaveBeforeCloseLock"); + } +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java b/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java index f5722fde..8497cd98 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java @@ -36,6 +36,9 @@ * Handles the common constants for the org.graphwalker package. This includes * reserved key words, and text strings used for storing custom data as * UserDatum in graphs, vertices and edges. + * + * @author nilols + * @version $Id: $ */ public class Keywords { @@ -233,38 +236,55 @@ public class Keywords { */ public static final String DIJKSTRA = "dijkstra"; + /** Constant CONDITION_REACHED_EDGE=1001 */ public static final int CONDITION_REACHED_EDGE = 1001; + /** Constant CONDITION_REACHED_VERTEX=1002 */ public static final int CONDITION_REACHED_VERTEX = 1002; + /** Constant CONDITION_EDGE_COVERAGE=1003 */ public static final int CONDITION_EDGE_COVERAGE = 1003; + /** Constant CONDITION_VERTEX_COVERAGE=1004 */ public static final int CONDITION_VERTEX_COVERAGE = 1004; + /** Constant CONDITION_TEST_LENGTH=1005 */ public static final int CONDITION_TEST_LENGTH = 1005; + /** Constant CONDITION_TEST_DURATION=1006 */ public static final int CONDITION_TEST_DURATION = 1006; + /** Constant CONDITION_REQUIREMENT_COVERAGE=1007 */ public static final int CONDITION_REQUIREMENT_COVERAGE = 1007; + /** Constant CONDITION_REACHED_REQUIREMENT=1008 */ public static final int CONDITION_REACHED_REQUIREMENT = 1008; + /** Constant CONDITION_NEVER=1009 */ public static final int CONDITION_NEVER = 1009; + /** Constant GENERATOR_RANDOM=2001 */ public static final int GENERATOR_RANDOM = 2001; + /** Constant GENERATOR_A_STAR=2002 */ public static final int GENERATOR_A_STAR = 2002; + /** Constant GENERATOR_LIST=2003 */ public static final int GENERATOR_LIST = 2003; + /** Constant GENERATOR_STUB=2004 */ public static final int GENERATOR_STUB = 2004; + /** Constant GENERATOR_REQUIREMENTS=2005 */ public static final int GENERATOR_REQUIREMENTS = 2005; + /** Constant GENERATOR_SHORTEST_NON_OPTIMIZED=2006 */ public static final int GENERATOR_SHORTEST_NON_OPTIMIZED = 2006; + /** Constant GENERATOR_MANUAL_HTML=2007 */ public static final int GENERATOR_MANUAL_HTML = 2007; + /** Constant GENERATOR_ALL_PATH_PERMUTATIONS=2008 */ public static final int GENERATOR_ALL_PATH_PERMUTATIONS = 2008; /** @@ -285,6 +305,9 @@ public class Keywords { /** * Returns true if the wordToCheck is a pre-defined key word. + * + * @param wordToCheck a {@link java.lang.String} object. + * @return a boolean. */ public static boolean isKeyWord(final String wordToCheck) { return Keywords.reservedKeyWords.contains(wordToCheck.toUpperCase()); @@ -333,6 +356,8 @@ public void setId(final Integer id) { /** * Defines the stop-condition strings + * + * @return a {@link java.util.Vector} object. */ static { Keywords.stopConditions.add(new StopCondition("REACHED_EDGE", "REACHED_EDGE:", Keywords.CONDITION_REACHED_EDGE)); @@ -351,7 +376,6 @@ public void setId(final Integer id) { Keywords.CONDITION_REACHED_REQUIREMENT)); Keywords.stopConditions.add(new StopCondition("NEVER", "NEVER", Keywords.CONDITION_NEVER)); } - static public Vector getStopConditions() { return Keywords.stopConditions; } @@ -369,10 +393,12 @@ static private boolean isStopCondition(final String presumedCondition) { } /** - * @param stopCondition + *

getStopCondition.

+ * + * @param stopCondition a {@link java.lang.String} object. * @return if supplied with a valid stop condition returns its constant value. * returns -1 if supplied with false value. - * @throws StopConditionException + * @throws org.graphwalker.core.exceptions.StopConditionException if any. */ static public int getStopCondition(final String stopCondition) throws StopConditionException { if (!isStopCondition(stopCondition)) { @@ -443,6 +469,8 @@ public void setPublished(final Boolean published) { /** * Defines the generators strings + * + * @return a {@link java.util.Vector} object. */ static { Keywords.generators.add(new Generator("RANDOM", "RANDOM", Keywords.GENERATOR_RANDOM, true)); @@ -455,7 +483,6 @@ public void setPublished(final Boolean published) { Keywords.generators .add(new Generator("ALL_PATH_PERMUTATIONS", "ALL_PATH_PERMUTATIONS", Keywords.GENERATOR_ALL_PATH_PERMUTATIONS, true)); } - static public Vector getGenerators() { return Keywords.generators; } @@ -473,10 +500,12 @@ static private boolean isGenerator(final String presumedGenerator) { } /** - * @param generator + *

getGenerator.

+ * + * @param generator a {@link java.lang.String} object. * @return if supplied with a valid generator returns its constant value. * returns -1 if supplied with false value. - * @throws GeneratorException + * @throws org.graphwalker.core.exceptions.GeneratorException if any. */ static public int getGenerator(final String generator) throws GeneratorException { if (!isGenerator(generator)) { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Model.java b/graphwalker-core/src/main/java/org/graphwalker/core/Model.java index 879831fc..74a8add1 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Model.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Model.java @@ -29,20 +29,37 @@ import java.util.Observable; import java.util.Observer; +/** + *

Model class.

+ * + * @author nilols + * @version $Id: $ + */ public class Model implements Observer { ModelBasedTesting mbt; + /** {@inheritDoc} */ @Override public void update(Observable o, Object arg) { // TODO Auto-generated method stub } + /** + *

Getter for the field mbt.

+ * + * @return a {@link org.graphwalker.core.ModelBasedTesting} object. + */ public ModelBasedTesting getMbt() { return mbt; } + /** + *

Setter for the field mbt.

+ * + * @param mbt a {@link org.graphwalker.core.ModelBasedTesting} object. + */ public void setMbt(ModelBasedTesting mbt) { this.mbt = mbt; } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java b/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java index 4bf33f8c..24a35b00 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java @@ -66,6 +66,7 @@ * The object handles the test case generation, both online and offline. * * @author krikar + * @version $Id: $ */ public class ModelBasedTesting { private static Logger logger = Util.setupLogger(ModelBasedTesting.class); @@ -100,14 +101,27 @@ public class ModelBasedTesting { */ private boolean manualTestSequence = false; + /** + *

isManualTestSequence.

+ * + * @return a boolean. + */ public boolean isManualTestSequence() { return manualTestSequence; } + /** + *

Setter for the field manualTestSequence.

+ * + * @param manualTestSequence a boolean. + */ public void setManualTestSequence(boolean manualTestSequence) { this.manualTestSequence = manualTestSequence; } + /** + *

Constructor for ModelBasedTesting.

+ */ public ModelBasedTesting() { } @@ -121,6 +135,11 @@ private static class ModelBasedTestingHolder { private static final ModelBasedTesting INSTANCE = new ModelBasedTesting(); } + /** + *

getInstance.

+ * + * @return a {@link org.graphwalker.core.ModelBasedTesting} object. + */ @SuppressWarnings("synthetic-access") public static ModelBasedTesting getInstance() { return ModelBasedTestingHolder.INSTANCE; @@ -154,28 +173,56 @@ public void reset() { thisThread = null; } + /** + *

reload.

+ */ public void reload() { machine.setAllUnvisited(); } + /** + *

isUseGUI.

+ * + * @return a boolean. + */ public boolean isUseGUI() { return useGUI; } + /** + *

Setter for the field useGUI.

+ * + * @param application a {@link org.graphwalker.core.Application} object. + */ public void setUseGUI(Application application) { useGUI = true; notifyApp = (MbtEvent) application; this.application = application; } + /** + *

getGui.

+ * + * @return a {@link org.graphwalker.core.Application} object. + */ public Application getGui() { return application; } + /** + *

isDryRun.

+ * + * @return a boolean. + */ public boolean isDryRun() { return dryRun; } + /** + *

Setter for the field dryRun.

+ * + * @param dryRun a boolean. + */ public void setDryRun(boolean dryRun) { this.dryRun = dryRun; } @@ -197,6 +244,8 @@ private void setupStatisticsManager() { } /** + *

Getter for the field statisticsManager.

+ * * @return the statisticsManager */ public StatisticsManager getStatisticsManager() { @@ -209,6 +258,11 @@ public StatisticsManager getStatisticsManager() { return this.statisticsManager; } + /** + *

Getter for the field machine.

+ * + * @return a {@link org.graphwalker.core.machines.FiniteStateMachine} object. + */ public FiniteStateMachine getMachine() { if (this.machine == null) { setMachine(new FiniteStateMachine()); @@ -227,7 +281,7 @@ private void setMachine(FiniteStateMachine machine) { /** * Return the instance of the graph * - * @return + * @return a {@link org.graphwalker.core.graph.Graph} object. */ public Graph getGraph() { if (this.modelHandler == null) @@ -235,6 +289,11 @@ public Graph getGraph() { return this.modelHandler.getModel(); } + /** + *

setGraph.

+ * + * @param graph a {@link org.graphwalker.core.graph.Graph} object. + */ public void setGraph(Graph graph) { if (this.modelHandler == null) { this.modelHandler = new GraphML(); @@ -247,7 +306,7 @@ public void setGraph(Graph graph) { /** * Returns the current future object in the test. * - * @return + * @return a {@link java.util.concurrent.Future} object. */ public Future getFuture() { return future; @@ -257,7 +316,7 @@ public Future getFuture() { * Sets the future for the model. The execution of the path will be paused * until the future is done. * - * @param future + * @param future a {@link java.util.concurrent.Future} object. */ public void setFuture(Future future) { this.future = future; @@ -270,7 +329,7 @@ public void setFuture(Future future) { * @return The value of the data object. The value is always returned a s * string. It is the calling parties task to parse the string and * convert it to correct type. - * @throws InvalidDataException If the retrieval of the data fails, the InvalidDataException is + * @throws org.graphwalker.core.exceptions.InvalidDataException If the retrieval of the data fails, the org.graphwalker.core.exceptions.InvalidDataException is * thrown. For example if a FiniteStateMachine is used, which has no * data space, the exception is thrown. */ @@ -290,7 +349,7 @@ public String getDataValue(String data) throws InvalidDataException { * @return The value of the data object's method. The value is always returned * a s string. It is the calling parties task to parse the string and * convert it to correct type. - * @throws InvalidDataException If the retrieval of the data fails, the InvalidDataException is + * @throws org.graphwalker.core.exceptions.InvalidDataException If the retrieval of the data fails, the org.graphwalker.core.exceptions.InvalidDataException is * thrown. For example if a FiniteStateMachine is used, which has no * data space, the exception is thrown. */ @@ -364,6 +423,11 @@ public void populateMachineRequirementHashTable() { getMachine().populateReqHashMap(); } + /** + *

enableJsScriptEngine.

+ * + * @param enableJs a boolean. + */ public void enableJsScriptEngine(boolean enableJs) { if (enableJs) useJsScriptEngine = true; @@ -371,6 +435,11 @@ public void enableJsScriptEngine(boolean enableJs) { useJsScriptEngine = false; } + /** + *

enableExtended.

+ * + * @param extended a boolean. + */ public void enableExtended(boolean extended) { if (extended) { setMachine(new ExtendedFiniteStateMachine(useJsScriptEngine)); @@ -383,6 +452,11 @@ public void enableExtended(boolean extended) { } } + /** + *

Setter for the field generator.

+ * + * @param generator a {@link org.graphwalker.core.generators.PathGenerator} object. + */ public void setGenerator(PathGenerator generator) { this.generator = generator; @@ -392,14 +466,30 @@ public void setGenerator(PathGenerator generator) { ((CodeGenerator) generator).setTemplate(this.template); } + /** + *

Setter for the field generator.

+ * + * @param generatorType a int. + * @throws org.graphwalker.core.exceptions.GeneratorException if any. + */ public void setGenerator(int generatorType) throws GeneratorException { setGenerator(Util.getGenerator(generatorType)); } + /** + *

Getter for the field generator.

+ * + * @return a {@link org.graphwalker.core.generators.PathGenerator} object. + */ public PathGenerator getGenerator() { return this.generator; } + /** + *

hasNextStep.

+ * + * @return a boolean. + */ public boolean hasNextStep() { if (this.machine == null) { getMachine(); @@ -409,6 +499,12 @@ public boolean hasNextStep() { return getGenerator().hasNext(); } + /** + *

getNextStep.

+ * + * @return an array of {@link java.lang.String} objects. + * @throws java.lang.InterruptedException if any. + */ public String[] getNextStep() throws InterruptedException { if (isUseGUI()) { @@ -482,6 +578,11 @@ public String[] getNextStep() throws InterruptedException { } } + /** + *

getCurrentVertexName.

+ * + * @return a {@link java.lang.String} object. + */ public String getCurrentVertexName() { if (this.machine != null) return getMachine().getCurrentVertexName(); @@ -489,6 +590,11 @@ public String getCurrentVertexName() { return ""; } + /** + *

getCurrentEdgeName.

+ * + * @return a {@link java.lang.String} object. + */ public String getCurrentEdgeName() { if (this.machine != null) return getMachine().getLastEdgeName(); @@ -496,6 +602,11 @@ public String getCurrentEdgeName() { return ""; } + /** + *

readGraph.

+ * + * @param graphmlFileName a {@link java.lang.String} object. + */ public void readGraph(String graphmlFileName) { if (this.modelHandler == null) { this.modelHandler = new GraphML(); @@ -511,10 +622,21 @@ public void readGraph(String graphmlFileName) { } } + /** + *

writeModel.

+ * + * @param ps a {@link java.io.PrintStream} object. + * @param printIndex a boolean. + */ public void writeModel(PrintStream ps, boolean printIndex) { this.modelHandler.save(ps, printIndex); } + /** + *

getStatisticsString.

+ * + * @return a {@link java.lang.String} object. + */ public String getStatisticsString() { if (this.machine != null) { return getMachine().getStatisticsString(); @@ -523,6 +645,11 @@ public String getStatisticsString() { return ""; } + /** + *

getVersionString.

+ * + * @return a {@link java.lang.String} object. + */ public String getVersionString() { Properties properties = new Properties(); InputStream inputStream = null; @@ -554,6 +681,11 @@ public String getVersionString() { return stringBuilder.toString(); } + /** + *

getStatisticsCompact.

+ * + * @return a {@link java.lang.String} object. + */ public String getStatisticsCompact() { if (this.machine != null) { return getMachine().getStatisticsStringCompact(); @@ -562,6 +694,11 @@ public String getStatisticsCompact() { return ""; } + /** + *

getStatisticsVerbose.

+ * + * @return a {@link java.lang.String} object. + */ public String getStatisticsVerbose() { if (this.machine != null) { return getMachine().getStatisticsVerbose(); @@ -570,6 +707,11 @@ public String getStatisticsVerbose() { return ""; } + /** + *

Setter for the field template.

+ * + * @param template an array of {@link java.lang.String} objects. + */ public void setTemplate(String[] template) { this.template = template.clone(); @@ -578,6 +720,12 @@ public void setTemplate(String[] template) { } + /** + *

Setter for the field template.

+ * + * @param templateFile a {@link java.lang.String} object. + * @throws java.io.IOException if any. + */ public void setTemplate(String templateFile) throws IOException { String template = Util.readFile(Util.getFile(templateFile)); String header = "", body = "", footer = ""; @@ -593,6 +741,11 @@ public void setTemplate(String templateFile) throws IOException { } } + /** + *

interractivePath.

+ * + * @throws java.lang.InterruptedException if any. + */ public void interractivePath() throws InterruptedException { interractivePath(System.in); } @@ -664,6 +817,12 @@ private String getRequirement(AbstractElement element) { return ""; } + /** + *

logExecution.

+ * + * @param element a {@link org.graphwalker.core.graph.AbstractElement} object. + * @param additionalInfo a {@link java.lang.String} object. + */ public void logExecution(AbstractElement element, String additionalInfo) { String req = " " + getRequirement(element); if (element instanceof Edge) { @@ -674,14 +833,29 @@ public void logExecution(AbstractElement element, String additionalInfo) { } } + /** + *

Setter for the field javaExecutorClass.

+ * + * @param executorClass a {@link java.lang.String} object. + */ public void setJavaExecutorClass(String executorClass) { javaExecutorClass = executorClass; } + /** + *

Getter for the field javaExecutorClass.

+ * + * @return a {@link java.lang.String} object. + */ public String getJavaExecutorClass() { return javaExecutorClass; } + /** + *

executePath.

+ * + * @throws java.lang.InterruptedException if any. + */ public void executePath() throws InterruptedException { if (getJavaExecutorClass() != null) { logger.debug("Start executing, using the java class: " + getJavaExecutorClass()); @@ -707,6 +881,12 @@ public void executePath() throws InterruptedException { } } + /** + *

executePath.

+ * + * @param clsClass a {@link java.lang.Class} object. + * @throws java.lang.InterruptedException if any. + */ public void executePath(Class clsClass) throws InterruptedException { if (clsClass == null) { throw new RuntimeException("Needed execution class is missing as parameter."); @@ -714,6 +894,12 @@ public void executePath(Class clsClass) throws InterruptedException { executePath(clsClass, null); } + /** + *

executePath.

+ * + * @param objInstance a {@link java.lang.Object} object. + * @throws java.lang.InterruptedException if any. + */ public void executePath(Object objInstance) throws InterruptedException { if (objInstance == null) { throw new RuntimeException("Needed execution instance is missing as parameter."); @@ -725,6 +911,12 @@ public void executePath(Object objInstance) throws InterruptedException { executePath(null, objInstance); } + /** + *

executePath.

+ * + * @param strClassName a {@link java.lang.String} object. + * @throws java.lang.InterruptedException if any. + */ public void executePath(String strClassName) throws InterruptedException { if (getJavaExecutorClass() == null) { setJavaExecutorClass(strClassName); @@ -759,6 +951,13 @@ public void executePath(String strClassName) throws InterruptedException { executePath(clsClass, null); } + /** + *

executePath.

+ * + * @param clsClass a {@link java.lang.Class} object. + * @param objInstance a {@link java.lang.Object} object. + * @throws java.lang.InterruptedException if any. + */ public void executePath(Class clsClass, Object objInstance) throws InterruptedException { try { thisThread = Thread.currentThread(); @@ -974,10 +1173,21 @@ private void executeMethod(Class clsClass, Object objInstance, String strMeth } } + /** + *

writePath.

+ * + * @throws java.lang.InterruptedException if any. + */ public void writePath() throws InterruptedException { writePath(System.out); } + /** + *

writePath.

+ * + * @param testSequence a {@link java.util.Vector} object. + * @throws java.lang.InterruptedException if any. + */ public void writePath(Vector testSequence) throws InterruptedException { if (this.machine == null) { getMachine(); @@ -1012,6 +1222,12 @@ private String parseManualInstructions(String manualInstructions) { return parsedStr; } + /** + *

writePath.

+ * + * @param out a {@link java.io.PrintStream} object. + * @throws java.lang.InterruptedException if any. + */ public void writePath(PrintStream out) throws InterruptedException { if (this.machine == null) { getMachine(); @@ -1038,7 +1254,9 @@ public void writePath(PrintStream out) throws InterruptedException { } /** - * @param script + *

Setter for the field startupScript.

+ * + * @param script a {@link java.lang.String} object. */ public void setStartupScript(String script) { this.startupScript = script; @@ -1052,21 +1270,34 @@ public void setStartupScript(String script) { } /** + *

Getter for the field startupScript.

+ * * @return the startupScript */ public String getStartupScript() { return this.startupScript; } + /** {@inheritDoc} */ @Override public String toString() { return getGenerator().toString(); } + /** + *

setWeighted.

+ * + * @param b a boolean. + */ public void setWeighted(boolean b) { getMachine().setWeighted(b); } + /** + *

getCurrentEdge.

+ * + * @return a {@link org.graphwalker.core.graph.Edge} object. + */ public Edge getCurrentEdge() { if (this.machine != null) return getMachine().getLastEdge(); @@ -1074,6 +1305,11 @@ public Edge getCurrentEdge() { return null; } + /** + *

getCurrentVertex.

+ * + * @return a {@link org.graphwalker.core.graph.Vertex} object. + */ public Vertex getCurrentVertex() { if (this.machine != null) return getMachine().getCurrentVertex(); @@ -1117,24 +1353,51 @@ public boolean setCurrentVertex(String newVertex) { return false; } + /** + *

isUseStatisticsManager.

+ * + * @return a boolean. + */ public boolean isUseStatisticsManager() { return useStatisticsManager; } + /** + *

Setter for the field useStatisticsManager.

+ * + * @param useStatisticsManager a boolean. + */ public void setUseStatisticsManager(boolean useStatisticsManager) { this.useStatisticsManager = useStatisticsManager; } + /** + *

setAsVisited.

+ * + * @param index a {@link java.lang.Integer} object. + * @return a {@link org.graphwalker.core.graph.AbstractElement} object. + */ public AbstractElement setAsVisited(Integer index) { AbstractElement e = getMachine().findElement(index); e.setVisitedKey(e.getVisitedKey() + 1); return e; } + /** + *

setCurrentVertex.

+ * + * @param vertex a {@link org.graphwalker.core.graph.Vertex} object. + */ public void setCurrentVertex(Vertex vertex) { getMachine().setVertex(vertex); } + /** + *

decrementVisited.

+ * + * @param index a {@link java.lang.Integer} object. + * @return a {@link org.graphwalker.core.graph.AbstractElement} object. + */ public AbstractElement decrementVisited(Integer index) { AbstractElement e = getMachine().findElement(index); if (e.getVisitedKey() > 0) @@ -1142,10 +1405,16 @@ public AbstractElement decrementVisited(Integer index) { return e; } + /** + *

setAllUnvisited.

+ */ public void setAllUnvisited() { getMachine().setAllUnvisited(); } + /** + *

stop.

+ */ public synchronized void stop() { logger.debug("Will stop the excution of the model: " + getGraph()); finishedFlag = true; @@ -1153,24 +1422,38 @@ public synchronized void stop() { notifyAll(); } + /** + *

suspend.

+ */ public synchronized void suspend() { logger.debug("Will suspend the excution of the model."); threadSuspended = true; notifyAll(); } + /** + *

resume.

+ */ public synchronized void resume() { logger.debug("Will resume the excution of the model " + getGraph()); threadSuspended = false; notifyAll(); } + /** + *

setRunning.

+ */ public synchronized void setRunning() { thisThread = Thread.currentThread(); stopFlag = thisThread; notifyAll(); } + /** + *

isRunning.

+ * + * @return a boolean. + */ public boolean isRunning() { if (hasStartedExecution) { if (stopFlag == thisThread) { @@ -1182,6 +1465,11 @@ public boolean isRunning() { return false; } + /** + *

isSuspended.

+ * + * @return a boolean. + */ public boolean isSuspended() { if (stopFlag == thisThread) { if (threadSuspended) { @@ -1191,23 +1479,48 @@ public boolean isSuspended() { return false; } + /** + *

isFinished.

+ * + * @return a boolean. + */ public boolean isFinished() { return hasStartedExecution && finishedFlag; } + /** + *

hasNotStartedExecution.

+ * + * @return a boolean. + */ public boolean hasNotStartedExecution() { return !hasStartedExecution; } + /** + *

Getter for the field multiModelHandler.

+ * + * @return a {@link org.graphwalker.core.multipleModels.ModelHandler} object. + */ public ModelHandler getMultiModelHandler() { return multiModelHandler; } + /** + *

Setter for the field multiModelHandler.

+ * + * @param modelHandler a {@link org.graphwalker.core.multipleModels.ModelHandler} object. + */ public void setMultiModelHandler(ModelHandler modelHandler) { logger.debug("Will change multiModelHandler from: " + this.multiModelHandler + ", to: " + modelHandler); this.multiModelHandler = modelHandler; } + /** + *

isCulDeSac.

+ * + * @return a boolean. + */ public boolean isCulDeSac() { try { getMachine().getCurrentOutEdges(); diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/MultipleModels.java b/graphwalker-core/src/main/java/org/graphwalker/core/MultipleModels.java index 7c169625..8eee6e14 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/MultipleModels.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/MultipleModels.java @@ -1,260 +1,267 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ -package org.graphwalker.core; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedHashSet; - -/** - * A class that handles multiple instances of ModelBasedTesting models and can - * execute them in parallel. This is only usable for running online since - * multiple models will be executed at the same time. The method is to add a - * model and then execute it when appropriate. - * - * @author Ola Sundin - * @see ModelBasedTesting - */ -public class MultipleModels { - /** - * The maximum number of names of the same base. - */ - private static final int MAX_NAMES = 1000; - - private static MultipleModels instance; - private HashMap models; - private HashMap executingModels; - private HashMap finishedModels; - private LinkedHashSet reservedNames; - - /** - * The constructor is private so only one instance exists of the object. - */ - private MultipleModels() { - models = new HashMap(); - executingModels = new HashMap(); - finishedModels = new HashMap(); - reservedNames = new LinkedHashSet(); - } - - /** - * A static method of getting the only instance of the class. If the instance - * is not initialized a new instance is created. - * - * @return the only instance of the class - */ - public static synchronized MultipleModels getInstance() { - if (instance == null) { - instance = new MultipleModels(); - } - return instance; - } - - /** - * Creating new lists for the models. If an instance of this class is to be - * 're-used', it may need to clear the lists calling this method. - */ - public void reset() { - models = new HashMap(); - executingModels = new HashMap(); - finishedModels = new HashMap(); - reservedNames = new LinkedHashSet(); - } - - /** - * Returns the ModelBasedTesting object for the submitted key. If not such key - * was found null is returned. - * - * @param modelName the key which corresponds to the wanted model - * @return the ModelBasedTesting object for that key or null if key was not - * found - */ - public ModelBasedTesting getModel(String modelName) { - return models.get(modelName); - } - - /** - * Adds a new model to the set of models. If the submitted name already exists - * in the set an exception is thrown. In order to guarantee uniqueness of the - * model name use the helper function {@link #getUniqueName(String)}. - * - * @param modelName the name of the model - * @param model the model to be added - * @throws IllegalArgumentException if the given name has all ready been used. - */ - public synchronized void addModel(String modelName, ModelBasedTesting model) throws IllegalArgumentException { - if (models.containsKey(modelName)) { - throw new IllegalArgumentException("The model name " + modelName + " has already been used."); - } - if (!reservedNames.contains(modelName)) { - reservedNames.add(modelName); - } - models.put(modelName, model); - } - - /** - * Checks whether a model is executing or not. - * - * @param modelName the name of the model - * @return true if the model is being executed - */ - public boolean isExecuting(String modelName) { - return executingModels.containsKey(modelName); - } - - /** - * Checks whether a model is finished or not. - * - * @param modelName the name of the model - * @return true if the model is finished - */ - public boolean isFinished(String modelName) { - return finishedModels.containsKey(modelName); - } - - /** - * Checks if all models are finished. - * - * @return true if all models are finished - */ - public boolean isFinished() { - return finishedModels.size() > 0 && executingModels.size() == 0; - } - - /** - * Returns the statistics from all models. This methods is blocking and will - * wait until all models are finished before returning - * - * @return the aggregated statistics for all models - */ - public String getStatistics() throws InterruptedException { - StringBuffer statistics = new StringBuffer("Statistics for multiple models"); - while (!isFinished()) { - Thread.sleep(10); - } - - Iterator iterator = finishedModels.keySet().iterator(); - while (iterator.hasNext()) { - String currentModelName = iterator.next(); - statistics.append("\n\nStatistics for " + currentModelName + ":\n"); - statistics.append(finishedModels.get(currentModelName).getStatisticsString()); - } - return statistics.toString(); - } - - /** - * Will start the execution of the given model in a separate thread. - * - * @param modelName the name of the model to start the execution for - * @param modelAPI an instance of the class that the model should call - * @throws IllegalArgumentException if no model with the given name exists - * @throws IllegalStateException if the given model is already being executed - */ - public void executeModel(String modelName, Object modelAPI) throws IllegalArgumentException, IllegalStateException { - if (!models.containsKey(modelName)) { - throw new IllegalArgumentException("No model found with the name " + modelName); - } - if (executingModels.containsKey(modelName)) { - throw new IllegalStateException("Model is already executing, spawn a new model if another instance of the model should be executed."); - } - executingModels.put(modelName, models.get(modelName)); - Thread t = new Thread(new ModelThread(modelName, models.get(modelName), modelAPI)); - t.start(); - } - - /** - * Marks the model as finished - * - * @param modelName the name of the model to finish - */ - private void finishModel(String modelName) { - executingModels.remove(modelName); - finishedModels.put(modelName, models.get(modelName)); - } - - /** - * Marks a model as interrupted - * - * @param modelName the name of the model that was interrupted - */ - private void interruptModel(String modelName) { - // TODO Add interruption handling - executingModels.remove(modelName); - } - - /** - * Helper method to create unique names in a Set of keys. The format of the - * names will be <name>_<index>. The first name will be the - * name only and the second will get the index 1. - * - * @param desiredName the desired name - * @param existingKeys the set of keys that should contain the name - * @return the actual name that is unique, could be the same as the desired - * name - */ - public synchronized String getUniqueName(String desiredName) throws IndexOutOfBoundsException { - String actualName = desiredName; - for (int i = 1; reservedNames.contains(actualName); i++) { - if (i >= MAX_NAMES) { - throw new IndexOutOfBoundsException("To many names based on " + desiredName + " has been reserved."); - } - actualName = desiredName + " " + i; - } - reservedNames.add(actualName); - return actualName; - } - - /** - * Private class for execution of models in a seperate thread. - * - * @author Ola Sundin - */ - private class ModelThread implements Runnable { - private String modelName; - private ModelBasedTesting model; - private Object modelAPI; - - public ModelThread(String modelName, ModelBasedTesting model, Object modelAPI) { - this.modelName = modelName; - this.model = model; - this.modelAPI = modelAPI; - } - - @Override - public void run() { - try { - model.executePath(modelAPI); - finishModel(modelName); - } catch (InterruptedException e) { - interruptModel(modelName); - Thread.currentThread().interrupt(); - } - - } - - } - -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker.core; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashSet; + +/** + * A class that handles multiple instances of ModelBasedTesting models and can + * execute them in parallel. This is only usable for running online since + * multiple models will be executed at the same time. The method is to add a + * model and then execute it when appropriate. + * + * @author Ola Sundin + * @see ModelBasedTesting + * @version $Id: $ + */ +public class MultipleModels { + /** + * The maximum number of names of the same base. + */ + private static final int MAX_NAMES = 1000; + + private static MultipleModels instance; + private HashMap models; + private HashMap executingModels; + private HashMap finishedModels; + private LinkedHashSet reservedNames; + + /** + * The constructor is private so only one instance exists of the object. + */ + private MultipleModels() { + models = new HashMap(); + executingModels = new HashMap(); + finishedModels = new HashMap(); + reservedNames = new LinkedHashSet(); + } + + /** + * A static method of getting the only instance of the class. If the instance + * is not initialized a new instance is created. + * + * @return the only instance of the class + */ + public static synchronized MultipleModels getInstance() { + if (instance == null) { + instance = new MultipleModels(); + } + return instance; + } + + /** + * Creating new lists for the models. If an instance of this class is to be + * 're-used', it may need to clear the lists calling this method. + */ + public void reset() { + models = new HashMap(); + executingModels = new HashMap(); + finishedModels = new HashMap(); + reservedNames = new LinkedHashSet(); + } + + /** + * Returns the ModelBasedTesting object for the submitted key. If not such key + * was found null is returned. + * + * @param modelName the key which corresponds to the wanted model + * @return the ModelBasedTesting object for that key or null if key was not + * found + */ + public ModelBasedTesting getModel(String modelName) { + return models.get(modelName); + } + + /** + * Adds a new model to the set of models. If the submitted name already exists + * in the set an exception is thrown. In order to guarantee uniqueness of the + * model name use the helper function {@link #getUniqueName(String)}. + * + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param model the model to be added + * @throws java.lang.IllegalArgumentException if the given name has all ready been used. + */ + public synchronized void addModel(String modelName, ModelBasedTesting model) throws IllegalArgumentException { + if (models.containsKey(modelName)) { + throw new IllegalArgumentException("The model name " + modelName + " has already been used."); + } + if (!reservedNames.contains(modelName)) { + reservedNames.add(modelName); + } + models.put(modelName, model); + } + + /** + * Checks whether a model is executing or not. + * + * @param modelName the name of the model + * @return true if the model is being executed + */ + public boolean isExecuting(String modelName) { + return executingModels.containsKey(modelName); + } + + /** + * Checks whether a model is finished or not. + * + * @param modelName the name of the model + * @return true if the model is finished + */ + public boolean isFinished(String modelName) { + return finishedModels.containsKey(modelName); + } + + /** + * Checks if all models are finished. + * + * @return true if all models are finished + */ + public boolean isFinished() { + return finishedModels.size() > 0 && executingModels.size() == 0; + } + + /** + * Returns the statistics from all models. This methods is blocking and will + * wait until all models are finished before returning + * + * @return the aggregated statistics for all models + * @throws java.lang.InterruptedException if any. + */ + public String getStatistics() throws InterruptedException { + StringBuffer statistics = new StringBuffer("Statistics for multiple models"); + while (!isFinished()) { + Thread.sleep(10); + } + + Iterator iterator = finishedModels.keySet().iterator(); + while (iterator.hasNext()) { + String currentModelName = iterator.next(); + statistics.append("\n\nStatistics for " + currentModelName + ":\n"); + statistics.append(finishedModels.get(currentModelName).getStatisticsString()); + } + return statistics.toString(); + } + + /** + * Will start the execution of the given model in a separate thread. + * + * @param modelName the name of the model to start the execution for + * @param modelAPI an instance of the class that the model should call + * @throws java.lang.IllegalArgumentException if no model with the given name exists + * @throws java.lang.IllegalStateException if the given model is already being executed + */ + public void executeModel(String modelName, Object modelAPI) throws IllegalArgumentException, IllegalStateException { + if (!models.containsKey(modelName)) { + throw new IllegalArgumentException("No model found with the name " + modelName); + } + if (executingModels.containsKey(modelName)) { + throw new IllegalStateException("Model is already executing, spawn a new model if another instance of the model should be executed."); + } + executingModels.put(modelName, models.get(modelName)); + Thread t = new Thread(new ModelThread(modelName, models.get(modelName), modelAPI)); + t.start(); + } + + /** + * Marks the model as finished + * + * @param modelName the name of the model to finish + */ + private void finishModel(String modelName) { + executingModels.remove(modelName); + finishedModels.put(modelName, models.get(modelName)); + } + + /** + * Marks a model as interrupted + * + * @param modelName the name of the model that was interrupted + */ + private void interruptModel(String modelName) { + // TODO Add interruption handling + executingModels.remove(modelName); + } + + /** + * Helper method to create unique names in a Set of keys. The format of the + * names will be <name>_<index>. The first name will be the + * name only and the second will get the index 1. + * + * @param desiredName the desired name + * @return the actual name that is unique, could be the same as the desired + * name + * @throws java.lang.IndexOutOfBoundsException if any. + */ + public synchronized String getUniqueName(String desiredName) throws IndexOutOfBoundsException { + String actualName = desiredName; + for (int i = 1; reservedNames.contains(actualName); i++) { + if (i >= MAX_NAMES) { + throw new IndexOutOfBoundsException("To many names based on " + desiredName + " has been reserved."); + } + actualName = desiredName + " " + i; + } + reservedNames.add(actualName); + return actualName; + } + + /** + * Private class for execution of models in a seperate thread. + * + * @author Ola Sundin + */ + private class ModelThread implements Runnable { + private String modelName; + private ModelBasedTesting model; + private Object modelAPI; + + public ModelThread(String modelName, ModelBasedTesting model, Object modelAPI) { + this.modelName = modelName; + this.model = model; + this.modelAPI = modelAPI; + } + + @Override + public void run() { + try { + model.executePath(modelAPI); + finishModel(modelName); + } catch (InterruptedException e) { + interruptModel(modelName); + Thread.currentThread().interrupt(); + } + + } + + } + +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/StatisticsManager.java b/graphwalker-core/src/main/java/org/graphwalker/core/StatisticsManager.java index 0545e08a..6dd72582 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/StatisticsManager.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/StatisticsManager.java @@ -1,146 +1,192 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core; - -import org.apache.log4j.Logger; -import org.graphwalker.core.graph.AbstractElement; -import org.graphwalker.core.statistics.Statistics; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.output.XMLOutputter; -import org.jdom.transform.JDOMSource; - -import javax.xml.transform.*; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.InputStream; -import java.io.PrintStream; -import java.util.Enumeration; -import java.util.HashSet; -import java.util.Hashtable; -import java.util.Set; - -/** - * @author Johan Tejle - */ -public class StatisticsManager { - - static private Logger log = Util.setupLogger(StatisticsManager.class); - private Hashtable counters; - private Document progress; - private Transformer styleTemplate; - - /** - * - */ - public StatisticsManager() { - this.counters = new Hashtable(); - this.progress = new Document(new Element("Statistics")); - } - - public void addStatisicsCounter(String name, Statistics statisicsCounter) { - counters.put(name, statisicsCounter); - } - - public void addProgress(AbstractElement element) { - for (Enumeration e = counters.keys(); e.hasMoreElements(); ) { - String key = e.nextElement(); - Statistics stats = counters.get(key); - stats.addProgress(element); - } - this.progress.getRootElement().addContent(getCurrentStatistic().detachRootElement()); - } - - private int[] getStatistic(String key) { - Statistics stats = counters.get(key); - return new int[]{stats.getCurrent(), stats.getMax()}; - } - - public String getCurrentStatisticXml() { - XMLOutputter outputter = new XMLOutputter(); - return outputter.outputString(getCurrentStatistic()); - } - - public String getFullProgressXml() { - XMLOutputter outputter = new XMLOutputter(); - return outputter.outputString(this.progress); - } - - public Document getCurrentStatistic() { - Element root = new Element("Statistic"); - Document doc = new Document(root); - for (Enumeration e = counters.keys(); e.hasMoreElements(); ) { - String key = e.nextElement(); - int[] stats = getStatistic(key); - - Element child = new Element("Data"); - child.setAttribute("type", key); - child.setAttribute("value", "" + stats[0]); - child.setAttribute("max", "" + stats[1]); - root.addContent(child); - } - return doc; - } - - public void setReportTemplate(InputStream inputStream) { - log.info("Setting template to '" + inputStream + "'"); - try { - styleTemplate = TransformerFactory.newInstance().newTemplates(new StreamSource(inputStream)).newTransformer(); - } catch (TransformerConfigurationException e) { - throw new RuntimeException("A serious configuration exception detected in '" + inputStream + "' while creating report template.", e); - } catch (TransformerFactoryConfigurationError e) { - throw new RuntimeException("A serious configuration error detected in '" + inputStream + "' while creating report template.", e); - } - } - - public void writeFullReport(String fileName) { - try { - writeFullReport(new PrintStream(new File(fileName))); - } catch (FileNotFoundException e) { - throw new RuntimeException("Could not create or open '" + fileName + "'", e); - } - } - - public void writeFullReport(PrintStream out) { - log.info("Writing full report"); - try { - styleTemplate.transform(new JDOMSource((Document) this.progress.clone()), new StreamResult(out)); - // out.close(); - } catch (TransformerException e) { - throw new RuntimeException("Could not create report", e); - } - } - - /** - * @return the available Statistics counter names used by this manager - */ - public Set getCounterNames() { - return new HashSet(counters.keySet()); - } -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core; + +import org.apache.log4j.Logger; +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.statistics.Statistics; +import org.jdom.Document; +import org.jdom.Element; +import org.jdom.output.XMLOutputter; +import org.jdom.transform.JDOMSource; + +import javax.xml.transform.*; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.InputStream; +import java.io.PrintStream; +import java.util.Enumeration; +import java.util.HashSet; +import java.util.Hashtable; +import java.util.Set; + +/** + *

StatisticsManager class.

+ * + * @author Johan Tejle + * @version $Id: $ + */ +public class StatisticsManager { + + static private Logger log = Util.setupLogger(StatisticsManager.class); + private Hashtable counters; + private Document progress; + private Transformer styleTemplate; + + /** + *

Constructor for StatisticsManager.

+ */ + public StatisticsManager() { + this.counters = new Hashtable(); + this.progress = new Document(new Element("Statistics")); + } + + /** + *

addStatisicsCounter.

+ * + * @param name a {@link java.lang.String} object. + * @param statisicsCounter a {@link org.graphwalker.core.statistics.Statistics} object. + */ + public void addStatisicsCounter(String name, Statistics statisicsCounter) { + counters.put(name, statisicsCounter); + } + + /** + *

addProgress.

+ * + * @param element a {@link org.graphwalker.core.graph.AbstractElement} object. + */ + public void addProgress(AbstractElement element) { + for (Enumeration e = counters.keys(); e.hasMoreElements(); ) { + String key = e.nextElement(); + Statistics stats = counters.get(key); + stats.addProgress(element); + } + this.progress.getRootElement().addContent(getCurrentStatistic().detachRootElement()); + } + + private int[] getStatistic(String key) { + Statistics stats = counters.get(key); + return new int[]{stats.getCurrent(), stats.getMax()}; + } + + /** + *

getCurrentStatisticXml.

+ * + * @return a {@link java.lang.String} object. + */ + public String getCurrentStatisticXml() { + XMLOutputter outputter = new XMLOutputter(); + return outputter.outputString(getCurrentStatistic()); + } + + /** + *

getFullProgressXml.

+ * + * @return a {@link java.lang.String} object. + */ + public String getFullProgressXml() { + XMLOutputter outputter = new XMLOutputter(); + return outputter.outputString(this.progress); + } + + /** + *

getCurrentStatistic.

+ * + * @return a {@link org.jdom.Document} object. + */ + public Document getCurrentStatistic() { + Element root = new Element("Statistic"); + Document doc = new Document(root); + for (Enumeration e = counters.keys(); e.hasMoreElements(); ) { + String key = e.nextElement(); + int[] stats = getStatistic(key); + + Element child = new Element("Data"); + child.setAttribute("type", key); + child.setAttribute("value", "" + stats[0]); + child.setAttribute("max", "" + stats[1]); + root.addContent(child); + } + return doc; + } + + /** + *

setReportTemplate.

+ * + * @param inputStream a {@link java.io.InputStream} object. + */ + public void setReportTemplate(InputStream inputStream) { + log.info("Setting template to '" + inputStream + "'"); + try { + styleTemplate = TransformerFactory.newInstance().newTemplates(new StreamSource(inputStream)).newTransformer(); + } catch (TransformerConfigurationException e) { + throw new RuntimeException("A serious configuration exception detected in '" + inputStream + "' while creating report template.", e); + } catch (TransformerFactoryConfigurationError e) { + throw new RuntimeException("A serious configuration error detected in '" + inputStream + "' while creating report template.", e); + } + } + + /** + *

writeFullReport.

+ * + * @param fileName a {@link java.lang.String} object. + */ + public void writeFullReport(String fileName) { + try { + writeFullReport(new PrintStream(new File(fileName))); + } catch (FileNotFoundException e) { + throw new RuntimeException("Could not create or open '" + fileName + "'", e); + } + } + + /** + *

writeFullReport.

+ * + * @param out a {@link java.io.PrintStream} object. + */ + public void writeFullReport(PrintStream out) { + log.info("Writing full report"); + try { + styleTemplate.transform(new JDOMSource((Document) this.progress.clone()), new StreamResult(out)); + // out.close(); + } catch (TransformerException e) { + throw new RuntimeException("Could not create report", e); + } + } + + /** + *

getCounterNames.

+ * + * @return the available Statistics counter names used by this manager + */ + public Set getCounterNames() { + return new HashSet(counters.keySet()); + } +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Status.java b/graphwalker-core/src/main/java/org/graphwalker/core/Status.java index b5009d4e..4ded1f23 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Status.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Status.java @@ -28,62 +28,132 @@ import org.apache.log4j.Logger; +/** + *

Status class.

+ * + * @author nilols + * @version $Id: $ + */ public class Status { static private Logger log = Util.setupLogger(Status.class); private int state = stopped; + /** Constant initial=1 */ public static final int initial = 1; + /** Constant running=2 */ public static final int running = 2; + /** Constant previous=4 */ public static final int previous = 4; + /** Constant next=8 */ public static final int next = 8; + /** Constant paused=16 */ public static final int paused = 16; + /** Constant stopped=32 */ public static final int stopped = 32; + /** Constant executingJavaTest=64 */ public static final int executingJavaTest = 64; + /** Constant executingSoapTest=128 */ public static final int executingSoapTest = 128; + /** Constant executingLogTest=256 */ public static final int executingLogTest = 256; + /** + *

isExecutingLogTest.

+ * + * @return a boolean. + */ public boolean isExecutingLogTest() { return (state & executingLogTest) == executingLogTest; } + /** + *

isExecutingSoapTest.

+ * + * @return a boolean. + */ public boolean isExecutingSoapTest() { return (state & executingSoapTest) == executingSoapTest; } + /** + *

isExecutingJavaTest.

+ * + * @return a boolean. + */ public boolean isExecutingJavaTest() { return (state & executingJavaTest) == executingJavaTest; } + /** + *

isInitial.

+ * + * @return a boolean. + */ public boolean isInitial() { return (state & initial) == initial; } + /** + *

isStopped.

+ * + * @return a boolean. + */ public boolean isStopped() { return (state & stopped) == stopped; } + /** + *

isPrevious.

+ * + * @return a boolean. + */ public boolean isPrevious() { return (state & previous) == previous; } + /** + *

isNext.

+ * + * @return a boolean. + */ public boolean isNext() { return (state & next) == next; } + /** + *

isRunning.

+ * + * @return a boolean. + */ public boolean isRunning() { return (state & running) == running; } + /** + *

isPaused.

+ * + * @return a boolean. + */ public boolean isPaused() { return (state & paused) == paused; } + /** + *

Setter for the field state.

+ * + * @param state a int. + */ public void setState(int state) { log.debug("Set the state with: " + toStr(state)); this.state |= state; log.debug("State: " + toStr(this.state)); } + /** + *

unsetState.

+ * + * @param state a int. + */ public void unsetState(int state) { log.debug("Unset the state with: " + toStr(state)); if ((this.state & state) == state) { @@ -92,16 +162,28 @@ public void unsetState(int state) { log.debug("State: " + toStr(this.state)); } + /** + *

Setter for the field stopped.

+ */ public void setStopped() { log.debug("Set the state to stopped"); state = stopped; } + /** + *

reset.

+ */ public void reset() { log.debug("Reset the state to initial"); state = initial; } + /** + *

toStr.

+ * + * @param state a int. + * @return a {@link java.lang.String} object. + */ public String toStr(int state) { String str = ""; if ((state & initial) == initial) { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Util.java b/graphwalker-core/src/main/java/org/graphwalker/core/Util.java index 84fed9e4..59e3646b 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Util.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Util.java @@ -57,14 +57,24 @@ * functionality is:
* * Getting names with extra info for vertices and edges
* * Setting up the logger for classes
+ * + * @author nilols + * @version $Id: $ */ public class Util { private static Logger logger = setupLogger(Util.class); static private Random random = new Random(); + /** Constant newline="System.getProperty(line.separator)" */ public static String newline = System.getProperty("line.separator"); static private Timer timer = null; + /** + *

getCompleteName.

+ * + * @param element a {@link org.graphwalker.core.graph.AbstractElement} object. + * @return a {@link java.lang.String} object. + */ public static String getCompleteName(final AbstractElement element) { if (element instanceof Edge) { return getCompleteEdgeName((Edge) element); @@ -114,12 +124,24 @@ private static String getCompleteVertexName(final Vertex vertex) { return "Vertex: '" + vertex.getLabelKey() + "', INDEX=" + vertex.getIndexKey(); } + /** + *

AbortIf.

+ * + * @param bool a boolean. + * @param message a {@link java.lang.String} object. + */ public static void AbortIf(final boolean bool, final String message) { if (bool) { throw new RuntimeException(message); } } + /** + *

setupLogger.

+ * + * @param classParam a {@link java.lang.Class} object. + * @return a {@link org.apache.log4j.Logger} object. + */ public static Logger setupLogger(@SuppressWarnings("rawtypes") final Class classParam) { Logger logger = Logger.getLogger(classParam); if (new File("graphwalker.properties").canRead()) { @@ -183,11 +205,11 @@ public static Edge addEdgeToGraph(final Graph graph, final Vertex vertexFrom, fi /** * Adds a stop condition for the model. * - * @param machine + * @param machine a {@link org.graphwalker.core.machines.FiniteStateMachine} object. * @param conditionType The condition type. * @param conditionValue The value of the condition. * @return The newly created stop condition. - * @throws StopConditionException + * @throws org.graphwalker.core.exceptions.StopConditionException if any. */ public static StopCondition getCondition(final FiniteStateMachine machine, final int conditionType, final String conditionValue) throws StopConditionException { @@ -248,6 +270,13 @@ public static StopCondition getCondition(final FiniteStateMachine machine, final return condition; } + /** + *

getGenerator.

+ * + * @param generatorType a int. + * @return a {@link org.graphwalker.core.generators.PathGenerator} object. + * @throws org.graphwalker.core.exceptions.GeneratorException if any. + */ public static PathGenerator getGenerator(final int generatorType) throws GeneratorException { PathGenerator generator = null; @@ -289,6 +318,9 @@ public static PathGenerator getGenerator(final int generatorType) throws Generat return generator; } + /** + *

Constructor for Util.

+ */ public Util() { super(); // TODO Auto-generated constructor stub @@ -297,13 +329,13 @@ public Util() { /** * Load MBT settings from a xml file * - * @param file - * @return - * @throws StopConditionException - * @throws GeneratorException - * @throws IOException - * @throws JDOMException - * @throws InterruptedException + * @param file a {@link java.io.File} object. + * @throws org.graphwalker.core.exceptions.StopConditionException if any. + * @throws org.graphwalker.core.exceptions.GeneratorException if any. + * @throws java.io.IOException if any. + * @throws org.jdom.JDOMException if any. + * @throws java.lang.InterruptedException if any. + * @return a {@link org.graphwalker.core.ModelBasedTesting} object. */ public static ModelBasedTesting loadMbtAsWSFromXml(final File file) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { @@ -313,14 +345,14 @@ public static ModelBasedTesting loadMbtAsWSFromXml(final File file) throws StopC /** * Load MBT settings from a xml file * - * @param file + * @param file a {@link java.io.File} object. * @param dryRun Is mbt to be run in a dry run mode? - * @return - * @throws StopConditionException - * @throws GeneratorException - * @throws IOException - * @throws JDOMException - * @throws InterruptedException + * @throws org.graphwalker.core.exceptions.StopConditionException if any. + * @throws org.graphwalker.core.exceptions.GeneratorException if any. + * @throws java.io.IOException if any. + * @throws org.jdom.JDOMException if any. + * @throws java.lang.InterruptedException if any. + * @return a {@link org.graphwalker.core.ModelBasedTesting} object. */ public static ModelBasedTesting loadMbtFromXml(final File file, final boolean dryRun) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { @@ -331,12 +363,12 @@ public static ModelBasedTesting loadMbtFromXml(final File file, final boolean dr * Load MBT settings from a xml file * * @param file The XML settings file - * @return - * @throws StopConditionException - * @throws GeneratorException - * @throws IOException - * @throws JDOMException - * @throws InterruptedException + * @throws org.graphwalker.core.exceptions.StopConditionException if any. + * @throws org.graphwalker.core.exceptions.GeneratorException if any. + * @throws java.io.IOException if any. + * @throws org.jdom.JDOMException if any. + * @throws java.lang.InterruptedException if any. + * @return a {@link org.graphwalker.core.ModelBasedTesting} object. */ public static ModelBasedTesting loadMbtFromXml(final File file) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { @@ -347,12 +379,12 @@ public static ModelBasedTesting loadMbtFromXml(final File file) throws StopCondi * Creates a new instance of MBT and loads the settings from a xml file * * @param file The XML settings file - * @return - * @throws StopConditionException - * @throws GeneratorException - * @throws IOException - * @throws JDOMException - * @throws InterruptedException + * @throws org.graphwalker.core.exceptions.StopConditionException if any. + * @throws org.graphwalker.core.exceptions.GeneratorException if any. + * @throws java.io.IOException if any. + * @throws org.jdom.JDOMException if any. + * @throws java.lang.InterruptedException if any. + * @return a {@link org.graphwalker.core.ModelBasedTesting} object. */ public static ModelBasedTesting getNewMbtFromXml(final File file) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { @@ -363,12 +395,12 @@ public static ModelBasedTesting getNewMbtFromXml(final File file) throws StopCon * Load MBT settings from a xml file * * @param file The XML settings file - * @return - * @throws StopConditionException - * @throws GeneratorException - * @throws IOException - * @throws JDOMException - * @throws InterruptedException + * @throws org.graphwalker.core.exceptions.StopConditionException if any. + * @throws org.graphwalker.core.exceptions.GeneratorException if any. + * @throws java.io.IOException if any. + * @throws org.jdom.JDOMException if any. + * @throws java.lang.InterruptedException if any. + * @return a {@link org.graphwalker.core.ModelBasedTesting} object. */ public ModelBasedTesting loadMbtFromXmlNonStatic(final File file) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { @@ -864,6 +896,13 @@ private static StopCondition getCondition(final FiniteStateMachine machine, fina return stopCondition; } + /** + *

readFile.

+ * + * @param file a {@link java.io.File} object. + * @return a {@link java.lang.String} object. + * @throws java.io.IOException if any. + */ public static String readFile(final File file) throws IOException { StringBuilder stringBuilder = new StringBuilder(); FileReader reader = null; @@ -884,6 +923,11 @@ public static String readFile(final File file) throws IOException { return stringBuilder.toString(); } + /** + *

getInput.

+ * + * @return a char. + */ public static char getInput() { char c = 0; try { @@ -900,8 +944,8 @@ public static char getInput() { /** * This functions shuffle the array, and returns the shuffled array * - * @param array - * @return + * @param array an array of {@link java.lang.Object} objects. + * @return an array of {@link java.lang.Object} objects. */ public static Object[] shuffle(final Object[] array) { for (int i = 0; i < array.length; i++) { @@ -915,6 +959,12 @@ public static Object[] shuffle(final Object[] array) { return array; } + /** + *

getInternetAddr.

+ * + * @param nic a {@link java.lang.String} object. + * @return a {@link java.net.InetAddress} object. + */ public static InetAddress getInternetAddr(final String nic) { // Find the real network interface NetworkInterface iface = null; @@ -951,6 +1001,11 @@ public static InetAddress getInternetAddr(final String nic) { return ia; } + /** + *

readWSPort.

+ * + * @return a {@link java.lang.String} object. + */ public static String readWSPort() { PropertiesConfiguration conf = null; if (new File("graphwalker.properties").canRead()) { @@ -976,6 +1031,11 @@ public static String readWSPort() { return port; } + /** + *

readSoapGuiStartupState.

+ * + * @return a {@link java.lang.Boolean} object. + */ public static Boolean readSoapGuiStartupState() { PropertiesConfiguration conf = null; if (new File("graphwalker.properties").canRead()) { @@ -1003,6 +1063,11 @@ public static Boolean readSoapGuiStartupState() { return soapGuiState; } + /** + *

logStackTraceToError.

+ * + * @param e a {@link java.lang.Exception} object. + */ public static void logStackTraceToError(final Exception e) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); @@ -1011,6 +1076,11 @@ public static void logStackTraceToError(final Exception e) { Util.logger.error(sw.toString()); } + /** + *

logStackTraceToError.

+ * + * @param t a {@link java.lang.Throwable} object. + */ public static void logStackTraceToError(final Throwable t) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); @@ -1019,6 +1089,12 @@ public static void logStackTraceToError(final Throwable t) { Util.logger.error(sw.toString()); } + /** + *

getFile.

+ * + * @param resourceName a {@link java.lang.String} object. + * @return a {@link java.io.File} object. + */ public static File getFile(final String resourceName) { Util.logger.debug("Try to get file: " + resourceName); File file = new File(resourceName); @@ -1037,6 +1113,11 @@ public static File getFile(final String resourceName) { return new File(resource.getPath()); } + /** + *

closeQuietly.

+ * + * @param reader a {@link java.io.Reader} object. + */ public static void closeQuietly(Reader reader) { if (null != reader) { try { @@ -1047,6 +1128,11 @@ public static void closeQuietly(Reader reader) { } } + /** + *

closeQuietly.

+ * + * @param inputStream a {@link java.io.InputStream} object. + */ public static void closeQuietly(InputStream inputStream) { if (null != inputStream) { try { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AbstractStopCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AbstractStopCondition.java index 7a67a036..2699a9cc 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AbstractStopCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AbstractStopCondition.java @@ -27,14 +27,26 @@ import org.graphwalker.core.machines.FiniteStateMachine; +/** + *

Abstract AbstractStopCondition class.

+ * + * @author nilols + * @version $Id: $ + */ public abstract class AbstractStopCondition implements StopCondition { private FiniteStateMachine machine; + /** + *

Getter for the field machine.

+ * + * @return a {@link org.graphwalker.core.machines.FiniteStateMachine} object. + */ public FiniteStateMachine getMachine() { return machine; } + /** {@inheritDoc} */ public void setMachine(FiniteStateMachine machine) { this.machine = machine; } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java index 54550cd6..96e18d1b 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java @@ -1,87 +1,105 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.conditions; - -import org.graphwalker.core.machines.FiniteStateMachine; - -import java.util.Iterator; -import java.util.Vector; - -public class AlternativeCondition extends AbstractStopCondition { - - private Vector conditions; - - @Override - public boolean isFulfilled() { - for (StopCondition condition : conditions) { - if (condition.isFulfilled()) - return true; - } - return false; - } - - public AlternativeCondition() { - this.conditions = new Vector(); - } - - public void add(StopCondition condition) { - this.conditions.add(condition); - } - - @Override - public void setMachine(FiniteStateMachine machine) { - super.setMachine(machine); - for (StopCondition condition : conditions) { - condition.setMachine(machine); - } - } - - @Override - public double getFulfilment() { - double retur = 0; - for (StopCondition condition : conditions) { - double newFullfillment = condition.getFulfilment(); - if (newFullfillment > retur) { - retur = newFullfillment; - } - } - return retur; - } - - @Override - public String toString() { - StringBuilder stringBuilder = new StringBuilder("("); - for (Iterator i = conditions.iterator(); i.hasNext(); ) { - stringBuilder.append(i.next().toString()); - if (i.hasNext()) { - stringBuilder.append(" OR "); - } - } - stringBuilder.append(")"); - return stringBuilder.toString(); - } -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.conditions; + +import org.graphwalker.core.machines.FiniteStateMachine; + +import java.util.Iterator; +import java.util.Vector; + +/** + *

AlternativeCondition class.

+ * + * @author nilols + * @version $Id: $ + */ +public class AlternativeCondition extends AbstractStopCondition { + + private Vector conditions; + + /** {@inheritDoc} */ + @Override + public boolean isFulfilled() { + for (StopCondition condition : conditions) { + if (condition.isFulfilled()) + return true; + } + return false; + } + + /** + *

Constructor for AlternativeCondition.

+ */ + public AlternativeCondition() { + this.conditions = new Vector(); + } + + /** + *

add.

+ * + * @param condition a {@link org.graphwalker.core.conditions.StopCondition} object. + */ + public void add(StopCondition condition) { + this.conditions.add(condition); + } + + /** {@inheritDoc} */ + @Override + public void setMachine(FiniteStateMachine machine) { + super.setMachine(machine); + for (StopCondition condition : conditions) { + condition.setMachine(machine); + } + } + + /** {@inheritDoc} */ + @Override + public double getFulfilment() { + double retur = 0; + for (StopCondition condition : conditions) { + double newFullfillment = condition.getFulfilment(); + if (newFullfillment > retur) { + retur = newFullfillment; + } + } + return retur; + } + + /** {@inheritDoc} */ + @Override + public String toString() { + StringBuilder stringBuilder = new StringBuilder("("); + for (Iterator i = conditions.iterator(); i.hasNext(); ) { + stringBuilder.append(i.next().toString()); + if (i.hasNext()) { + stringBuilder.append(" OR "); + } + } + stringBuilder.append(")"); + return stringBuilder.toString(); + } +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java index 8603fc32..87ccc38b 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java @@ -1,86 +1,104 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.conditions; - -import org.graphwalker.core.machines.FiniteStateMachine; - -import java.util.Iterator; -import java.util.Vector; - -public class CombinationalCondition extends AbstractStopCondition { - - private Vector conditions; - - @Override - public boolean isFulfilled() { - for (StopCondition condition : conditions) { - if (!condition.isFulfilled()) { - return false; - } - } - return true; - } - - public CombinationalCondition() { - this.conditions = new Vector(); - } - - public void add(StopCondition condition) { - this.conditions.add(condition); - } - - @Override - public void setMachine(FiniteStateMachine machine) { - super.setMachine(machine); - for (StopCondition condition : conditions) { - condition.setMachine(machine); - } - } - - @Override - public double getFulfilment() { - double retur = 0; - for (StopCondition condition : conditions) { - retur += condition.getFulfilment(); - } - return retur / conditions.size(); - } - - @Override - public String toString() { - StringBuilder stringBuilder = new StringBuilder("("); - for (Iterator i = conditions.iterator(); i.hasNext(); ) { - stringBuilder.append(i.next().toString()); - if (i.hasNext()) { - stringBuilder.append(" AND "); - } - } - stringBuilder.append(")"); - return stringBuilder.toString(); - } - -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.conditions; + +import org.graphwalker.core.machines.FiniteStateMachine; + +import java.util.Iterator; +import java.util.Vector; + +/** + *

CombinationalCondition class.

+ * + * @author nilols + * @version $Id: $ + */ +public class CombinationalCondition extends AbstractStopCondition { + + private Vector conditions; + + /** {@inheritDoc} */ + @Override + public boolean isFulfilled() { + for (StopCondition condition : conditions) { + if (!condition.isFulfilled()) { + return false; + } + } + return true; + } + + /** + *

Constructor for CombinationalCondition.

+ */ + public CombinationalCondition() { + this.conditions = new Vector(); + } + + /** + *

add.

+ * + * @param condition a {@link org.graphwalker.core.conditions.StopCondition} object. + */ + public void add(StopCondition condition) { + this.conditions.add(condition); + } + + /** {@inheritDoc} */ + @Override + public void setMachine(FiniteStateMachine machine) { + super.setMachine(machine); + for (StopCondition condition : conditions) { + condition.setMachine(machine); + } + } + + /** {@inheritDoc} */ + @Override + public double getFulfilment() { + double retur = 0; + for (StopCondition condition : conditions) { + retur += condition.getFulfilment(); + } + return retur / conditions.size(); + } + + /** {@inheritDoc} */ + @Override + public String toString() { + StringBuilder stringBuilder = new StringBuilder("("); + for (Iterator i = conditions.iterator(); i.hasNext(); ) { + stringBuilder.append(i.next().toString()); + if (i.hasNext()) { + stringBuilder.append(" AND "); + } + } + stringBuilder.append(")"); + return stringBuilder.toString(); + } + +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java index a74d6efb..8b9699f4 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java @@ -1,68 +1,88 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.conditions; - -import org.apache.log4j.Logger; -import org.graphwalker.core.Util; -import org.graphwalker.core.exceptions.StopConditionException; - -public class EdgeCoverage extends AbstractStopCondition { - - private double limit; - static Logger logger = Util.setupLogger(EdgeCoverage.class); - - public EdgeCoverage() throws StopConditionException { - this(1); - } - - public EdgeCoverage(double limit) throws StopConditionException { - if (limit > 1 || limit < 0) - throw new StopConditionException("Excpeted an edge coverage between 0 and 100. Actual: " + limit * 100); - this.limit = limit; - } - - @Override - public boolean isFulfilled() { - double edges = getMachine().getAllEdges().size(); - double covered = getMachine().getNumOfCoveredEdges(); - logger.debug("Edges/covered (limit): " + edges + "/" + covered + " (" + limit + ")"); - return (covered / edges) >= limit; - } - - @Override - public double getFulfilment() { - double edges = getMachine().getAllEdges().size(); - double covered = getMachine().getNumOfCoveredEdges(); - return (covered / edges) / limit; - } - - @Override - public String toString() { - return "EC>=" + (int) (100 * limit); - } - -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.conditions; + +import org.apache.log4j.Logger; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.StopConditionException; + +/** + *

EdgeCoverage class.

+ * + * @author nilols + * @version $Id: $ + */ +public class EdgeCoverage extends AbstractStopCondition { + + private double limit; + static Logger logger = Util.setupLogger(EdgeCoverage.class); + + /** + *

Constructor for EdgeCoverage.

+ * + * @throws org.graphwalker.core.exceptions.StopConditionException if any. + */ + public EdgeCoverage() throws StopConditionException { + this(1); + } + + /** + *

Constructor for EdgeCoverage.

+ * + * @param limit a double. + * @throws org.graphwalker.core.exceptions.StopConditionException if any. + */ + public EdgeCoverage(double limit) throws StopConditionException { + if (limit > 1 || limit < 0) + throw new StopConditionException("Excpeted an edge coverage between 0 and 100. Actual: " + limit * 100); + this.limit = limit; + } + + /** {@inheritDoc} */ + @Override + public boolean isFulfilled() { + double edges = getMachine().getAllEdges().size(); + double covered = getMachine().getNumOfCoveredEdges(); + logger.debug("Edges/covered (limit): " + edges + "/" + covered + " (" + limit + ")"); + return (covered / edges) >= limit; + } + + /** {@inheritDoc} */ + @Override + public double getFulfilment() { + double edges = getMachine().getAllEdges().size(); + double covered = getMachine().getNumOfCoveredEdges(); + return (covered / edges) / limit; + } + + /** {@inheritDoc} */ + @Override + public String toString() { + return "EC>=" + (int) (100 * limit); + } + +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java index c6cf1729..b6c20e7e 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java @@ -1,49 +1,61 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.conditions; - -public class NeverCondition extends AbstractStopCondition { - - public NeverCondition() { - } - - @Override - public boolean isFulfilled() { - return false; - } - - @Override - public double getFulfilment() { - return 0; - } - - @Override - public String toString() { - return "FALSE"; - } - -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.conditions; + +/** + *

NeverCondition class.

+ * + * @author nilols + * @version $Id: $ + */ +public class NeverCondition extends AbstractStopCondition { + + /** + *

Constructor for NeverCondition.

+ */ + public NeverCondition() { + } + + /** {@inheritDoc} */ + @Override + public boolean isFulfilled() { + return false; + } + + /** {@inheritDoc} */ + @Override + public double getFulfilment() { + return 0; + } + + /** {@inheritDoc} */ + @Override + public String toString() { + return "FALSE"; + } + +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java index 221a4189..052f2bfb 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java @@ -1,123 +1,138 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.conditions; - -import org.graphwalker.core.graph.Edge; -import org.graphwalker.core.machines.FiniteStateMachine; - -import java.util.ArrayList; - -public class ReachedEdge extends AbstractStopCondition { - - private ArrayList allEdges; - private Edge endEdge; - private int[] proximity; - private int maxDistance; - private String edgeName; - - @Override - public boolean isFulfilled() { - return getFulfilment() >= 0.99999; - } - - @Override - public void setMachine(FiniteStateMachine machine) { - super.setMachine(machine); - if (this.endEdge == null) { - this.endEdge = machine.findEdge(edgeName); - } - if (this.endEdge == null) { - throw new RuntimeException("Vertex '" + edgeName + "' not found in model"); - } - this.proximity = getFloydWarshall(); - this.maxDistance = max(this.proximity); - } - - public ReachedEdge(String edgeName) { - String[] vertex = edgeName.split("/", 2); - this.edgeName = vertex[0]; - } - - @Override - public double getFulfilment() { - int distance = this.maxDistance; - if (getMachine().getLastEdge() != null) { - distance = proximity[allEdges.indexOf(getMachine().getLastEdge())]; - } - return (1) - ((double) distance / (double) maxDistance); - } - - private int max(int[] t) { - int maximum = t[0]; - for (int i = 1; i < t.length; i++) { - if (t[i] > maximum) { - maximum = t[i]; - } - } - return maximum; - } - - private int[][] getFloydWarshallMatrix() { - allEdges = new ArrayList(getMachine().getAllEdges()); - int n = allEdges.size(); - int[][] retur = new int[n][n]; - for (int i = 0; i < n; i++) { - for (int j = 0; j < n; j++) { - int x = 99999; - if (i == j) { - x = 0; - } else if (getMachine().getModel().isSource(getMachine().getModel().getDest(allEdges.get(j)), allEdges.get(i))) { - x = 1; - } - retur[i][j] = x; - } - } - return retur; - } - - private int[] getFloydWarshall() { - int path[][] = getFloydWarshallMatrix(); - int n = path.length; - for (int k = 0; k < n; k++) { - for (int i = 0; i < n; i++) { - for (int j = 0; j < n; j++) { - path[i][j] = Math.min(path[i][j], path[i][k] + path[k][j]); - } - } - } - int startIndex = allEdges.indexOf(endEdge); - if (startIndex >= 0) { - return path[startIndex]; - } - throw new RuntimeException("edge no longer in Graph!"); - } - - @Override - public String toString() { - return "EDGE='" + endEdge + "'"; - } -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.conditions; + +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.machines.FiniteStateMachine; + +import java.util.ArrayList; + +/** + *

ReachedEdge class.

+ * + * @author nilols + * @version $Id: $ + */ +public class ReachedEdge extends AbstractStopCondition { + + private ArrayList allEdges; + private Edge endEdge; + private int[] proximity; + private int maxDistance; + private String edgeName; + + /** {@inheritDoc} */ + @Override + public boolean isFulfilled() { + return getFulfilment() >= 0.99999; + } + + /** {@inheritDoc} */ + @Override + public void setMachine(FiniteStateMachine machine) { + super.setMachine(machine); + if (this.endEdge == null) { + this.endEdge = machine.findEdge(edgeName); + } + if (this.endEdge == null) { + throw new RuntimeException("Vertex '" + edgeName + "' not found in model"); + } + this.proximity = getFloydWarshall(); + this.maxDistance = max(this.proximity); + } + + /** + *

Constructor for ReachedEdge.

+ * + * @param edgeName a {@link java.lang.String} object. + */ + public ReachedEdge(String edgeName) { + String[] vertex = edgeName.split("/", 2); + this.edgeName = vertex[0]; + } + + /** {@inheritDoc} */ + @Override + public double getFulfilment() { + int distance = this.maxDistance; + if (getMachine().getLastEdge() != null) { + distance = proximity[allEdges.indexOf(getMachine().getLastEdge())]; + } + return (1) - ((double) distance / (double) maxDistance); + } + + private int max(int[] t) { + int maximum = t[0]; + for (int i = 1; i < t.length; i++) { + if (t[i] > maximum) { + maximum = t[i]; + } + } + return maximum; + } + + private int[][] getFloydWarshallMatrix() { + allEdges = new ArrayList(getMachine().getAllEdges()); + int n = allEdges.size(); + int[][] retur = new int[n][n]; + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + int x = 99999; + if (i == j) { + x = 0; + } else if (getMachine().getModel().isSource(getMachine().getModel().getDest(allEdges.get(j)), allEdges.get(i))) { + x = 1; + } + retur[i][j] = x; + } + } + return retur; + } + + private int[] getFloydWarshall() { + int path[][] = getFloydWarshallMatrix(); + int n = path.length; + for (int k = 0; k < n; k++) { + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + path[i][j] = Math.min(path[i][j], path[i][k] + path[k][j]); + } + } + } + int startIndex = allEdges.indexOf(endEdge); + if (startIndex >= 0) { + return path[startIndex]; + } + throw new RuntimeException("edge no longer in Graph!"); + } + + /** {@inheritDoc} */ + @Override + public String toString() { + return "EDGE='" + endEdge + "'"; + } +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java index da848c3d..7f77447c 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java @@ -1,66 +1,85 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.conditions; - -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; - -public class ReachedRequirement extends AbstractStopCondition { - - private Collection requirements; - - public ReachedRequirement(String requirements) { - String[] list = requirements.split(","); - for (int i = 0; i < list.length; i++) { - list[i] = list[i].trim(); - } - this.requirements = new HashSet(Arrays.asList(list)); - } - - @Override - public boolean isFulfilled() { - return getMachine().getCoveredRequirements().containsAll(requirements); - } - - @Override - public double getFulfilment() { - Collection covered = getMachine().getCoveredRequirements(); - covered.retainAll(requirements); - return covered.size() / (double) requirements.size(); - } - - @Override - public String toString() { - return "RC=" + Arrays.deepToString(requirements.toArray()); - } - - public Collection getRequirements() { - return requirements; - } - -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.conditions; + +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; + +/** + *

ReachedRequirement class.

+ * + * @author nilols + * @version $Id: $ + */ +public class ReachedRequirement extends AbstractStopCondition { + + private Collection requirements; + + /** + *

Constructor for ReachedRequirement.

+ * + * @param requirements a {@link java.lang.String} object. + */ + public ReachedRequirement(String requirements) { + String[] list = requirements.split(","); + for (int i = 0; i < list.length; i++) { + list[i] = list[i].trim(); + } + this.requirements = new HashSet(Arrays.asList(list)); + } + + /** {@inheritDoc} */ + @Override + public boolean isFulfilled() { + return getMachine().getCoveredRequirements().containsAll(requirements); + } + + /** {@inheritDoc} */ + @Override + public double getFulfilment() { + Collection covered = getMachine().getCoveredRequirements(); + covered.retainAll(requirements); + return covered.size() / (double) requirements.size(); + } + + /** {@inheritDoc} */ + @Override + public String toString() { + return "RC=" + Arrays.deepToString(requirements.toArray()); + } + + /** + *

Getter for the field requirements.

+ * + * @return a {@link java.util.Collection} object. + */ + public Collection getRequirements() { + return requirements; + } + +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java index a20efe84..cbb34887 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java @@ -1,146 +1,161 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.conditions; - -import org.apache.log4j.Logger; -import org.graphwalker.core.Util; -import org.graphwalker.core.graph.Vertex; -import org.graphwalker.core.machines.ExtendedFiniteStateMachine; -import org.graphwalker.core.machines.FiniteStateMachine; - -import java.util.ArrayList; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class ReachedVertex extends AbstractStopCondition { - - private static Logger logger = Util.setupLogger(ReachedVertex.class); - private ArrayList allVertices; - private Vertex endVertex; - private int[] proximity; - private int maxDistance; - private String vertexName; - private String subState; - - @Override - public boolean isFulfilled() { - return getFulfilment() >= 0.99999; - } - - @Override - public void setMachine(FiniteStateMachine machine) { - super.setMachine(machine); - if (this.endVertex == null) { - this.endVertex = machine.getModel().findVertex(vertexName); - } - if (this.endVertex == null) { - throw new RuntimeException("Vertex '" + vertexName + "' not found in model"); - } - this.proximity = getFloydWarshall(); - this.maxDistance = max(this.proximity); - } - - public ReachedVertex(String vertexName) { - String[] vertex = vertexName.split("/", 2); - this.vertexName = vertex[0]; - this.subState = (vertex.length > 1 ? vertex[1] : ""); - } - - @Override - public double getFulfilment() { - logger.debug("Machine: " + getMachine()); - int distance = proximity[allVertices.indexOf(getMachine().getCurrentVertex())]; - if (getMachine() instanceof ExtendedFiniteStateMachine) { - String currentVertex = getMachine().getCurrentVertexName(); - String currentSubState = ""; - if (vertexName.equals(Vertex.getLabel(currentVertex))) { - if (currentVertex.contains("/")) { - currentSubState = currentVertex.split("/", 2)[1]; - Pattern actionPattern = Pattern.compile(this.subState); - Matcher actionMatcher = actionPattern.matcher(currentSubState); - if (actionMatcher.find()) { - return 1; - } - } - } - return 0; - } - - return (1) - ((double) distance / (double) maxDistance); - } - - private int max(int[] t) { - int maximum = t[0]; - for (int i = 1; i < t.length; i++) { - if (t[i] > maximum) { - maximum = t[i]; - } - } - return maximum; - } - - private int[][] getFloydWarshallMatrix() { - allVertices = new ArrayList(getMachine().getAllVertices()); - int n = allVertices.size(); - int[][] retur = new int[n][n]; - for (int i = 0; i < n; i++) { - for (int j = 0; j < n; j++) { - int x = 99999; - if (i == j) { - x = 0; - } else if (getMachine().getModel().isPredecessor(allVertices.get(i), allVertices.get(j))) { - x = 1; - } - retur[i][j] = x; - } - } - return retur; - } - - private int[] getFloydWarshall() { - int path[][] = getFloydWarshallMatrix(); - int n = path.length; - for (int k = 0; k < n; k++) { - for (int i = 0; i < n; i++) { - for (int j = 0; j < n; j++) { - path[i][j] = Math.min(path[i][j], path[i][k] + path[k][j]); - } - } - } - int startIndex = allVertices.indexOf(endVertex); - if (startIndex >= 0) { - return path[startIndex]; - } - throw new RuntimeException("vertex no longer in Graph!"); - } - - @Override - public String toString() { - return "VERTEX='" + endVertex + "'"; - } - -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.conditions; + +import org.apache.log4j.Logger; +import org.graphwalker.core.Util; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.machines.ExtendedFiniteStateMachine; +import org.graphwalker.core.machines.FiniteStateMachine; + +import java.util.ArrayList; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + *

ReachedVertex class.

+ * + * @author nilols + * @version $Id: $ + */ +public class ReachedVertex extends AbstractStopCondition { + + private static Logger logger = Util.setupLogger(ReachedVertex.class); + private ArrayList allVertices; + private Vertex endVertex; + private int[] proximity; + private int maxDistance; + private String vertexName; + private String subState; + + /** {@inheritDoc} */ + @Override + public boolean isFulfilled() { + return getFulfilment() >= 0.99999; + } + + /** {@inheritDoc} */ + @Override + public void setMachine(FiniteStateMachine machine) { + super.setMachine(machine); + if (this.endVertex == null) { + this.endVertex = machine.getModel().findVertex(vertexName); + } + if (this.endVertex == null) { + throw new RuntimeException("Vertex '" + vertexName + "' not found in model"); + } + this.proximity = getFloydWarshall(); + this.maxDistance = max(this.proximity); + } + + /** + *

Constructor for ReachedVertex.

+ * + * @param vertexName a {@link java.lang.String} object. + */ + public ReachedVertex(String vertexName) { + String[] vertex = vertexName.split("/", 2); + this.vertexName = vertex[0]; + this.subState = (vertex.length > 1 ? vertex[1] : ""); + } + + /** {@inheritDoc} */ + @Override + public double getFulfilment() { + logger.debug("Machine: " + getMachine()); + int distance = proximity[allVertices.indexOf(getMachine().getCurrentVertex())]; + if (getMachine() instanceof ExtendedFiniteStateMachine) { + String currentVertex = getMachine().getCurrentVertexName(); + String currentSubState = ""; + if (vertexName.equals(Vertex.getLabel(currentVertex))) { + if (currentVertex.contains("/")) { + currentSubState = currentVertex.split("/", 2)[1]; + Pattern actionPattern = Pattern.compile(this.subState); + Matcher actionMatcher = actionPattern.matcher(currentSubState); + if (actionMatcher.find()) { + return 1; + } + } + } + return 0; + } + + return (1) - ((double) distance / (double) maxDistance); + } + + private int max(int[] t) { + int maximum = t[0]; + for (int i = 1; i < t.length; i++) { + if (t[i] > maximum) { + maximum = t[i]; + } + } + return maximum; + } + + private int[][] getFloydWarshallMatrix() { + allVertices = new ArrayList(getMachine().getAllVertices()); + int n = allVertices.size(); + int[][] retur = new int[n][n]; + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + int x = 99999; + if (i == j) { + x = 0; + } else if (getMachine().getModel().isPredecessor(allVertices.get(i), allVertices.get(j))) { + x = 1; + } + retur[i][j] = x; + } + } + return retur; + } + + private int[] getFloydWarshall() { + int path[][] = getFloydWarshallMatrix(); + int n = path.length; + for (int k = 0; k < n; k++) { + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + path[i][j] = Math.min(path[i][j], path[i][k] + path[k][j]); + } + } + } + int startIndex = allVertices.indexOf(endVertex); + if (startIndex >= 0) { + return path[startIndex]; + } + throw new RuntimeException("vertex no longer in Graph!"); + } + + /** {@inheritDoc} */ + @Override + public String toString() { + return "VERTEX='" + endVertex + "'"; + } + +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java index 4b3a8a73..937e101f 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java @@ -1,65 +1,82 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.conditions; - -import org.graphwalker.core.Util; - -public class RequirementCoverage extends AbstractStopCondition { - - private double limit; - - public RequirementCoverage() { - this(1); - } - - public RequirementCoverage(double limit) { - Util.AbortIf((limit > 1 || limit < 0), "Requirement coverage must be between 0 and 100"); - this.limit = limit; - } - - @Override - public boolean isFulfilled() { - int stats[] = getMachine().getStatistics(); - double requirements = stats[5]; - double covered = stats[6]; - return (covered / requirements) >= limit; - } - - @Override - public double getFulfilment() { - int stats[] = getMachine().getStatistics(); - double requirements = stats[5]; - double covered = stats[6]; - return (covered / requirements) / limit; - } - - @Override - public String toString() { - return "RC>=" + (int) (100 * limit); - } - -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.conditions; + +import org.graphwalker.core.Util; + +/** + *

RequirementCoverage class.

+ * + * @author nilols + * @version $Id: $ + */ +public class RequirementCoverage extends AbstractStopCondition { + + private double limit; + + /** + *

Constructor for RequirementCoverage.

+ */ + public RequirementCoverage() { + this(1); + } + + /** + *

Constructor for RequirementCoverage.

+ * + * @param limit a double. + */ + public RequirementCoverage(double limit) { + Util.AbortIf((limit > 1 || limit < 0), "Requirement coverage must be between 0 and 100"); + this.limit = limit; + } + + /** {@inheritDoc} */ + @Override + public boolean isFulfilled() { + int stats[] = getMachine().getStatistics(); + double requirements = stats[5]; + double covered = stats[6]; + return (covered / requirements) >= limit; + } + + /** {@inheritDoc} */ + @Override + public double getFulfilment() { + int stats[] = getMachine().getStatistics(); + double requirements = stats[5]; + double covered = stats[6]; + return (covered / requirements) / limit; + } + + /** {@inheritDoc} */ + @Override + public String toString() { + return "RC>=" + (int) (100 * limit); + } + +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java index 932bb53a..f3a0845b 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java @@ -1,47 +1,67 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.conditions; - -import org.graphwalker.core.machines.FiniteStateMachine; - -public interface StopCondition { - - - FiniteStateMachine getMachine(); - - void setMachine(FiniteStateMachine machine); - - /** - * @return true if the condition is fulfilled - */ - boolean isFulfilled(); - - /** - * @return the condition fulfilment - */ - double getFulfilment(); -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.conditions; + +import org.graphwalker.core.machines.FiniteStateMachine; + +/** + *

StopCondition interface.

+ * + * @author nilols + * @version $Id: $ + */ +public interface StopCondition { + + + /** + *

getMachine.

+ * + * @return a {@link org.graphwalker.core.machines.FiniteStateMachine} object. + */ + FiniteStateMachine getMachine(); + + /** + *

setMachine.

+ * + * @param machine a {@link org.graphwalker.core.machines.FiniteStateMachine} object. + */ + void setMachine(FiniteStateMachine machine); + + /** + *

isFulfilled.

+ * + * @return true if the condition is fulfilled + */ + boolean isFulfilled(); + + /** + *

getFulfilment.

+ * + * @return the condition fulfilment + */ + double getFulfilment(); +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java index 9f44b6e1..e1d9fc0c 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java @@ -1,52 +1,66 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.conditions; - -public class TestCaseLength extends AbstractStopCondition { - - private int numberOfEdges; - - @Override - public boolean isFulfilled() { - return getMachine().getNumberOfEdgesTravesed() >= numberOfEdges; - } - - public TestCaseLength(int numberOfEdges) { - this.numberOfEdges = numberOfEdges; - } - - @Override - public double getFulfilment() { - return getMachine().getNumberOfEdgesTravesed() / (double) numberOfEdges; - } - - @Override - public String toString() { - return "L=" + numberOfEdges; - } - -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.conditions; + +/** + *

TestCaseLength class.

+ * + * @author nilols + * @version $Id: $ + */ +public class TestCaseLength extends AbstractStopCondition { + + private int numberOfEdges; + + /** {@inheritDoc} */ + @Override + public boolean isFulfilled() { + return getMachine().getNumberOfEdgesTravesed() >= numberOfEdges; + } + + /** + *

Constructor for TestCaseLength.

+ * + * @param numberOfEdges a int. + */ + public TestCaseLength(int numberOfEdges) { + this.numberOfEdges = numberOfEdges; + } + + /** {@inheritDoc} */ + @Override + public double getFulfilment() { + return getMachine().getNumberOfEdgesTravesed() / (double) numberOfEdges; + } + + /** {@inheritDoc} */ + @Override + public String toString() { + return "L=" + numberOfEdges; + } + +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java index d8ca6173..6d84344d 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java @@ -1,63 +1,75 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.conditions; - -/** - * Stops test execution after a certain amount of time has passed. - * - * @author Johan Tejle - */ -public class TimeDuration extends AbstractStopCondition { - - private double duration; - private double start_time; - - @Override - public boolean isFulfilled() { - return getFulfilment() >= 0.99999; - } - - public TimeDuration(long seconds) { - this.start_time = System.currentTimeMillis(); - this.duration = seconds * 1000; - } - - @Override - public double getFulfilment() { - return (System.currentTimeMillis() - this.start_time) / this.duration; - } - - @Override - public String toString() { - return "DURATION=" + (duration / 1000) + "s"; - } - - public void restartTime() { - start_time = System.currentTimeMillis(); - } - -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.conditions; + +/** + * Stops test execution after a certain amount of time has passed. + * + * @author Johan Tejle + * @version $Id: $ + */ +public class TimeDuration extends AbstractStopCondition { + + private double duration; + private double start_time; + + /** {@inheritDoc} */ + @Override + public boolean isFulfilled() { + return getFulfilment() >= 0.99999; + } + + /** + *

Constructor for TimeDuration.

+ * + * @param seconds a long. + */ + public TimeDuration(long seconds) { + this.start_time = System.currentTimeMillis(); + this.duration = seconds * 1000; + } + + /** {@inheritDoc} */ + @Override + public double getFulfilment() { + return (System.currentTimeMillis() - this.start_time) / this.duration; + } + + /** {@inheritDoc} */ + @Override + public String toString() { + return "DURATION=" + (duration / 1000) + "s"; + } + + /** + *

restartTime.

+ */ + public void restartTime() { + start_time = System.currentTimeMillis(); + } + +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java index 0c05900a..6b7741e6 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java @@ -1,65 +1,85 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.conditions; - -import org.graphwalker.core.exceptions.StopConditionException; - -public class VertexCoverage extends AbstractStopCondition { - - private double limit; - - public VertexCoverage() throws StopConditionException { - this(1); - } - - public VertexCoverage(double limit) throws StopConditionException { - if (limit > 1 || limit < 0) { - throw new StopConditionException("Excpeted a vertex coverage between 0 and 100. Actual: " + limit * 100); - } - this.limit = limit; - } - - @Override - public boolean isFulfilled() { - double vertices = getMachine().getAllVertices().size(); - double covered = getMachine().getNumOfCoveredVertices(); - return (covered / vertices) >= limit; - } - - @Override - public double getFulfilment() { - double vertices = getMachine().getAllVertices().size(); - double covered = getMachine().getNumOfCoveredVertices(); - return (covered / vertices) / limit; - } - - @Override - public String toString() { - return "SC>=" + (int) (100 * limit); - } - -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.conditions; + +import org.graphwalker.core.exceptions.StopConditionException; + +/** + *

VertexCoverage class.

+ * + * @author nilols + * @version $Id: $ + */ +public class VertexCoverage extends AbstractStopCondition { + + private double limit; + + /** + *

Constructor for VertexCoverage.

+ * + * @throws org.graphwalker.core.exceptions.StopConditionException if any. + */ + public VertexCoverage() throws StopConditionException { + this(1); + } + + /** + *

Constructor for VertexCoverage.

+ * + * @param limit a double. + * @throws org.graphwalker.core.exceptions.StopConditionException if any. + */ + public VertexCoverage(double limit) throws StopConditionException { + if (limit > 1 || limit < 0) { + throw new StopConditionException("Excpeted a vertex coverage between 0 and 100. Actual: " + limit * 100); + } + this.limit = limit; + } + + /** {@inheritDoc} */ + @Override + public boolean isFulfilled() { + double vertices = getMachine().getAllVertices().size(); + double covered = getMachine().getNumOfCoveredVertices(); + return (covered / vertices) >= limit; + } + + /** {@inheritDoc} */ + @Override + public double getFulfilment() { + double vertices = getMachine().getAllVertices().size(); + double covered = getMachine().getNumOfCoveredVertices(); + return (covered / vertices) / limit; + } + + /** {@inheritDoc} */ + @Override + public String toString() { + return "SC>=" + (int) (100 * limit); + } + +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java b/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java index e1bcf7e5..265447ca 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java @@ -26,7 +26,16 @@ package org.graphwalker.core.events; +/** + *

AppEvent interface.

+ * + * @author nilols + * @version $Id: $ + */ public interface AppEvent { + /** + *

getLoadEvent.

+ */ public void getLoadEvent(); } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java b/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java index 31301447..003b1b4d 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java @@ -26,8 +26,17 @@ package org.graphwalker.core.events; +/** + *

MbtEvent interface.

+ * + * @author nilols + * @version $Id: $ + */ public interface MbtEvent { + /** + *

getNextEvent.

+ */ public void getNextEvent(); } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java index 3aadf41d..ec2c94ee 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java @@ -1,43 +1,48 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.exceptions; - -/** - * This exception is thrown during test sequence generation, when no out edge is - * found from a given vertex. This could be due to a cul-de-sac, which may or - * may not be perfectly all right. - */ -public class FoundNoEdgeException extends Exception { - /** - * @param string - */ - public FoundNoEdgeException(String string) { - super(string); - } - - private static final long serialVersionUID = -2597269122921601356L; -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.exceptions; + +/** + * This exception is thrown during test sequence generation, when no out edge is + * found from a given vertex. This could be due to a cul-de-sac, which may or + * may not be perfectly all right. + * + * @author nilols + * @version $Id: $ + */ +public class FoundNoEdgeException extends Exception { + /** + *

Constructor for FoundNoEdgeException.

+ * + * @param string a {@link java.lang.String} object. + */ + public FoundNoEdgeException(String string) { + super(string); + } + + private static final long serialVersionUID = -2597269122921601356L; +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java index 12f70885..68cd8a19 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java @@ -26,9 +26,20 @@ package org.graphwalker.core.exceptions; +/** + *

GeneratorException class.

+ * + * @author nilols + * @version $Id: $ + */ public class GeneratorException extends Exception { private static final long serialVersionUID = -6355062559015580205L; + /** + *

Constructor for GeneratorException.

+ * + * @param message a {@link java.lang.String} object. + */ public GeneratorException(String message) { super(message); } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java index 6aa2ac9a..f25e8726 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java @@ -28,6 +28,9 @@ /** * This exception indicats to MBT that GUI wants to stop execution of MBT + * + * @author nilols + * @version $Id: $ */ public class GuiStoppedExecution extends RuntimeException { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java index 6c25ab7f..d5535488 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java @@ -29,10 +29,15 @@ /** * This exception should be used whenever data extraction from the data space * from a EFSM machine fails. + * + * @author nilols + * @version $Id: $ */ public class InvalidDataException extends Exception { /** + *

Constructor for InvalidDataException.

+ * * @param message A string containing a message describing the failure in detail. */ public InvalidDataException(String message) { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java index fc658ba6..b2d17cab 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java @@ -29,10 +29,15 @@ /** * This exception should be used whenever there is something wrong with the stop * condition. + * + * @author nilols + * @version $Id: $ */ public class StopConditionException extends Exception { /** + *

Constructor for StopConditionException.

+ * * @param message A string containing a message describing the failure in detail. */ public StopConditionException(String message) { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java b/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java index 0aca9ebd..551ef2e2 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java @@ -1,79 +1,104 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.filters; - -import bsh.EvalError; -import bsh.Interpreter; -import org.graphwalker.core.graph.Edge; - -import javax.script.ScriptEngine; -import javax.script.ScriptException; - -/** - * @author Johan Tejle - */ -public class AccessableEdgeFilter { - - private ScriptEngine jsEngine = null; - private Interpreter beanShellEngine = null; - - public AccessableEdgeFilter(ScriptEngine sciptEngine) { - this.jsEngine = sciptEngine; - } - - public AccessableEdgeFilter(Interpreter beanShellEngine) { - this.beanShellEngine = beanShellEngine; - } - - public boolean acceptEdge(org.graphwalker.core.graph.Graph graph, Edge edge) { - if (edge.getGuardKey().isEmpty()) { - return true; - } - - if (jsEngine != null) { - try { - return (Boolean) jsEngine.eval(edge.getGuardKey()); - } catch (ScriptException e) { - throw new RuntimeException("Malformed Edge guard\n\t" + edge + "\n\tGuard: " + edge.getGuardKey() - + "\n\tBeanShell error message: '" + e.getMessage() + "'"); - } - } else if (beanShellEngine != null) { - try { - return (Boolean) beanShellEngine.eval(edge.getGuardKey()); - } catch (EvalError e) { - throw new RuntimeException("Malformed Edge guard\n\t" + edge + "\n\tGuard: " + edge.getGuardKey() - + "\n\tBeanShell error message: '" + e.getMessage() + "'"); - } - } - return false; - } - - public String getName() { - return "AccessableEdgeFilter"; - } - -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.filters; + +import bsh.EvalError; +import bsh.Interpreter; +import org.graphwalker.core.graph.Edge; + +import javax.script.ScriptEngine; +import javax.script.ScriptException; + +/** + *

AccessableEdgeFilter class.

+ * + * @author Johan Tejle + * @version $Id: $ + */ +public class AccessableEdgeFilter { + + private ScriptEngine jsEngine = null; + private Interpreter beanShellEngine = null; + + /** + *

Constructor for AccessableEdgeFilter.

+ * + * @param sciptEngine a {@link javax.script.ScriptEngine} object. + */ + public AccessableEdgeFilter(ScriptEngine sciptEngine) { + this.jsEngine = sciptEngine; + } + + /** + *

Constructor for AccessableEdgeFilter.

+ * + * @param beanShellEngine a {@link bsh.Interpreter} object. + */ + public AccessableEdgeFilter(Interpreter beanShellEngine) { + this.beanShellEngine = beanShellEngine; + } + + /** + *

acceptEdge.

+ * + * @param graph a {@link org.graphwalker.core.graph.Graph} object. + * @param edge a {@link org.graphwalker.core.graph.Edge} object. + * @return a boolean. + */ + public boolean acceptEdge(org.graphwalker.core.graph.Graph graph, Edge edge) { + if (edge.getGuardKey().isEmpty()) { + return true; + } + + if (jsEngine != null) { + try { + return (Boolean) jsEngine.eval(edge.getGuardKey()); + } catch (ScriptException e) { + throw new RuntimeException("Malformed Edge guard\n\t" + edge + "\n\tGuard: " + edge.getGuardKey() + + "\n\tBeanShell error message: '" + e.getMessage() + "'"); + } + } else if (beanShellEngine != null) { + try { + return (Boolean) beanShellEngine.eval(edge.getGuardKey()); + } catch (EvalError e) { + throw new RuntimeException("Malformed Edge guard\n\t" + edge + "\n\tGuard: " + edge.getGuardKey() + + "\n\tBeanShell error message: '" + e.getMessage() + "'"); + } + } + return false; + } + + /** + *

getName.

+ * + * @return a {@link java.lang.String} object. + */ + public String getName() { + return "AccessableEdgeFilter"; + } + +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java index e70f2f0e..4e1a904a 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java @@ -1,225 +1,244 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.generators; - -import org.graphwalker.core.Util; -import org.graphwalker.core.conditions.StopCondition; -import org.graphwalker.core.exceptions.FoundNoEdgeException; -import org.graphwalker.core.graph.Edge; -import org.graphwalker.core.graph.Vertex; -import org.graphwalker.core.machines.FiniteStateMachine; - -import java.util.*; - -public class A_StarPathGenerator extends AbstractPathGenerator { - - public A_StarPathGenerator(StopCondition stopCondition) { - super(stopCondition); - } - - private Stack preCalculatedPath = null; - private Vertex lastVertex; - - @Override - public void setMachine(FiniteStateMachine machine) { - super.setMachine(machine); - } - - public A_StarPathGenerator() { - super(); - } - - @Override - public String[] getNext() throws InterruptedException { - Util.AbortIf(!hasNext(), "Finished"); - if (lastVertex == null || lastVertex != getMachine().getCurrentVertex() || preCalculatedPath == null || preCalculatedPath.size() == 0) { - boolean oldCalculatingPathValue = getMachine().isCalculatingPath(); - getMachine().setCalculatingPath(true); - - preCalculatedPath = a_star(); - - getMachine().setCalculatingPath(oldCalculatingPathValue); - - if (preCalculatedPath == null) { - throw new RuntimeException("No path found to " + this.getStopCondition()); - } - - // reverse path - Stack temp = new Stack(); - while (preCalculatedPath.size() > 0) { - temp.push(preCalculatedPath.pop()); - } - preCalculatedPath = temp; - } - - Edge edge = preCalculatedPath.pop(); - getMachine().walkEdge(edge); - lastVertex = getMachine().getCurrentVertex(); - String[] retur = {getMachine().getEdgeName(edge), getMachine().getCurrentVertexName()}; - return retur; - } - - @SuppressWarnings("unchecked") - private Stack a_star() throws InterruptedException { - Vector closed = new Vector(); - - PriorityQueue a_starPath = new PriorityQueue(10, new Comparator() { - @Override - public int compare(WeightedPath arg0, WeightedPath arg1) { - int retur = Double.compare(arg0.getWeight(), arg1.getWeight()); - if (retur == 0) - retur = arg0.getPath().size() - arg1.getPath().size(); - return retur; - } - }); - - Set availableOutEdges; - try { - availableOutEdges = getMachine().getCurrentOutEdges(); - } catch (FoundNoEdgeException e) { - throw new RuntimeException("No available edges found at " + getMachine().getCurrentVertexName(), e); - } - for (Edge edge : availableOutEdges) { - Stack path = new Stack(); - path.push(edge); - a_starPath.add(getWeightedPath(path)); - } - double maxWeight = 0; - while (a_starPath.size() > 0) { - if (Thread.interrupted()) { - throw new InterruptedException(); - } - - WeightedPath path = a_starPath.poll(); - if (path.getWeight() > maxWeight) - maxWeight = path.getWeight(); - if (path.getWeight() > 0.99999) // are we done yet? - return path.getPath(); - - Edge possibleDuplicate = path.getPath().peek(); - - // have we been here before? - if (closed.contains(possibleDuplicate.hashCode() + "." + path.getSubState().hashCode() + "." + path.getWeight())) - continue; // ignore this and move on - - // We don't want to use this edge again as this path is - // the fastest, and if we come here again we have used more - // steps to get here than we used this time. - closed.add(possibleDuplicate.hashCode() + "." + path.getSubState().hashCode() + "." + path.getWeight()); - - availableOutEdges = getPathOutEdges(path.getPath()); - if (availableOutEdges != null && availableOutEdges.size() > 0) { - for (Edge edge : availableOutEdges) { - Stack newStack = (Stack) path.getPath().clone(); - newStack.push(edge); - a_starPath.add(getWeightedPath(newStack)); - } - } - } - throw new RuntimeException("No path found to satisfy stop condition " + getStopCondition() + ", best path satified only " - + (int) (maxWeight * 100) + "% of condition."); - } - - private WeightedPath getWeightedPath(Stack path) { - double weight = 0; - String subState = ""; - - getMachine().storeVertex(); - getMachine().walkPath(path); - weight = getConditionFulfilment(); - String currentState = getMachine().getCurrentVertexName(); - if (currentState.contains("/")) { - subState = currentState.split("/", 2)[1]; - } - getMachine().restoreVertex(); - - return new WeightedPath(path, weight, subState); - } - - private Set getPathOutEdges(Stack path) { - Set retur = null; - getMachine().storeVertex(); - getMachine().walkPath(path); - try { - retur = getMachine().getCurrentOutEdges(); - } catch (FoundNoEdgeException e) { - // no edges found? degrade gracefully and return the default value of - // null. - } - getMachine().restoreVertex(); - return retur; - } - - /** - * Will reset the generator to its initial vertex. - */ - @Override - public void reset() { - preCalculatedPath = null; - } - - @Override - public String toString() { - return "A_STAR{" + super.toString() + "}"; - } - - private static class WeightedPath { - private double weight; - private Stack path; - private String subState; - - public String getSubState() { - return subState; - } - - public void setSubState(String subState) { - this.subState = subState; - } - - public Stack getPath() { - return path; - } - - public void setPath(Stack path) { - this.path = path; - } - - public double getWeight() { - return weight; - } - - public void setWeight(double weight) { - this.weight = weight; - } - - public WeightedPath(Stack path, double weight, String subState) { - setPath(path); - setWeight(weight); - setSubState(subState); - } - } -} \ No newline at end of file +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.generators; + +import org.graphwalker.core.Util; +import org.graphwalker.core.conditions.StopCondition; +import org.graphwalker.core.exceptions.FoundNoEdgeException; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Vertex; +import org.graphwalker.core.machines.FiniteStateMachine; + +import java.util.*; + +/** + *

A_StarPathGenerator class.

+ * + * @author nilols + * @version $Id: $ + */ +public class A_StarPathGenerator extends AbstractPathGenerator { + + /** + *

Constructor for A_StarPathGenerator.

+ * + * @param stopCondition a {@link org.graphwalker.core.conditions.StopCondition} object. + */ + public A_StarPathGenerator(StopCondition stopCondition) { + super(stopCondition); + } + + private Stack preCalculatedPath = null; + private Vertex lastVertex; + + /** {@inheritDoc} */ + @Override + public void setMachine(FiniteStateMachine machine) { + super.setMachine(machine); + } + + /** + *

Constructor for A_StarPathGenerator.

+ */ + public A_StarPathGenerator() { + super(); + } + + /** {@inheritDoc} */ + @Override + public String[] getNext() throws InterruptedException { + Util.AbortIf(!hasNext(), "Finished"); + if (lastVertex == null || lastVertex != getMachine().getCurrentVertex() || preCalculatedPath == null || preCalculatedPath.size() == 0) { + boolean oldCalculatingPathValue = getMachine().isCalculatingPath(); + getMachine().setCalculatingPath(true); + + preCalculatedPath = a_star(); + + getMachine().setCalculatingPath(oldCalculatingPathValue); + + if (preCalculatedPath == null) { + throw new RuntimeException("No path found to " + this.getStopCondition()); + } + + // reverse path + Stack temp = new Stack(); + while (preCalculatedPath.size() > 0) { + temp.push(preCalculatedPath.pop()); + } + preCalculatedPath = temp; + } + + Edge edge = preCalculatedPath.pop(); + getMachine().walkEdge(edge); + lastVertex = getMachine().getCurrentVertex(); + String[] retur = {getMachine().getEdgeName(edge), getMachine().getCurrentVertexName()}; + return retur; + } + + @SuppressWarnings("unchecked") + private Stack a_star() throws InterruptedException { + Vector closed = new Vector(); + + PriorityQueue a_starPath = new PriorityQueue(10, new Comparator() { + @Override + public int compare(WeightedPath arg0, WeightedPath arg1) { + int retur = Double.compare(arg0.getWeight(), arg1.getWeight()); + if (retur == 0) + retur = arg0.getPath().size() - arg1.getPath().size(); + return retur; + } + }); + + Set availableOutEdges; + try { + availableOutEdges = getMachine().getCurrentOutEdges(); + } catch (FoundNoEdgeException e) { + throw new RuntimeException("No available edges found at " + getMachine().getCurrentVertexName(), e); + } + for (Edge edge : availableOutEdges) { + Stack path = new Stack(); + path.push(edge); + a_starPath.add(getWeightedPath(path)); + } + double maxWeight = 0; + while (a_starPath.size() > 0) { + if (Thread.interrupted()) { + throw new InterruptedException(); + } + + WeightedPath path = a_starPath.poll(); + if (path.getWeight() > maxWeight) + maxWeight = path.getWeight(); + if (path.getWeight() > 0.99999) // are we done yet? + return path.getPath(); + + Edge possibleDuplicate = path.getPath().peek(); + + // have we been here before? + if (closed.contains(possibleDuplicate.hashCode() + "." + path.getSubState().hashCode() + "." + path.getWeight())) + continue; // ignore this and move on + + // We don't want to use this edge again as this path is + // the fastest, and if we come here again we have used more + // steps to get here than we used this time. + closed.add(possibleDuplicate.hashCode() + "." + path.getSubState().hashCode() + "." + path.getWeight()); + + availableOutEdges = getPathOutEdges(path.getPath()); + if (availableOutEdges != null && availableOutEdges.size() > 0) { + for (Edge edge : availableOutEdges) { + Stack newStack = (Stack) path.getPath().clone(); + newStack.push(edge); + a_starPath.add(getWeightedPath(newStack)); + } + } + } + throw new RuntimeException("No path found to satisfy stop condition " + getStopCondition() + ", best path satified only " + + (int) (maxWeight * 100) + "% of condition."); + } + + private WeightedPath getWeightedPath(Stack path) { + double weight = 0; + String subState = ""; + + getMachine().storeVertex(); + getMachine().walkPath(path); + weight = getConditionFulfilment(); + String currentState = getMachine().getCurrentVertexName(); + if (currentState.contains("/")) { + subState = currentState.split("/", 2)[1]; + } + getMachine().restoreVertex(); + + return new WeightedPath(path, weight, subState); + } + + private Set getPathOutEdges(Stack path) { + Set retur = null; + getMachine().storeVertex(); + getMachine().walkPath(path); + try { + retur = getMachine().getCurrentOutEdges(); + } catch (FoundNoEdgeException e) { + // no edges found? degrade gracefully and return the default value of + // null. + } + getMachine().restoreVertex(); + return retur; + } + + /** + * {@inheritDoc} + * + * Will reset the generator to its initial vertex. + */ + @Override + public void reset() { + preCalculatedPath = null; + } + + /** {@inheritDoc} */ + @Override + public String toString() { + return "A_STAR{" + super.toString() + "}"; + } + + private static class WeightedPath { + private double weight; + private Stack path; + private String subState; + + public String getSubState() { + return subState; + } + + public void setSubState(String subState) { + this.subState = subState; + } + + public Stack getPath() { + return path; + } + + public void setPath(Stack path) { + this.path = path; + } + + public double getWeight() { + return weight; + } + + public void setWeight(double weight) { + this.weight = weight; + } + + public WeightedPath(Stack path, double weight, String subState) { + setPath(path); + setWeight(weight); + setSubState(subState); + } + } +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/AbstractPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/AbstractPathGenerator.java index caf6c1c0..d21aabd0 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/AbstractPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/AbstractPathGenerator.java @@ -32,28 +32,59 @@ import java.util.Set; +/** + *

Abstract AbstractPathGenerator class.

+ * + * @author nilols + * @version $Id: $ + */ public abstract class AbstractPathGenerator implements PathGenerator { private FiniteStateMachine machine; private StopCondition stopCondition; + /** + *

getNext.

+ * + * @return an array of {@link java.lang.String} objects. + * @throws java.lang.InterruptedException if any. + */ public abstract String[] getNext() throws InterruptedException; + /** + *

Constructor for AbstractPathGenerator.

+ */ public AbstractPathGenerator() { } + /** + *

Constructor for AbstractPathGenerator.

+ * + * @param stopCondition a {@link org.graphwalker.core.conditions.StopCondition} object. + */ public AbstractPathGenerator(StopCondition stopCondition) { this.stopCondition = stopCondition; } + /** + *

hasNext.

+ * + * @return a boolean. + */ public boolean hasNext() { return !stopCondition.isFulfilled(); } + /** + *

Getter for the field machine.

+ * + * @return a {@link org.graphwalker.core.machines.FiniteStateMachine} object. + */ public FiniteStateMachine getMachine() { return machine; } + /** {@inheritDoc} */ public void setMachine(FiniteStateMachine machine) { this.machine = machine; if (this.stopCondition != null) { @@ -61,6 +92,7 @@ public void setMachine(FiniteStateMachine machine) { } } + /** {@inheritDoc} */ public void setStopCondition(StopCondition stopCondition) { this.stopCondition = stopCondition; if (this.machine != null) { @@ -68,11 +100,18 @@ public void setStopCondition(StopCondition stopCondition) { } } + /** + *

Getter for the field stopCondition.

+ * + * @return a {@link org.graphwalker.core.conditions.StopCondition} object. + */ public StopCondition getStopCondition() { return stopCondition; } /** + *

getConditionFulfilment.

+ * * @return the condition fulfilment */ public double getConditionFulfilment() { @@ -85,6 +124,7 @@ public double getConditionFulfilment() { public void reset() { } + /** {@inheritDoc} */ @Override public String toString() { if (getStopCondition() != null) @@ -92,6 +132,7 @@ public String toString() { return ""; } + /** {@inheritDoc} */ public boolean isEdgeAvailable(Edge edge) { Set availableEdges; try { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java index 123877b6..ef5a9bf8 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java @@ -1,200 +1,218 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.generators; - -import org.apache.log4j.Logger; -import org.graphwalker.core.Util; -import org.graphwalker.core.conditions.StopCondition; -import org.graphwalker.core.exceptions.FoundNoEdgeException; -import org.graphwalker.core.graph.Edge; - -import java.util.*; - -/** - * The generator generates paths through the model in a way that makes sure all - * path permutations of ever increasing depth is tested. - *

- * The first pass through the model finishes when a cycle in the model is found. - * The second pass traverses the model until all edges have been visited twice - * or more. The third pass traverses the model until all available combinations - * of 2 edges have been visited twice or more . . . The n:th pass traverses the - * model until all available combinations of n edges have been visited twice or - * more - *

- * The algorithm always tries the "path less traveled" where a path is a list of - * n edges. If several paths are available with the same number of traversals on - * is chosen by random. - */ -public class AllPathPermutationsGenerator extends AbstractPathGenerator { - - private static Logger logger = Util.setupLogger(AllPathPermutationsGenerator.class); - - private final Random random = new Random(); - - /* Contains all walked paths for a specific depth */ - private final HashMap pathWalked = new HashMap(); - - /* List of edges comprising the current path */ - private final List savedEdges = new ArrayList(); - - private int currentDepth; - - public AllPathPermutationsGenerator(final StopCondition stopCondition) { - super(stopCondition); - currentDepth = 0; - } - - public AllPathPermutationsGenerator() { - super(); - currentDepth = 0; - } - - @Override - public String[] getNext() throws InterruptedException { - Set availableEdges; - - try { - availableEdges = getMachine().getCurrentOutEdges(); - } catch (FoundNoEdgeException e) { - throw new RuntimeException("No possible edges available for path", e); - } - - Set selectedEdges = new HashSet(); - int fewestVisits = -1; - - // Loop through available edges and pick the one which results in a path - // least traversed. - for (Edge edge : availableEdges) { - - // Add available edge to the current path - savedEdges.add(edge); - - // Has it been traversed before and if so how many times - Integer hashValue = pathWalked.get(savedEdges.hashCode()); - - // Never walked path - if (hashValue == null) { - fewestVisits = 0; - selectedEdges.add(edge); - - // Has been traversed but fewer times - } else if (hashValue < fewestVisits || fewestVisits == -1) { - fewestVisits = hashValue; - selectedEdges.clear(); - selectedEdges.add(edge); - - // Has been traversed but equal times - } else if (hashValue == fewestVisits) { - selectedEdges.add(edge); - } - - // Remove the edge from the current path - savedEdges.remove(edge); - } - Edge selectedEdge = getRandomEdge(selectedEdges); - - // Add the selected edge to the current path - savedEdges.add(selectedEdge); - - // Update number of traversals of this path - pathWalked.put(savedEdges.hashCode(), fewestVisits + 1); - - // Check if all paths have been traversed twice or more - // If so, increase the length of the path by 1 and clear the hash - if (checkCompletion()) { - currentDepth++; - AllPathPermutationsGenerator.logger.debug("All combinations done, changing look back depth to: " + currentDepth); - pathWalked.clear(); - } else if (currentDepth == 0 && checkCompletionFirst()) { - currentDepth++; - AllPathPermutationsGenerator.logger.debug("Cycle detected, starting algorithm with depth: " + currentDepth); - pathWalked.clear(); - savedEdges.remove(0); - - // If not, remove the first edge in the path - } else { - savedEdges.remove(0); - } - - getMachine().walkEdge(selectedEdge); - AllPathPermutationsGenerator.logger.debug(selectedEdge.getFullLabelKey()); - AllPathPermutationsGenerator.logger.debug(selectedEdge); - AllPathPermutationsGenerator.logger.trace("Current Path: " + printPath()); - AllPathPermutationsGenerator.logger.debug("Hash size: " + pathWalked.size()); - AllPathPermutationsGenerator.logger.trace("Hash: " + printHash()); - return new String[]{getMachine().getEdgeName(selectedEdge), getMachine().getCurrentVertexName()}; - } - - private boolean checkCompletionFirst() { - for (Integer value : pathWalked.values()) { - if (value == 2) { - return true; - } - } - return false; - } - - private boolean checkCompletion() { - for (Integer value : pathWalked.values()) { - if (value == 1) { - return false; - } - } - return true; - } - - private String printPath() { - StringBuilder stringBuilder = new StringBuilder(); - for (Edge edge : savedEdges) { - stringBuilder.append(edge.getFullLabelKey()); - } - return stringBuilder.toString(); - } - - private String printHash() { - StringBuilder stringBuilder = new StringBuilder(); - for (Integer value : pathWalked.values()) { - stringBuilder.append(value); - stringBuilder.append(" "); - } - return stringBuilder.toString(); - - } - - private Edge getRandomEdge(final Set availableEdges) { - return (Edge) availableEdges.toArray()[random.nextInt(availableEdges.size())]; - } - - @Override - public String toString() { - return "COMBINATIONS{" + super.toString() + "}"; - } - - public int getDepth() { - return currentDepth; - } -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.generators; + +import org.apache.log4j.Logger; +import org.graphwalker.core.Util; +import org.graphwalker.core.conditions.StopCondition; +import org.graphwalker.core.exceptions.FoundNoEdgeException; +import org.graphwalker.core.graph.Edge; + +import java.util.*; + +/** + * The generator generates paths through the model in a way that makes sure all + * path permutations of ever increasing depth is tested. + *

+ * The first pass through the model finishes when a cycle in the model is found. + * The second pass traverses the model until all edges have been visited twice + * or more. The third pass traverses the model until all available combinations + * of 2 edges have been visited twice or more . . . The n:th pass traverses the + * model until all available combinations of n edges have been visited twice or + * more + *

+ * The algorithm always tries the "path less traveled" where a path is a list of + * n edges. If several paths are available with the same number of traversals on + * is chosen by random. + * + * @author nilols + * @version $Id: $ + */ +public class AllPathPermutationsGenerator extends AbstractPathGenerator { + + private static Logger logger = Util.setupLogger(AllPathPermutationsGenerator.class); + + private final Random random = new Random(); + + /* Contains all walked paths for a specific depth */ + private final HashMap pathWalked = new HashMap(); + + /* List of edges comprising the current path */ + private final List savedEdges = new ArrayList(); + + private int currentDepth; + + /** + *

Constructor for AllPathPermutationsGenerator.

+ * + * @param stopCondition a {@link org.graphwalker.core.conditions.StopCondition} object. + */ + public AllPathPermutationsGenerator(final StopCondition stopCondition) { + super(stopCondition); + currentDepth = 0; + } + + /** + *

Constructor for AllPathPermutationsGenerator.

+ */ + public AllPathPermutationsGenerator() { + super(); + currentDepth = 0; + } + + /** {@inheritDoc} */ + @Override + public String[] getNext() throws InterruptedException { + Set availableEdges; + + try { + availableEdges = getMachine().getCurrentOutEdges(); + } catch (FoundNoEdgeException e) { + throw new RuntimeException("No possible edges available for path", e); + } + + Set selectedEdges = new HashSet(); + int fewestVisits = -1; + + // Loop through available edges and pick the one which results in a path + // least traversed. + for (Edge edge : availableEdges) { + + // Add available edge to the current path + savedEdges.add(edge); + + // Has it been traversed before and if so how many times + Integer hashValue = pathWalked.get(savedEdges.hashCode()); + + // Never walked path + if (hashValue == null) { + fewestVisits = 0; + selectedEdges.add(edge); + + // Has been traversed but fewer times + } else if (hashValue < fewestVisits || fewestVisits == -1) { + fewestVisits = hashValue; + selectedEdges.clear(); + selectedEdges.add(edge); + + // Has been traversed but equal times + } else if (hashValue == fewestVisits) { + selectedEdges.add(edge); + } + + // Remove the edge from the current path + savedEdges.remove(edge); + } + Edge selectedEdge = getRandomEdge(selectedEdges); + + // Add the selected edge to the current path + savedEdges.add(selectedEdge); + + // Update number of traversals of this path + pathWalked.put(savedEdges.hashCode(), fewestVisits + 1); + + // Check if all paths have been traversed twice or more + // If so, increase the length of the path by 1 and clear the hash + if (checkCompletion()) { + currentDepth++; + AllPathPermutationsGenerator.logger.debug("All combinations done, changing look back depth to: " + currentDepth); + pathWalked.clear(); + } else if (currentDepth == 0 && checkCompletionFirst()) { + currentDepth++; + AllPathPermutationsGenerator.logger.debug("Cycle detected, starting algorithm with depth: " + currentDepth); + pathWalked.clear(); + savedEdges.remove(0); + + // If not, remove the first edge in the path + } else { + savedEdges.remove(0); + } + + getMachine().walkEdge(selectedEdge); + AllPathPermutationsGenerator.logger.debug(selectedEdge.getFullLabelKey()); + AllPathPermutationsGenerator.logger.debug(selectedEdge); + AllPathPermutationsGenerator.logger.trace("Current Path: " + printPath()); + AllPathPermutationsGenerator.logger.debug("Hash size: " + pathWalked.size()); + AllPathPermutationsGenerator.logger.trace("Hash: " + printHash()); + return new String[]{getMachine().getEdgeName(selectedEdge), getMachine().getCurrentVertexName()}; + } + + private boolean checkCompletionFirst() { + for (Integer value : pathWalked.values()) { + if (value == 2) { + return true; + } + } + return false; + } + + private boolean checkCompletion() { + for (Integer value : pathWalked.values()) { + if (value == 1) { + return false; + } + } + return true; + } + + private String printPath() { + StringBuilder stringBuilder = new StringBuilder(); + for (Edge edge : savedEdges) { + stringBuilder.append(edge.getFullLabelKey()); + } + return stringBuilder.toString(); + } + + private String printHash() { + StringBuilder stringBuilder = new StringBuilder(); + for (Integer value : pathWalked.values()) { + stringBuilder.append(value); + stringBuilder.append(" "); + } + return stringBuilder.toString(); + + } + + private Edge getRandomEdge(final Set availableEdges) { + return (Edge) availableEdges.toArray()[random.nextInt(availableEdges.size())]; + } + + /** {@inheritDoc} */ + @Override + public String toString() { + return "COMBINATIONS{" + super.toString() + "}"; + } + + /** + *

getDepth.

+ * + * @return a int. + */ + public int getDepth() { + return currentDepth; + } +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java index b435a9ec..1d1029f8 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java @@ -1,95 +1,113 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.generators; - -import org.graphwalker.core.conditions.StopCondition; - -/** - * Will generate code using a template. The code generated will contain all - * lables/names defined by the vertices and edges. This enables the user to - * write templates for a multitude of scripting or programming languages.
- *
- * There is 2 variables in the template that will be replaced as follows:
- * {LABEL} Will be replace by the actual name of the edge or - * vertex.
- * {EDGE_VERTEX} Will be replace by the word 'Edge' or - * 'Vertex'.
- *
- * Below is an example of a template. - *

- *

- * /**
- * * This method implements the {EDGE_VERTEX} '{LABEL}'
- * * /
- * public void {LABEL}()
- * {
- *    log.info( "{EDGE_VERTEX}: {LABEL}" );
- *    throw new RuntimeException( "Not implemented" );
- * }
- * 
- */ -public class CodeGenerator extends ListGenerator { - - public CodeGenerator(StopCondition stopCondition) { - super(stopCondition); - } - - public CodeGenerator() { - super(); - } - - private String[] template; // {HEADER, BODY, FOOTER} - private boolean first = true; - - public void setTemplate(String[] template) { - this.template = template.clone(); - } - - @Override - public String[] getNext() { - String[] retur = super.getNext(); - if (retur[0].isEmpty()) { - retur[1] = ""; - return retur; - } - retur[0] = (first && template[0].length() > 0 ? template[0] + "\n" : "") - + // HEADER - template[1] - // BODY - .replaceAll("\\{LABEL\\}", retur[0]).replaceAll("\\{EDGE_VERTEX\\}", retur[1]) - .replaceAll("\\{DESCRIPTION\\}", retur[2].replaceAll("\n", "\n * ")) - + (!hasNext() && template[2].length() > 0 ? "\n" + template[2] : ""); // FOOTER - retur[1] = ""; - first = false; - return retur; - } - - @Override - public String toString() { - return "CODE"; - } -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.generators; + +import org.graphwalker.core.conditions.StopCondition; + +/** + * Will generate code using a template. The code generated will contain all + * lables/names defined by the vertices and edges. This enables the user to + * write templates for a multitude of scripting or programming languages.
+ *
+ * There is 2 variables in the template that will be replaced as follows:
+ * {LABEL} Will be replace by the actual name of the edge or + * vertex.
+ * {EDGE_VERTEX} Will be replace by the word 'Edge' or + * 'Vertex'.
+ *
+ * Below is an example of a template. + *

+ *

+/**
+ * * * This method implements the {EDGE_VERTEX} '{LABEL}'
+ * * /
+ * public void {LABEL}()
+ * {
+ *    log.info( "{EDGE_VERTEX}: {LABEL}" );
+ *    throw new RuntimeException( "Not implemented" );
+ * }
+ * 
+ * + * @author nilols + * @version $Id: $ + */ +public class CodeGenerator extends ListGenerator { + + /** + *

Constructor for CodeGenerator.

+ * + * @param stopCondition a {@link org.graphwalker.core.conditions.StopCondition} object. + */ + public CodeGenerator(StopCondition stopCondition) { + super(stopCondition); + } + + /** + *

Constructor for CodeGenerator.

+ */ + public CodeGenerator() { + super(); + } + + private String[] template; // {HEADER, BODY, FOOTER} + private boolean first = true; + + /** + *

Setter for the field template.

+ * + * @param template an array of {@link java.lang.String} objects. + */ + public void setTemplate(String[] template) { + this.template = template.clone(); + } + + /** {@inheritDoc} */ + @Override + public String[] getNext() { + String[] retur = super.getNext(); + if (retur[0].isEmpty()) { + retur[1] = ""; + return retur; + } + retur[0] = (first && template[0].length() > 0 ? template[0] + "\n" : "") + + // HEADER + template[1] + // BODY + .replaceAll("\\{LABEL\\}", retur[0]).replaceAll("\\{EDGE_VERTEX\\}", retur[1]) + .replaceAll("\\{DESCRIPTION\\}", retur[2].replaceAll("\n", "\n * ")) + + (!hasNext() && template[2].length() > 0 ? "\n" + template[2] : ""); // FOOTER + retur[1] = ""; + first = false; + return retur; + } + + /** {@inheritDoc} */ + @Override + public String toString() { + return "CODE"; + } +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java index a642225f..1be8974b 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java @@ -1,118 +1,142 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.generators; - -import org.apache.log4j.Logger; -import org.graphwalker.core.conditions.StopCondition; -import org.graphwalker.core.machines.FiniteStateMachine; - -import java.util.Vector; - -public class CombinedPathGenerator extends AbstractPathGenerator { - - private static Logger logger = Logger.getLogger(CombinedPathGenerator.class); - - private Vector generatorList = new Vector(); - private int currentGenerator = 0; - - public CombinedPathGenerator() { - super(); - } - - public CombinedPathGenerator(StopCondition stopCondition) { - super(stopCondition); - } - - public void addPathGenerator(PathGenerator generator) { - logger.debug("Adding PathGenerator: " + generator); - generatorList.add(generator); - } - - @Override - public void setMachine(FiniteStateMachine machine) { - for (PathGenerator aGeneratorList : generatorList) { - aGeneratorList.setMachine(machine); - } - } - - @Override - public void setStopCondition(StopCondition stopCondition) { - for (PathGenerator aGeneratorList : generatorList) { - aGeneratorList.setStopCondition(stopCondition); - } - } - - private PathGenerator getActivePathGenerator() { - return generatorList.get(currentGenerator); - } - - private boolean hasPath() { - return generatorList.size() > currentGenerator; - } - - private void scrapActivePathGenerator() { - logger.debug("Removing PathGenerator: " + getActivePathGenerator()); - currentGenerator++; - } - - @Override - public boolean hasNext() { - boolean nextIsAvailable = false; - while (hasPath() && !nextIsAvailable) { - nextIsAvailable = getActivePathGenerator().hasNext(); - if (!nextIsAvailable) - scrapActivePathGenerator(); - } - return nextIsAvailable; - } - - @Override - public String[] getNext() throws InterruptedException { - String[] retur = {"", ""}; - - boolean nextIsAvailable = false; - while (hasPath() && !nextIsAvailable) { - nextIsAvailable = getActivePathGenerator().hasNext(); - if (!nextIsAvailable) - scrapActivePathGenerator(); - } - if (!nextIsAvailable) - return retur; - return getActivePathGenerator().getNext(); - } - - @Override - public String toString() { - StringBuilder stringBuilder = new StringBuilder(); - for (PathGenerator aGeneratorList : generatorList) { - stringBuilder.append(aGeneratorList.toString()); - stringBuilder.append(System.getProperty("line.separator")); - } - return stringBuilder.toString().trim(); - } - -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.generators; + +import org.apache.log4j.Logger; +import org.graphwalker.core.conditions.StopCondition; +import org.graphwalker.core.machines.FiniteStateMachine; + +import java.util.Vector; + +/** + *

CombinedPathGenerator class.

+ * + * @author nilols + * @version $Id: $ + */ +public class CombinedPathGenerator extends AbstractPathGenerator { + + private static Logger logger = Logger.getLogger(CombinedPathGenerator.class); + + private Vector generatorList = new Vector(); + private int currentGenerator = 0; + + /** + *

Constructor for CombinedPathGenerator.

+ */ + public CombinedPathGenerator() { + super(); + } + + /** + *

Constructor for CombinedPathGenerator.

+ * + * @param stopCondition a {@link org.graphwalker.core.conditions.StopCondition} object. + */ + public CombinedPathGenerator(StopCondition stopCondition) { + super(stopCondition); + } + + /** + *

addPathGenerator.

+ * + * @param generator a {@link org.graphwalker.core.generators.PathGenerator} object. + */ + public void addPathGenerator(PathGenerator generator) { + logger.debug("Adding PathGenerator: " + generator); + generatorList.add(generator); + } + + /** {@inheritDoc} */ + @Override + public void setMachine(FiniteStateMachine machine) { + for (PathGenerator aGeneratorList : generatorList) { + aGeneratorList.setMachine(machine); + } + } + + /** {@inheritDoc} */ + @Override + public void setStopCondition(StopCondition stopCondition) { + for (PathGenerator aGeneratorList : generatorList) { + aGeneratorList.setStopCondition(stopCondition); + } + } + + private PathGenerator getActivePathGenerator() { + return generatorList.get(currentGenerator); + } + + private boolean hasPath() { + return generatorList.size() > currentGenerator; + } + + private void scrapActivePathGenerator() { + logger.debug("Removing PathGenerator: " + getActivePathGenerator()); + currentGenerator++; + } + + /** {@inheritDoc} */ + @Override + public boolean hasNext() { + boolean nextIsAvailable = false; + while (hasPath() && !nextIsAvailable) { + nextIsAvailable = getActivePathGenerator().hasNext(); + if (!nextIsAvailable) + scrapActivePathGenerator(); + } + return nextIsAvailable; + } + + /** {@inheritDoc} */ + @Override + public String[] getNext() throws InterruptedException { + String[] retur = {"", ""}; + + boolean nextIsAvailable = false; + while (hasPath() && !nextIsAvailable) { + nextIsAvailable = getActivePathGenerator().hasNext(); + if (!nextIsAvailable) + scrapActivePathGenerator(); + } + if (!nextIsAvailable) + return retur; + return getActivePathGenerator().getNext(); + } + + /** {@inheritDoc} */ + @Override + public String toString() { + StringBuilder stringBuilder = new StringBuilder(); + for (PathGenerator aGeneratorList : generatorList) { + stringBuilder.append(aGeneratorList.toString()); + stringBuilder.append(System.getProperty("line.separator")); + } + return stringBuilder.toString().trim(); + } + +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java index f3fccc6f..452aaf14 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java @@ -1,91 +1,108 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.generators; - -import org.graphwalker.core.Keywords; -import org.graphwalker.core.conditions.StopCondition; -import org.graphwalker.core.graph.AbstractElement; -import org.graphwalker.core.graph.Edge; - -import java.util.Comparator; -import java.util.Stack; -import java.util.TreeSet; -import java.util.Vector; - -public class ListGenerator extends AbstractPathGenerator { - - private Stack list = null; - - public ListGenerator(StopCondition stopCondition) { - super(stopCondition); - } - - public ListGenerator() { - super(); - } - - @Override - public boolean hasNext() { - if (list == null) - generateList(); - return !list.isEmpty(); - } - - @Override - public String[] getNext() { - if (list == null) - generateList(); - return list.pop(); - } - - private void generateList() { - list = new Stack(); - TreeSet tempList = new TreeSet(new Comparator() { - @Override - public int compare(String[] arg0, String[] arg1) { - return (arg1)[0].compareTo((arg0)[0]); - } - }); - - Vector abstractElements = new Vector(); - abstractElements.addAll(getMachine().getAllVertices()); - abstractElements.addAll(getMachine().getAllEdges()); - - for (AbstractElement ae : abstractElements) { - if (!ae.getLabelKey().equalsIgnoreCase(Keywords.START_NODE)) { - String[] value = {ae.getLabelKey(), (ae instanceof Edge ? "Edge" : "Vertex"), ae.getDescriptionKey()}; - tempList.add(value); - } - } - list.addAll(tempList); - } - - @Override - public String toString() { - return "LIST"; - } -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.generators; + +import org.graphwalker.core.Keywords; +import org.graphwalker.core.conditions.StopCondition; +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Edge; + +import java.util.Comparator; +import java.util.Stack; +import java.util.TreeSet; +import java.util.Vector; + +/** + *

ListGenerator class.

+ * + * @author nilols + * @version $Id: $ + */ +public class ListGenerator extends AbstractPathGenerator { + + private Stack list = null; + + /** + *

Constructor for ListGenerator.

+ * + * @param stopCondition a {@link org.graphwalker.core.conditions.StopCondition} object. + */ + public ListGenerator(StopCondition stopCondition) { + super(stopCondition); + } + + /** + *

Constructor for ListGenerator.

+ */ + public ListGenerator() { + super(); + } + + /** {@inheritDoc} */ + @Override + public boolean hasNext() { + if (list == null) + generateList(); + return !list.isEmpty(); + } + + /** {@inheritDoc} */ + @Override + public String[] getNext() { + if (list == null) + generateList(); + return list.pop(); + } + + private void generateList() { + list = new Stack(); + TreeSet tempList = new TreeSet(new Comparator() { + @Override + public int compare(String[] arg0, String[] arg1) { + return (arg1)[0].compareTo((arg0)[0]); + } + }); + + Vector abstractElements = new Vector(); + abstractElements.addAll(getMachine().getAllVertices()); + abstractElements.addAll(getMachine().getAllEdges()); + + for (AbstractElement ae : abstractElements) { + if (!ae.getLabelKey().equalsIgnoreCase(Keywords.START_NODE)) { + String[] value = {ae.getLabelKey(), (ae instanceof Edge ? "Edge" : "Vertex"), ae.getDescriptionKey()}; + tempList.add(value); + } + } + list.addAll(tempList); + } + + /** {@inheritDoc} */ + @Override + public String toString() { + return "LIST"; + } +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java index a93619ba..d0ce7b44 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java @@ -36,10 +36,21 @@ import java.util.List; import java.util.Vector; +/** + *

NonOptimizedShortestPath class.

+ * + * @author nilols + * @version $Id: $ + */ public class NonOptimizedShortestPath extends RandomPathGenerator { private boolean toggleAllOrUnvisited = true; + /** + *

Constructor for NonOptimizedShortestPath.

+ * + * @param stopCondition a {@link org.graphwalker.core.conditions.StopCondition} object. + */ public NonOptimizedShortestPath(StopCondition stopCondition) { super(stopCondition); } @@ -47,10 +58,14 @@ public NonOptimizedShortestPath(StopCondition stopCondition) { private static Logger logger = Util.setupLogger(NonOptimizedShortestPath.class); private List dijkstraShortestPath; + /** + *

Constructor for NonOptimizedShortestPath.

+ */ public NonOptimizedShortestPath() { super(); } + /** {@inheritDoc} */ @Override public String[] getNext() throws InterruptedException { Util.AbortIf(!hasNext(), "Finished"); @@ -122,6 +137,9 @@ private boolean setDijkstraPath() { return true; } + /** + *

emptyCurrentPath.

+ */ public void emptyCurrentPath() { if (dijkstraShortestPath == null || dijkstraShortestPath.size() == 0) { return; @@ -129,6 +147,7 @@ public void emptyCurrentPath() { dijkstraShortestPath = null; } + /** {@inheritDoc} */ @Override public String toString() { if (getStopCondition() == null) { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java index ee9025cd..f341ede9 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java @@ -1,58 +1,103 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.generators; - -import org.graphwalker.core.conditions.StopCondition; -import org.graphwalker.core.graph.Edge; -import org.graphwalker.core.machines.FiniteStateMachine; - -public interface PathGenerator { - - String[] getNext() throws InterruptedException; - - boolean hasNext(); - - FiniteStateMachine getMachine(); - - void setMachine(FiniteStateMachine machine); - - void setStopCondition(StopCondition stopCondition); - - StopCondition getStopCondition(); - - /** - * @return the condition fulfilment - */ - double getConditionFulfilment(); - - /** - * Will reset the generator to its initial vertex. - */ - void reset(); - - boolean isEdgeAvailable(Edge edge); -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.generators; + +import org.graphwalker.core.conditions.StopCondition; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.machines.FiniteStateMachine; + +/** + *

PathGenerator interface.

+ * + * @author nilols + * @version $Id: $ + */ +public interface PathGenerator { + + /** + *

getNext.

+ * + * @return an array of {@link java.lang.String} objects. + * @throws java.lang.InterruptedException if any. + */ + String[] getNext() throws InterruptedException; + + /** + *

hasNext.

+ * + * @return a boolean. + */ + boolean hasNext(); + + /** + *

getMachine.

+ * + * @return a {@link org.graphwalker.core.machines.FiniteStateMachine} object. + */ + FiniteStateMachine getMachine(); + + /** + *

setMachine.

+ * + * @param machine a {@link org.graphwalker.core.machines.FiniteStateMachine} object. + */ + void setMachine(FiniteStateMachine machine); + + /** + *

setStopCondition.

+ * + * @param stopCondition a {@link org.graphwalker.core.conditions.StopCondition} object. + */ + void setStopCondition(StopCondition stopCondition); + + /** + *

getStopCondition.

+ * + * @return a {@link org.graphwalker.core.conditions.StopCondition} object. + */ + StopCondition getStopCondition(); + + /** + *

getConditionFulfilment.

+ * + * @return the condition fulfilment + */ + double getConditionFulfilment(); + + /** + * Will reset the generator to its initial vertex. + */ + void reset(); + + /** + *

isEdgeAvailable.

+ * + * @param edge a {@link org.graphwalker.core.graph.Edge} object. + * @return a boolean. + */ + boolean isEdgeAvailable(Edge edge); +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java index 9b23c0cd..9c9bdbb4 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java @@ -1,125 +1,141 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.generators; - -import org.apache.log4j.Logger; -import org.graphwalker.core.Util; -import org.graphwalker.core.conditions.StopCondition; -import org.graphwalker.core.exceptions.FoundNoEdgeException; -import org.graphwalker.core.graph.Edge; - -import java.util.HashMap; -import java.util.Map; -import java.util.Random; -import java.util.Set; - -public class RandomPathGenerator extends AbstractPathGenerator { - - private static Logger logger = Util.setupLogger(RandomPathGenerator.class); - - private Random random = new Random(); - - public RandomPathGenerator(StopCondition stopCondition) { - super(stopCondition); - } - - public RandomPathGenerator() { - super(); - } - - @Override - public String[] getNext() throws InterruptedException { - Set availableEdges; - try { - availableEdges = getMachine().getCurrentOutEdges(); - } catch (FoundNoEdgeException e) { - throw new RuntimeException("No possible edges available for path", e); - } - if (Thread.interrupted()) { - throw new InterruptedException(); - } - Edge edge = (getMachine().isWeighted() ? getWeightedEdge(availableEdges) : getRandomEdge(availableEdges)); - getMachine().walkEdge(edge); - logger.debug(edge.getFullLabelKey()); - logger.debug(edge); - return new String[]{getMachine().getEdgeName(edge), getMachine().getCurrentVertexName()}; - } - - private Edge getWeightedEdge(Set availableEdges) { - - Map probabilities = new HashMap(); - int numberOfZeros = 0; - double sum = 0; - - for (Edge edge : availableEdges) { - if (edge.getWeightKey() > 0) { - probabilities.put(edge, (double) edge.getWeightKey()); - sum += edge.getWeightKey(); - if (sum > 1) { - throw new RuntimeException("The sum of all weights in edges from vertex: '" - + getMachine().getModel().getSource(edge).getLabelKey() + "', adds up to more than 1.00"); - } - } else { - numberOfZeros++; - probabilities.put(edge, 0d); - } - } - - double rest = (1 - sum) / numberOfZeros; - int index = random.nextInt(100); - logger.debug("Randomized integer index = " + index); - - double weight = 0; - - for (Edge edge : availableEdges) { - - if (probabilities.get(edge) == 0) { - probabilities.put(edge, rest); - } - - logger.debug("The edge: '" + edge.getLabelKey() + "' is given the probability of " + probabilities.get(edge) * 100 + "%"); - - weight = weight + probabilities.get(edge) * 100; - logger.debug("Current weight is: " + weight); - if (index < weight) { - logger.debug("Selected edge is: " + edge); - return edge; - } - } - - throw new RuntimeException("No edge found"); - } - - private Edge getRandomEdge(Set availableEdges) { - return (Edge) availableEdges.toArray()[random.nextInt(availableEdges.size())]; - } - - @Override - public String toString() { - return "RANDOM{" + super.toString() + "}"; - } -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.generators; + +import org.apache.log4j.Logger; +import org.graphwalker.core.Util; +import org.graphwalker.core.conditions.StopCondition; +import org.graphwalker.core.exceptions.FoundNoEdgeException; +import org.graphwalker.core.graph.Edge; + +import java.util.HashMap; +import java.util.Map; +import java.util.Random; +import java.util.Set; + +/** + *

RandomPathGenerator class.

+ * + * @author nilols + * @version $Id: $ + */ +public class RandomPathGenerator extends AbstractPathGenerator { + + private static Logger logger = Util.setupLogger(RandomPathGenerator.class); + + private Random random = new Random(); + + /** + *

Constructor for RandomPathGenerator.

+ * + * @param stopCondition a {@link org.graphwalker.core.conditions.StopCondition} object. + */ + public RandomPathGenerator(StopCondition stopCondition) { + super(stopCondition); + } + + /** + *

Constructor for RandomPathGenerator.

+ */ + public RandomPathGenerator() { + super(); + } + + /** {@inheritDoc} */ + @Override + public String[] getNext() throws InterruptedException { + Set availableEdges; + try { + availableEdges = getMachine().getCurrentOutEdges(); + } catch (FoundNoEdgeException e) { + throw new RuntimeException("No possible edges available for path", e); + } + if (Thread.interrupted()) { + throw new InterruptedException(); + } + Edge edge = (getMachine().isWeighted() ? getWeightedEdge(availableEdges) : getRandomEdge(availableEdges)); + getMachine().walkEdge(edge); + logger.debug(edge.getFullLabelKey()); + logger.debug(edge); + return new String[]{getMachine().getEdgeName(edge), getMachine().getCurrentVertexName()}; + } + + private Edge getWeightedEdge(Set availableEdges) { + + Map probabilities = new HashMap(); + int numberOfZeros = 0; + double sum = 0; + + for (Edge edge : availableEdges) { + if (edge.getWeightKey() > 0) { + probabilities.put(edge, (double) edge.getWeightKey()); + sum += edge.getWeightKey(); + if (sum > 1) { + throw new RuntimeException("The sum of all weights in edges from vertex: '" + + getMachine().getModel().getSource(edge).getLabelKey() + "', adds up to more than 1.00"); + } + } else { + numberOfZeros++; + probabilities.put(edge, 0d); + } + } + + double rest = (1 - sum) / numberOfZeros; + int index = random.nextInt(100); + logger.debug("Randomized integer index = " + index); + + double weight = 0; + + for (Edge edge : availableEdges) { + + if (probabilities.get(edge) == 0) { + probabilities.put(edge, rest); + } + + logger.debug("The edge: '" + edge.getLabelKey() + "' is given the probability of " + probabilities.get(edge) * 100 + "%"); + + weight = weight + probabilities.get(edge) * 100; + logger.debug("Current weight is: " + weight); + if (index < weight) { + logger.debug("Selected edge is: " + edge); + return edge; + } + } + + throw new RuntimeException("No edge found"); + } + + private Edge getRandomEdge(Set availableEdges) { + return (Edge) availableEdges.toArray()[random.nextInt(availableEdges.size())]; + } + + /** {@inheritDoc} */ + @Override + public String toString() { + return "RANDOM{" + super.toString() + "}"; + } +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java index 8be837ca..4ad61e9e 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java @@ -31,18 +31,33 @@ import java.util.*; +/** + *

RequirementsGenerator class.

+ * + * @author nilols + * @version $Id: $ + */ public class RequirementsGenerator extends AbstractPathGenerator { private Stack list = null; + /** + *

Constructor for RequirementsGenerator.

+ * + * @param stopCondition a {@link org.graphwalker.core.conditions.StopCondition} object. + */ public RequirementsGenerator(StopCondition stopCondition) { super(stopCondition); } + /** + *

Constructor for RequirementsGenerator.

+ */ public RequirementsGenerator() { super(); } + /** {@inheritDoc} */ @Override public boolean hasNext() { if (list == null) { @@ -51,6 +66,7 @@ public boolean hasNext() { return !list.isEmpty(); } + /** {@inheritDoc} */ @Override public String[] getNext() { if (list == null) { @@ -86,6 +102,7 @@ public int compare(String[] arg0, String[] arg1) { list.addAll(tempList); } + /** {@inheritDoc} */ @Override public String toString() { return "REQUIREMENTS"; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java index df48bf0e..2fb8b9f6 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java @@ -33,6 +33,12 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +/** + *

AbstractElement class.

+ * + * @author nilols + * @version $Id: $ + */ public class AbstractElement { static Logger logger = Util.setupLogger(AbstractElement.class); @@ -54,9 +60,17 @@ public class AbstractElement { private String manualInstructions = ""; private String descriptionKey = ""; + /** + *

Constructor for AbstractElement.

+ */ public AbstractElement() { } + /** + *

Constructor for AbstractElement.

+ * + * @param ae a {@link org.graphwalker.core.graph.AbstractElement} object. + */ protected AbstractElement(AbstractElement ae) { this.labelKey = ae.labelKey; this.fullLabelKey = ae.fullLabelKey; @@ -77,6 +91,12 @@ protected AbstractElement(AbstractElement ae) { this.descriptionKey = ae.descriptionKey; } + /** + *

Constructor for AbstractElement.

+ * + * @param A a {@link org.graphwalker.core.graph.AbstractElement} object. + * @param B a {@link org.graphwalker.core.graph.AbstractElement} object. + */ protected AbstractElement(AbstractElement A, AbstractElement B) { if (A.fullLabelKey.length() > B.fullLabelKey.length()) { this.labelKey = A.labelKey; @@ -117,94 +137,209 @@ protected AbstractElement(AbstractElement A, AbstractElement B) { } } + /** + *

isMergedMbtKey.

+ * + * @return a boolean. + */ public boolean isMergedMbtKey() { return mergedMbtKey; } + /** + *

Setter for the field mergedMbtKey.

+ * + * @param mergedMbtKey a boolean. + */ public void setMergedMbtKey(boolean mergedMbtKey) { this.mergedMbtKey = mergedMbtKey; } + /** + *

Getter for the field imageKey.

+ * + * @return a {@link java.lang.String} object. + */ public String getImageKey() { return imageKey; } + /** + *

Setter for the field imageKey.

+ * + * @param imageKey a {@link java.lang.String} object. + */ public void setImageKey(String imageKey) { this.imageKey = imageKey; } + /** + *

isBlockedKey.

+ * + * @return a boolean. + */ public boolean isBlockedKey() { return blockedKey; } + /** + *

Setter for the field blockedKey.

+ * + * @param blockedKey a boolean. + */ public void setBlockedKey(boolean blockedKey) { this.blockedKey = blockedKey; } + /** + *

isNoMergeKey.

+ * + * @return a boolean. + */ public boolean isNoMergeKey() { return noMergeKey; } + /** + *

Setter for the field noMergeKey.

+ * + * @param noMergeKey a boolean. + */ public void setNoMergeKey(boolean noMergeKey) { this.noMergeKey = noMergeKey; } + /** + *

isMergeKey.

+ * + * @return a boolean. + */ public boolean isMergeKey() { return mergeKey; } + /** + *

Setter for the field mergeKey.

+ * + * @param mergeKey a boolean. + */ public void setMergeKey(boolean mergeKey) { this.mergeKey = mergeKey; } + /** + *

Getter for the field fileKey.

+ * + * @return a {@link java.lang.String} object. + */ public String getFileKey() { return fileKey; } + /** + *

Setter for the field fileKey.

+ * + * @param fileKey a {@link java.lang.String} object. + */ public void setFileKey(String fileKey) { this.fileKey = fileKey; } + /** + *

Getter for the field idKey.

+ * + * @return a {@link java.lang.String} object. + */ public String getIdKey() { return idKey; } + /** + *

Setter for the field idKey.

+ * + * @param idKey a {@link java.lang.String} object. + */ public void setIdKey(String idKey) { this.idKey = idKey; } + /** + *

Getter for the field indexKey.

+ * + * @return a {@link java.lang.Integer} object. + */ public Integer getIndexKey() { return indexKey; } + /** + *

Setter for the field indexKey.

+ * + * @param indexKey a {@link java.lang.Integer} object. + */ public void setIndexKey(Integer indexKey) { this.indexKey = indexKey; } + /** + *

Getter for the field actionsKey.

+ * + * @return a {@link java.lang.String} object. + */ public String getActionsKey() { return actionsKey; } + /** + *

Setter for the field actionsKey.

+ * + * @param actionsKey a {@link java.lang.String} object. + */ public void setActionsKey(String actionsKey) { this.actionsKey = actionsKey; } + /** + *

Getter for the field visitedKey.

+ * + * @return a {@link java.lang.Integer} object. + */ public Integer getVisitedKey() { return visitedKey; } + /** + *

Setter for the field visitedKey.

+ * + * @param visitedKey a {@link java.lang.Integer} object. + */ public void setVisitedKey(Integer visitedKey) { this.visitedKey = visitedKey; } + /** + *

Getter for the field parameterKey.

+ * + * @return a {@link java.lang.String} object. + */ public String getParameterKey() { return parameterKey; } + /** + *

Setter for the field parameterKey.

+ * + * @param parameterKey a {@link java.lang.String} object. + */ public void setParameterKey(String parameterKey) { this.parameterKey = parameterKey; } + /** + *

Getter for the field reqTagKey.

+ * + * @return a {@link java.lang.String} object. + */ public String getReqTagKey() { return reqTagKey; } @@ -220,6 +355,8 @@ public void setReqTagKey(String reqTagKey) { } /** + *

Getter for the field reqTagResult.

+ * * @return 0 is the requirement is untested.
* 1 if requirement tested ok
* 2 if the requirement has failed the test. @@ -228,35 +365,71 @@ public Integer getReqTagResult() { return reqTagResult; } + /** + *

Setter for the field reqTagResult.

+ * + * @param reqTagResult a {@link java.lang.Integer} object. + */ public void setReqTagResult(Integer reqTagResult) { this.reqTagResult = reqTagResult; } + /** + *

Getter for the field fullLabelKey.

+ * + * @return a {@link java.lang.String} object. + */ public String getFullLabelKey() { return fullLabelKey; } + /** + *

Setter for the field fullLabelKey.

+ * + * @param fullLabelKey a {@link java.lang.String} object. + */ public void setFullLabelKey(String fullLabelKey) { this.fullLabelKey = fullLabelKey; } + /** + *

Getter for the field labelKey.

+ * + * @return a {@link java.lang.String} object. + */ public String getLabelKey() { return labelKey; } + /** + *

Setter for the field labelKey.

+ * + * @param labelKey a {@link java.lang.String} object. + */ public void setLabelKey(String labelKey) { this.labelKey = labelKey; } + /** {@inheritDoc} */ @Override public String toString() { return Util.getCompleteName(this); } + /** + *

Getter for the field manualInstructions.

+ * + * @return a {@link java.lang.String} object. + */ public String getManualInstructions() { return manualInstructions; } + /** + *

Setter for the field manualInstructions.

+ * + * @param attributeValue a {@link java.lang.String} object. + */ public void setManualInstructions(String attributeValue) { this.manualInstructions = attributeValue; } @@ -266,8 +439,8 @@ public void setManualInstructions(String attributeValue) { * it means that the node will be merged with all other nodes wit the same * name, but not replaced by any subgraphs * - * @param str - * @return + * @param str a {@link java.lang.String} object. + * @return a {@link java.lang.Boolean} object. */ static public Boolean isMerged(String str) { Pattern p = Pattern.compile("\\n(MERGE)", Pattern.MULTILINE); @@ -284,8 +457,8 @@ static public Boolean isMerged(String str) { * graphs, this specific vertex will not be merged or replaced by any * subgraphs * - * @param str - * @return + * @param str a {@link java.lang.String} object. + * @return a {@link java.lang.Boolean} object. */ static public Boolean isNoMerge(String str) { Pattern p = Pattern.compile("\\n(NO_MERGE)", Pattern.MULTILINE); @@ -303,8 +476,8 @@ static public Boolean isNoMerge(String str) { * to mark vertices as BLOCKED due to bugs in the system you test. When the * bug is removed, the BLOCKED tag can be removed. * - * @param str - * @return + * @param str a {@link java.lang.String} object. + * @return a {@link java.lang.Boolean} object. */ static public Boolean isBlocked(String str) { Pattern p = Pattern.compile("\\n(BLOCKED)", Pattern.MULTILINE); @@ -320,8 +493,8 @@ static public Boolean isBlocked(String str) { * If INDEX is defined, find it... If defined, it means that this vertex has * already a unique id generated by mbt before, so we use this instead.. * - * @param str - * @return + * @param str a {@link java.lang.String} object. + * @return a {@link java.lang.Integer} object. */ static public Integer getIndex(String str) { Pattern p = Pattern.compile("\\n(INDEX=(.*))", Pattern.MULTILINE); @@ -337,8 +510,8 @@ static public Integer getIndex(String str) { /** * If the REQTAG is defined, find it... * - * @param str - * @return + * @param str a {@link java.lang.String} object. + * @return a {@link java.lang.String} object. */ static public String getReqTags(String str) { Pattern p = Pattern.compile("\\n(REQTAG=(.*))", Pattern.MULTILINE); @@ -363,14 +536,30 @@ static public String getReqTags(String str) { return ""; } + /** + *

setDesctiptionKey.

+ * + * @param str a {@link java.lang.String} object. + */ public void setDesctiptionKey(String str) { this.descriptionKey = str; } + /** + *

Getter for the field descriptionKey.

+ * + * @return a {@link java.lang.String} object. + */ public String getDescriptionKey() { return this.descriptionKey; } + /** + *

getDescription.

+ * + * @param str a {@link java.lang.String} object. + * @return a {@link java.lang.String} object. + */ public String getDescription(String str) { Pattern p; Matcher m; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java index 77d85d2e..2ce2bd99 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java @@ -31,21 +31,41 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +/** + *

Edge class.

+ * + * @author nilols + * @version $Id: $ + */ public class Edge extends AbstractElement { private String guardKey = ""; private Float weightKey = 0f; + /** + *

Constructor for Edge.

+ */ public Edge() { super(); } + /** + *

Constructor for Edge.

+ * + * @param edge a {@link org.graphwalker.core.graph.Edge} object. + */ public Edge(Edge edge) { super(edge); this.guardKey = edge.guardKey; this.weightKey = edge.weightKey; } + /** + *

Constructor for Edge.

+ * + * @param A a {@link org.graphwalker.core.graph.Edge} object. + * @param B a {@link org.graphwalker.core.graph.Edge} object. + */ public Edge(Edge A, Edge B) { super(A, B); if (A.getFullLabelKey().length() > B.getFullLabelKey().length()) { @@ -57,20 +77,40 @@ public Edge(Edge A, Edge B) { } } + /** + *

Getter for the field weightKey.

+ * + * @return a float. + */ public float getWeightKey() { return weightKey; } + /** + *

Setter for the field weightKey.

+ * + * @param weightKey a float. + */ public void setWeightKey(float weightKey) { if (weightKey < 0 || weightKey > 1) throw new RuntimeException("The value of weight, must be between 0 <= weight <= 1"); this.weightKey = weightKey; } + /** + *

Getter for the field guardKey.

+ * + * @return a {@link java.lang.String} object. + */ public String getGuardKey() { return guardKey; } + /** + *

Setter for the field guardKey.

+ * + * @param guardKey a {@link java.lang.String} object. + */ public void setGuardKey(String guardKey) { this.guardKey = guardKey; } @@ -80,8 +120,8 @@ public void setGuardKey(String guardKey) { * Action1;Action2;ActionN; Keyword Where the Label, Parameter. Guard, Actions * and Keyword are optional. * - * @param str - * @return + * @param str a {@link java.lang.String} object. + * @return an array of {@link java.lang.String} objects. */ static public String[] getGuardAndActions(String str) { Pattern p = Pattern.compile("(.*)", Pattern.MULTILINE); @@ -122,8 +162,8 @@ static public String[] getGuardAndActions(String str) { * Action1;Action2;ActionN; Keyword Where the Label, Parameter. Guard, Actions * and Keyword are optional. * - * @param str - * @return + * @param str a {@link java.lang.String} object. + * @return an array of {@link java.lang.String} objects. */ static public String[] getLabelAndParameter(String str) { Pattern p = Pattern.compile("(.*)", Pattern.MULTILINE); @@ -160,8 +200,8 @@ static public String[] getLabelAndParameter(String str) { * which depicts the probability for the edge to be executed. A value of 0.05 * is the same as 5% chance of going down this road. * - * @param str - * @return + * @param str a {@link java.lang.String} object. + * @return a float. */ static public float getWeight(String str) { Pattern p = Pattern.compile("\\n(weight\\s*=\\s*(.*))", Pattern.MULTILINE); diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java index 13228b60..642885fc 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java @@ -31,6 +31,12 @@ import org.apache.log4j.Logger; import org.graphwalker.core.Util; +/** + *

Graph class.

+ * + * @author nilols + * @version $Id: $ + */ public class Graph extends SparseMultigraph { private static final long serialVersionUID = 4744840850614032582L; @@ -39,22 +45,43 @@ public class Graph extends SparseMultigraph { private String fileKey = ""; private String labelKey = ""; + /** + *

Getter for the field labelKey.

+ * + * @return a {@link java.lang.String} object. + */ public String getLabelKey() { return labelKey; } + /** + *

Setter for the field labelKey.

+ * + * @param labelKey a {@link java.lang.String} object. + */ public void setLabelKey(String labelKey) { this.labelKey = labelKey; } + /** + *

Getter for the field fileKey.

+ * + * @return a {@link java.lang.String} object. + */ public String getFileKey() { return fileKey; } + /** + *

Setter for the field fileKey.

+ * + * @param fileKey a {@link java.lang.String} object. + */ public void setFileKey(String fileKey) { this.fileKey = fileKey; } + /** {@inheritDoc} */ @Override public String toString() { String str = ""; @@ -67,11 +94,18 @@ public String toString() { return str; } + /** {@inheritDoc} */ @Override public boolean addEdge(Edge e, Vertex source, Vertex dest) { return super.addEdge(e, source, dest, EdgeType.DIRECTED); } + /** + *

findVertex.

+ * + * @param vertexName a {@link java.lang.String} object. + * @return a {@link org.graphwalker.core.graph.Vertex} object. + */ public Vertex findVertex(String vertexName) { logger.debug("Looking for vertex: " + vertexName + ", in model: " + this.toString()); for (Vertex vertex : getVertices()) { @@ -84,6 +118,12 @@ public Vertex findVertex(String vertexName) { return null; } + /** + *

findEdge.

+ * + * @param edgeName a {@link java.lang.String} object. + * @return a {@link org.graphwalker.core.graph.Edge} object. + */ public Edge findEdge(String edgeName) { logger.debug("Looking for edge: " + edgeName + ", in model: " + this.toString()); for (Edge edge : getEdges()) { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java index bd9e5d18..7fc6e5e3 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java @@ -35,6 +35,12 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +/** + *

Vertex class.

+ * + * @author nilols + * @version $Id: $ + */ public class Vertex extends AbstractElement { static Logger logger = Util.setupLogger(Vertex.class); @@ -47,42 +53,90 @@ public class Vertex extends AbstractElement { private boolean switchModelKey = false; private boolean graphVertex = false; + /** + *

Getter for the field width.

+ * + * @return a float. + */ public float getWidth() { return width; } + /** + *

Setter for the field width.

+ * + * @param width a float. + */ public void setWidth(float width) { this.width = width; } + /** + *

Getter for the field height.

+ * + * @return a float. + */ public float getHeight() { return height; } + /** + *

Setter for the field height.

+ * + * @param height a float. + */ public void setHeight(float height) { this.height = height; } + /** + *

Setter for the field location.

+ * + * @param location a {@link java.awt.geom.Point2D} object. + */ public void setLocation(Point2D location) { this.location = location; } + /** + *

Getter for the field location.

+ * + * @return a {@link java.awt.geom.Point2D} object. + */ public Point2D getLocation() { return location; } + /** + *

Getter for the field fillColor.

+ * + * @return a {@link java.awt.Color} object. + */ public Color getFillColor() { return fillColor; } + /** + *

Setter for the field fillColor.

+ * + * @param fillColor a {@link java.awt.Color} object. + */ public void setFillColor(Color fillColor) { this.fillColor = fillColor; } + /** + *

Constructor for Vertex.

+ */ public Vertex() { super(); } + /** + *

Constructor for Vertex.

+ * + * @param vertex a {@link org.graphwalker.core.graph.Vertex} object. + */ public Vertex(Vertex vertex) { super(vertex); this.motherStartVertexKey = vertex.motherStartVertexKey; @@ -100,8 +154,8 @@ public Vertex(Vertex vertex) { * can be a point for switching to another model using the same label, see * org.graphwalker.graph.Graph.getLabelKey(). * - * @param str - * @return + * @param str a {@link java.lang.String} object. + * @return a {@link java.lang.Boolean} object. */ static public Boolean isSwitchModel(String str) { Pattern p = Pattern.compile("\\n(SWITCH_MODEL)", Pattern.MULTILINE); @@ -113,25 +167,47 @@ static public Boolean isSwitchModel(String str) { return false; } + /** + *

Getter for the field subGraphStartVertexKey.

+ * + * @return a {@link java.lang.String} object. + */ public String getSubGraphStartVertexKey() { return subGraphStartVertexKey; } + /** + *

Setter for the field subGraphStartVertexKey.

+ * + * @param subGraphStartVertexKey a {@link java.lang.String} object. + */ public void setSubGraphStartVertexKey(String subGraphStartVertexKey) { this.subGraphStartVertexKey = subGraphStartVertexKey; } + /** + *

Getter for the field motherStartVertexKey.

+ * + * @return a {@link java.lang.String} object. + */ public String getMotherStartVertexKey() { return motherStartVertexKey; } + /** + *

Setter for the field motherStartVertexKey.

+ * + * @param motherStartVertexKey a {@link java.lang.String} object. + */ public void setMotherStartVertexKey(String motherStartVertexKey) { this.motherStartVertexKey = motherStartVertexKey; } /** - * @param str - * @return + *

getLabel.

+ * + * @param str a {@link java.lang.String} object. + * @return a {@link java.lang.String} object. */ static public String getLabel(String str) { Pattern p; @@ -160,18 +236,38 @@ static public String getLabel(String str) { return label; } + /** + *

isSwitchModelKey.

+ * + * @return a boolean. + */ public boolean isSwitchModelKey() { return switchModelKey; } + /** + *

Setter for the field switchModelKey.

+ * + * @param switchModel a {@link java.lang.Boolean} object. + */ public void setSwitchModelKey(Boolean switchModel) { this.switchModelKey = switchModel; } + /** + *

isGraphVertex.

+ * + * @return a boolean. + */ public boolean isGraphVertex() { return graphVertex; } + /** + *

Setter for the field graphVertex.

+ * + * @param graphVertex a boolean. + */ public void setGraphVertex(boolean graphVertex) { this.graphVertex = graphVertex; } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java index f20d178c..49e83bde 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java @@ -1,48 +1,75 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.io; - -import org.graphwalker.core.graph.Graph; - -import java.io.PrintStream; - -public abstract class AbstractModelHandler { - - protected Graph graph; - - public abstract void load(String fileName); - - public abstract void save(PrintStream ps, boolean printIndex); - - public Graph getModel() { - return graph; - } - - public void setModel(Graph graph) { - this.graph = graph; - } -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.io; + +import org.graphwalker.core.graph.Graph; + +import java.io.PrintStream; + +/** + *

Abstract AbstractModelHandler class.

+ * + * @author nilols + * @version $Id: $ + */ +public abstract class AbstractModelHandler { + + protected Graph graph; + + /** + *

load.

+ * + * @param fileName a {@link java.lang.String} object. + */ + public abstract void load(String fileName); + + /** + *

save.

+ * + * @param ps a {@link java.io.PrintStream} object. + * @param printIndex a boolean. + */ + public abstract void save(PrintStream ps, boolean printIndex); + + /** + *

getModel.

+ * + * @return a {@link org.graphwalker.core.graph.Graph} object. + */ + public Graph getModel() { + return graph; + } + + /** + *

setModel.

+ * + * @param graph a {@link org.graphwalker.core.graph.Graph} object. + */ + public void setModel(Graph graph) { + this.graph = graph; + } +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java index f78c502d..874db008 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java @@ -61,6 +61,9 @@ * Example: Folder containing several graphml files
* GraphML graphML = new GraphML();
* Graph graph = graphML.load( "/home/user/graphml_folder/" );
+ * + * @author nilols + * @version $Id: $ */ public class GraphML extends AbstractModelHandler { /** @@ -94,10 +97,10 @@ public GraphML() { } /** + * {@inheritDoc} + * * Reads one single graph, or a folder containing several graphs to be merged * into one graph. - * - * @param fileOrfolder The gramphml file or folder. * @see org.graphwalker.core.io.AbstractModelHandler#load(java.lang.String) */ @Override @@ -983,6 +986,8 @@ private void MergeOutEdgeAndInEdge(Edge outEdge, Edge inEdge, Vector edges } /** + * {@inheritDoc} + * * Writes the graph to a PrintStream, using GraphML format. */ @Override diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java index c7bbfb32..ac69b2d2 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java @@ -36,6 +36,12 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +/** + *

ParseLog class.

+ * + * @author nilols + * @version $Id: $ + */ public class ParseLog { public static class LoggedItem { @@ -43,6 +49,13 @@ public static class LoggedItem { public String data = null; } + /** + *

readLog.

+ * + * @param logFile a {@link java.io.File} object. + * @return a {@link java.util.Vector} object. + * @throws java.io.IOException if any. + */ public static Vector readLog(File logFile) throws IOException { Vector list = new Vector(); FileReader reader = null; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java index b344f294..294b6091 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java @@ -29,8 +29,20 @@ import java.io.PrintStream; import java.util.Vector; +/** + *

PrintHTMLTestSequence class.

+ * + * @author nilols + * @version $Id: $ + */ public class PrintHTMLTestSequence { + /** + *

Constructor for PrintHTMLTestSequence.

+ * + * @param testSequence a {@link java.util.Vector} object. + * @param out a {@link java.io.PrintStream} object. + */ public PrintHTMLTestSequence(Vector testSequence, PrintStream out) { writeHTML(testSequence, out); } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java b/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java index 4c692c6f..92915bc6 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java @@ -1,352 +1,396 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.machines; - -import bsh.*; -import org.apache.log4j.Logger; -import org.graphwalker.core.Util; -import org.graphwalker.core.exceptions.FoundNoEdgeException; -import org.graphwalker.core.exceptions.InvalidDataException; -import org.graphwalker.core.filters.AccessableEdgeFilter; -import org.graphwalker.core.graph.Edge; - -import javax.script.*; -import java.io.*; -import java.util.*; -import java.util.Map.Entry; - -public class ExtendedFiniteStateMachine extends FiniteStateMachine { - - private PrintStream Void; - - private static Logger logger = Util.setupLogger(ExtendedFiniteStateMachine.class); - - private Interpreter beanShellEngine = null; - private AccessableEdgeFilter accessableFilter; - - private ScriptEngineManager mgr = null; - private ScriptEngine jsEngine = null; - - private Stack namespaceStack; - - private PrintStream oldPrintStream; - - public ExtendedFiniteStateMachine(boolean usingJsEngine) { - super(); - namespaceStack = new Stack(); - if (usingJsEngine) { - mgr = new ScriptEngineManager(); - jsEngine = mgr.getEngineByExtension("js"); - accessableFilter = new AccessableEdgeFilter(jsEngine); - } else { - beanShellEngine = new Interpreter(); - accessableFilter = new AccessableEdgeFilter(beanShellEngine); - } - Void = new VoidPrintStream(); - } - - public void eval(String script) { - if (jsEngine != null) { - try { - jsEngine.eval(script); - } catch (ScriptException e) { - logger.error("Problem when running: '" + script + "' in BeanShell"); - logger.error("EvalError: " + e); - logger.error(e.getCause()); - throw new RuntimeException("Execution of startup script generated an error.", e); - } - } else if (beanShellEngine != null) { - try { - beanShellEngine.eval(script); - } catch (EvalError e) { - logger.error("Problem when running: '" + script + "' in BeanShell"); - logger.error("EvalError: " + e); - logger.error(e.getCause()); - throw new RuntimeException("Execution of startup script generated an error.", e); - } - } - } - - @Override - public String getCurrentVertexName() { - return super.getCurrentVertexName() + (hasInternalVariables() ? "/" + getCurrentDataString() : ""); - } - - @Override - public Set getCurrentOutEdges() throws FoundNoEdgeException { - Set retur = super.getCurrentOutEdges(); - for (Iterator i = retur.iterator(); i.hasNext(); ) { - Edge e = i.next(); - if (!accessableFilter.acceptEdge(getModel(), e)) { - logger.debug("Not accessable: " + e + " from " + getCurrentVertexName()); - i.remove(); - } else { - logger.debug("Accessable: " + e + " from " + getCurrentVertexName()); - } - } - if (retur.size() == 0) { - throw new FoundNoEdgeException("Cul-De-Sac, dead end found in '" + getCurrentVertex() + "'"); - } - return retur; - } - - @Override - public boolean hasInternalVariables() { - if (jsEngine != null) { - return !jsEngine.getBindings(ScriptContext.ENGINE_SCOPE).isEmpty(); - } else if (beanShellEngine != null) { - return beanShellEngine.getNameSpace().getVariableNames().length > 1; - } - return false; - } - - public Set> getCurrentJsEngineData() { - Bindings bindings = jsEngine.getBindings(ScriptContext.ENGINE_SCOPE); - return bindings.entrySet(); - } - - public Hashtable getCurrentBeanShellData() { - Hashtable retur = new Hashtable(); - if (!hasInternalVariables()) - return retur; - - int i = 0; - NameSpace ns = beanShellEngine.getNameSpace(); - String[] variableNames = beanShellEngine.getNameSpace().getVariableNames(); - try { - for (; i < variableNames.length; i++) { - if (!variableNames[i].equals("bsh")) { - retur.put(variableNames[i], Primitive.unwrap(ns.getVariable(variableNames[i]))); - } - } - } catch (UtilEvalError e) { - throw new RuntimeException("Malformed model data: " + variableNames[i] + "\nBeanShell error message: '" + e.getMessage() + "'"); - } catch (NullPointerException e) { - logger.warn("Did not get data/value for: " + variableNames[i]); - return retur; - } - return retur; - } - - /** - * Walks the data space, and return the value of the data, if found. - * - * @param dataName - * @return - * @throws InvalidDataException is thrown if the data is not found in the data space - */ - public String getDataValue(String dataName) { - if (jsEngine != null) { - return jsEngine.get(dataName).toString(); - } else if (beanShellEngine != null) { - Hashtable dataTable = getCurrentBeanShellData(); - if (dataTable.containsKey(dataName)) { - if (dataTable.get(dataName) instanceof Object[]) { - return Arrays.deepToString((Object[]) dataTable.get(dataName)); - } else { - return dataTable.get(dataName).toString(); - } - } - } - return ""; - } - - /** - * Executes an action, and returns any outcome as a string. - * - * @param action - * @return - * @throws InvalidDataException is thrown if the data is not found in the data space - */ - public String execAction(String action) throws InvalidDataException { - logger.debug("Will try to execute: " + action); - Object res = null; - if (jsEngine != null) { - try { - res = jsEngine.eval(action); - } catch (ScriptException e) { - throw new InvalidDataException("The action: '" + action + "', does not evaluate correctly. Detail: " + e.getMessage()); - } - } else if (beanShellEngine != null) { - try { - res = beanShellEngine.eval(action); - } catch (EvalError e) { - throw new InvalidDataException("The action: '" + action + "', does not evaluate correctly. Detail: " + e.getMessage()); - } - } - return res.toString(); - } - - @Override - public String getCurrentDataString() { - String retur = ""; - - if (jsEngine != null) { - Set> dataTable = getCurrentJsEngineData(); - for (Entry entry : dataTable) { - if (!entry.getKey().equals("println") && !entry.getKey().equals("print") && !entry.getKey().equals("context")) - retur += entry.getKey() + "=" + entry.getValue() + ";"; - } - } else if (beanShellEngine != null) { - Hashtable dataTable = getCurrentBeanShellData(); - Enumeration e = dataTable.keys(); - while (e.hasMoreElements()) { - String key = e.nextElement(); - String data = ""; - if (dataTable.get(key) instanceof Object[]) { - data = Arrays.deepToString((Object[]) dataTable.get(key)); - } else { - data = dataTable.get(key).toString(); - } - retur += key + "=" + data + ";"; - } - } - return retur; - } - - @Override - public boolean walkEdge(Edge edge) { - boolean hasWalkedEdge = super.walkEdge(edge); - if (hasWalkedEdge) { - if (hasAction(edge)) { - PrintStream ps = System.out; - System.setOut(Void); - - if (jsEngine != null) { - try { - jsEngine.eval(getAction(edge)); - } catch (ScriptException e) { - logger.error("Problem when running: '" + getAction(edge) + "' in Java Script engine"); - logger.error("EvalError: " + e); - logger.error(e.getCause()); - throw new RuntimeException("Malformed action sequence\n\t" + edge + "\n\tAction sequence: " + edge.getActionsKey() - + "\n\tJava Script error message: '" + e.getMessage() + "'\nDetails: " + e.getCause()); - } finally { - System.setOut(ps); - } - } else if (beanShellEngine != null) { - try { - beanShellEngine.eval(getAction(edge)); - } catch (EvalError e) { - logger.error("Problem when running: '" + getAction(edge) + "' in BeanShell"); - logger.error("EvalError: " + e); - logger.error(e.getCause()); - throw new RuntimeException("Malformed action sequence\n\t" + edge + "\n\tAction sequence: " + edge.getActionsKey() - + "\n\tBeanShell error message: '" + e.getMessage() + "'\nDetails: " + e.getCause()); - } finally { - System.setOut(ps); - } - } - } - } - return hasWalkedEdge; - } - - private String getAction(Edge edge) { - return (edge == null ? "" : edge.getActionsKey()); - } - - private boolean hasAction(Edge edge) { - return (edge == null ? false : !edge.getActionsKey().isEmpty()); - } - - @Override - protected void track() { - super.track(); - if (jsEngine != null) { - } else if (beanShellEngine != null) { - namespaceStack.push(new CannedNameSpace(beanShellEngine.getNameSpace())); - } - } - - @Override - protected void popVertex() { - super.popVertex(); - if (jsEngine != null) { - } else if (beanShellEngine != null) { - beanShellEngine.setNameSpace((namespaceStack.pop()).unpack()); - } - } - - private class CannedNameSpace { - byte[] store; - - public CannedNameSpace(NameSpace objNameSpace) { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - ObjectOutputStream oos; - try { - oos = new ObjectOutputStream(baos); - oos.writeObject(objNameSpace); - } catch (IOException e) { - throw new RuntimeException("Unable to store backtrack information due to a IOException.", e); - } - store = baos.toByteArray(); - } - - public NameSpace unpack() { - ByteArrayInputStream bais = new ByteArrayInputStream(store); - ObjectInputStream ois; - try { - ois = new ObjectInputStream(bais); - return (NameSpace) ois.readObject(); - } catch (IOException e) { - throw new RuntimeException("Unable to restore backtrack information due to a IOException.", e); - } catch (ClassNotFoundException e) { - throw new RuntimeException("Unable to restore backtrack information as the NameSpace Class could not be found.", e); - } - } - } - - @Override - public void setCalculatingPath(boolean calculatingPath) { - super.setCalculatingPath(calculatingPath); - if (calculatingPath && this.oldPrintStream != System.out) { - this.oldPrintStream = System.out; - System.setOut(new VoidPrintStream()); - } else if (!calculatingPath && this.oldPrintStream != System.out) { - System.setOut(this.oldPrintStream); - } - } - - private class VoidPrintStream extends PrintStream { - public VoidPrintStream() { - super(System.out); - } - - @Override - public void write(byte[] buf, int off, int len) { - } - } - - public boolean isJsEnabled() { - return jsEngine != null; - } - - public boolean isBeanShellEnabled() { - return beanShellEngine != null; - } -} \ No newline at end of file +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.machines; + +import bsh.*; +import org.apache.log4j.Logger; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.FoundNoEdgeException; +import org.graphwalker.core.exceptions.InvalidDataException; +import org.graphwalker.core.filters.AccessableEdgeFilter; +import org.graphwalker.core.graph.Edge; + +import javax.script.*; +import java.io.*; +import java.util.*; +import java.util.Map.Entry; + +/** + *

ExtendedFiniteStateMachine class.

+ * + * @author nilols + * @version $Id: $ + */ +public class ExtendedFiniteStateMachine extends FiniteStateMachine { + + private PrintStream Void; + + private static Logger logger = Util.setupLogger(ExtendedFiniteStateMachine.class); + + private Interpreter beanShellEngine = null; + private AccessableEdgeFilter accessableFilter; + + private ScriptEngineManager mgr = null; + private ScriptEngine jsEngine = null; + + private Stack namespaceStack; + + private PrintStream oldPrintStream; + + /** + *

Constructor for ExtendedFiniteStateMachine.

+ * + * @param usingJsEngine a boolean. + */ + public ExtendedFiniteStateMachine(boolean usingJsEngine) { + super(); + namespaceStack = new Stack(); + if (usingJsEngine) { + mgr = new ScriptEngineManager(); + jsEngine = mgr.getEngineByExtension("js"); + accessableFilter = new AccessableEdgeFilter(jsEngine); + } else { + beanShellEngine = new Interpreter(); + accessableFilter = new AccessableEdgeFilter(beanShellEngine); + } + Void = new VoidPrintStream(); + } + + /** + *

eval.

+ * + * @param script a {@link java.lang.String} object. + */ + public void eval(String script) { + if (jsEngine != null) { + try { + jsEngine.eval(script); + } catch (ScriptException e) { + logger.error("Problem when running: '" + script + "' in BeanShell"); + logger.error("EvalError: " + e); + logger.error(e.getCause()); + throw new RuntimeException("Execution of startup script generated an error.", e); + } + } else if (beanShellEngine != null) { + try { + beanShellEngine.eval(script); + } catch (EvalError e) { + logger.error("Problem when running: '" + script + "' in BeanShell"); + logger.error("EvalError: " + e); + logger.error(e.getCause()); + throw new RuntimeException("Execution of startup script generated an error.", e); + } + } + } + + /** {@inheritDoc} */ + @Override + public String getCurrentVertexName() { + return super.getCurrentVertexName() + (hasInternalVariables() ? "/" + getCurrentDataString() : ""); + } + + /** {@inheritDoc} */ + @Override + public Set getCurrentOutEdges() throws FoundNoEdgeException { + Set retur = super.getCurrentOutEdges(); + for (Iterator i = retur.iterator(); i.hasNext(); ) { + Edge e = i.next(); + if (!accessableFilter.acceptEdge(getModel(), e)) { + logger.debug("Not accessable: " + e + " from " + getCurrentVertexName()); + i.remove(); + } else { + logger.debug("Accessable: " + e + " from " + getCurrentVertexName()); + } + } + if (retur.size() == 0) { + throw new FoundNoEdgeException("Cul-De-Sac, dead end found in '" + getCurrentVertex() + "'"); + } + return retur; + } + + /** {@inheritDoc} */ + @Override + public boolean hasInternalVariables() { + if (jsEngine != null) { + return !jsEngine.getBindings(ScriptContext.ENGINE_SCOPE).isEmpty(); + } else if (beanShellEngine != null) { + return beanShellEngine.getNameSpace().getVariableNames().length > 1; + } + return false; + } + + /** + *

getCurrentJsEngineData.

+ * + * @return a {@link java.util.Set} object. + */ + public Set> getCurrentJsEngineData() { + Bindings bindings = jsEngine.getBindings(ScriptContext.ENGINE_SCOPE); + return bindings.entrySet(); + } + + /** + *

getCurrentBeanShellData.

+ * + * @return a {@link java.util.Hashtable} object. + */ + public Hashtable getCurrentBeanShellData() { + Hashtable retur = new Hashtable(); + if (!hasInternalVariables()) + return retur; + + int i = 0; + NameSpace ns = beanShellEngine.getNameSpace(); + String[] variableNames = beanShellEngine.getNameSpace().getVariableNames(); + try { + for (; i < variableNames.length; i++) { + if (!variableNames[i].equals("bsh")) { + retur.put(variableNames[i], Primitive.unwrap(ns.getVariable(variableNames[i]))); + } + } + } catch (UtilEvalError e) { + throw new RuntimeException("Malformed model data: " + variableNames[i] + "\nBeanShell error message: '" + e.getMessage() + "'"); + } catch (NullPointerException e) { + logger.warn("Did not get data/value for: " + variableNames[i]); + return retur; + } + return retur; + } + + /** + * Walks the data space, and return the value of the data, if found. + * + * @param dataName a {@link java.lang.String} object. + * @throws InvalidDataException is thrown if the data is not found in the data space + * @return a {@link java.lang.String} object. + */ + public String getDataValue(String dataName) { + if (jsEngine != null) { + return jsEngine.get(dataName).toString(); + } else if (beanShellEngine != null) { + Hashtable dataTable = getCurrentBeanShellData(); + if (dataTable.containsKey(dataName)) { + if (dataTable.get(dataName) instanceof Object[]) { + return Arrays.deepToString((Object[]) dataTable.get(dataName)); + } else { + return dataTable.get(dataName).toString(); + } + } + } + return ""; + } + + /** + * Executes an action, and returns any outcome as a string. + * + * @param action a {@link java.lang.String} object. + * @throws org.graphwalker.core.exceptions.InvalidDataException is thrown if the data is not found in the data space + * @return a {@link java.lang.String} object. + */ + public String execAction(String action) throws InvalidDataException { + logger.debug("Will try to execute: " + action); + Object res = null; + if (jsEngine != null) { + try { + res = jsEngine.eval(action); + } catch (ScriptException e) { + throw new InvalidDataException("The action: '" + action + "', does not evaluate correctly. Detail: " + e.getMessage()); + } + } else if (beanShellEngine != null) { + try { + res = beanShellEngine.eval(action); + } catch (EvalError e) { + throw new InvalidDataException("The action: '" + action + "', does not evaluate correctly. Detail: " + e.getMessage()); + } + } + return res.toString(); + } + + /** {@inheritDoc} */ + @Override + public String getCurrentDataString() { + String retur = ""; + + if (jsEngine != null) { + Set> dataTable = getCurrentJsEngineData(); + for (Entry entry : dataTable) { + if (!entry.getKey().equals("println") && !entry.getKey().equals("print") && !entry.getKey().equals("context")) + retur += entry.getKey() + "=" + entry.getValue() + ";"; + } + } else if (beanShellEngine != null) { + Hashtable dataTable = getCurrentBeanShellData(); + Enumeration e = dataTable.keys(); + while (e.hasMoreElements()) { + String key = e.nextElement(); + String data = ""; + if (dataTable.get(key) instanceof Object[]) { + data = Arrays.deepToString((Object[]) dataTable.get(key)); + } else { + data = dataTable.get(key).toString(); + } + retur += key + "=" + data + ";"; + } + } + return retur; + } + + /** {@inheritDoc} */ + @Override + public boolean walkEdge(Edge edge) { + boolean hasWalkedEdge = super.walkEdge(edge); + if (hasWalkedEdge) { + if (hasAction(edge)) { + PrintStream ps = System.out; + System.setOut(Void); + + if (jsEngine != null) { + try { + jsEngine.eval(getAction(edge)); + } catch (ScriptException e) { + logger.error("Problem when running: '" + getAction(edge) + "' in Java Script engine"); + logger.error("EvalError: " + e); + logger.error(e.getCause()); + throw new RuntimeException("Malformed action sequence\n\t" + edge + "\n\tAction sequence: " + edge.getActionsKey() + + "\n\tJava Script error message: '" + e.getMessage() + "'\nDetails: " + e.getCause()); + } finally { + System.setOut(ps); + } + } else if (beanShellEngine != null) { + try { + beanShellEngine.eval(getAction(edge)); + } catch (EvalError e) { + logger.error("Problem when running: '" + getAction(edge) + "' in BeanShell"); + logger.error("EvalError: " + e); + logger.error(e.getCause()); + throw new RuntimeException("Malformed action sequence\n\t" + edge + "\n\tAction sequence: " + edge.getActionsKey() + + "\n\tBeanShell error message: '" + e.getMessage() + "'\nDetails: " + e.getCause()); + } finally { + System.setOut(ps); + } + } + } + } + return hasWalkedEdge; + } + + private String getAction(Edge edge) { + return (edge == null ? "" : edge.getActionsKey()); + } + + private boolean hasAction(Edge edge) { + return (edge == null ? false : !edge.getActionsKey().isEmpty()); + } + + /** {@inheritDoc} */ + @Override + protected void track() { + super.track(); + if (jsEngine != null) { + } else if (beanShellEngine != null) { + namespaceStack.push(new CannedNameSpace(beanShellEngine.getNameSpace())); + } + } + + /** {@inheritDoc} */ + @Override + protected void popVertex() { + super.popVertex(); + if (jsEngine != null) { + } else if (beanShellEngine != null) { + beanShellEngine.setNameSpace((namespaceStack.pop()).unpack()); + } + } + + private class CannedNameSpace { + byte[] store; + + public CannedNameSpace(NameSpace objNameSpace) { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ObjectOutputStream oos; + try { + oos = new ObjectOutputStream(baos); + oos.writeObject(objNameSpace); + } catch (IOException e) { + throw new RuntimeException("Unable to store backtrack information due to a IOException.", e); + } + store = baos.toByteArray(); + } + + public NameSpace unpack() { + ByteArrayInputStream bais = new ByteArrayInputStream(store); + ObjectInputStream ois; + try { + ois = new ObjectInputStream(bais); + return (NameSpace) ois.readObject(); + } catch (IOException e) { + throw new RuntimeException("Unable to restore backtrack information due to a IOException.", e); + } catch (ClassNotFoundException e) { + throw new RuntimeException("Unable to restore backtrack information as the NameSpace Class could not be found.", e); + } + } + } + + /** {@inheritDoc} */ + @Override + public void setCalculatingPath(boolean calculatingPath) { + super.setCalculatingPath(calculatingPath); + if (calculatingPath && this.oldPrintStream != System.out) { + this.oldPrintStream = System.out; + System.setOut(new VoidPrintStream()); + } else if (!calculatingPath && this.oldPrintStream != System.out) { + System.setOut(this.oldPrintStream); + } + } + + private class VoidPrintStream extends PrintStream { + public VoidPrintStream() { + super(System.out); + } + + @Override + public void write(byte[] buf, int off, int len) { + } + } + + /** + *

isJsEnabled.

+ * + * @return a boolean. + */ + public boolean isJsEnabled() { + return jsEngine != null; + } + + /** + *

isBeanShellEnabled.

+ * + * @return a boolean. + */ + public boolean isBeanShellEnabled() { + return beanShellEngine != null; + } +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java b/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java index 4de868fa..b7fe5475 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java @@ -1,679 +1,925 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.machines; - -import org.apache.log4j.Logger; -import org.graphwalker.core.Keywords; -import org.graphwalker.core.Util; -import org.graphwalker.core.exceptions.FoundNoEdgeException; -import org.graphwalker.core.graph.AbstractElement; -import org.graphwalker.core.graph.Edge; -import org.graphwalker.core.graph.Graph; -import org.graphwalker.core.graph.Vertex; - -import java.util.*; -import java.util.Map.Entry; - -/** - * @author Johan Tejle - */ -public class FiniteStateMachine { - - private static Logger logger = Util.setupLogger(FiniteStateMachine.class); - - private Graph model = null; - private Vertex currentVertex = null; - private boolean weighted = false; - private Edge lastEdge = null; - private Stack edgeStack; - private Stack vertexStore; - private int numberOfEdgesTravesed = 0; - private HashMap reqs = new HashMap(); - private boolean calculatingPath = false; - private int numOfCoveredEdges = 0; - private int numOfCoveredVertices = 0; - - private long start_time; - - private Hashtable associatedRequirements; - - public int getNumOfCoveredEdges() { - return numOfCoveredEdges; - } - - public int getNumOfCoveredVertices() { - return numOfCoveredVertices; - } - - public void setVertex(String vertexName) { - logger.debug("Setting vertex to: '" + vertexName + "'"); - Vertex e = model.findVertex(vertexName); - Util.AbortIf(e == null, "Vertex not Found: '" + vertexName + "'"); - - currentVertex = e; - setAsVisited(e); - } - - public AbstractElement findElement(Integer index) { - for (Vertex vertex : model.getVertices()) { - if (vertex.getIndexKey().equals(index)) { - return vertex; - } - } - for (Edge edge : model.getEdges()) { - if (edge.getIndexKey().equals(index)) { - return edge; - } - } - return null; - } - - public boolean hasVertex(String vertexName) { - return model.findVertex(vertexName) != null; - } - - public Edge findEdge(String edgeName) { - for (Edge edge : model.getEdges()) { - if ((edge.getLabelKey()).equals(edgeName)) { - return edge; - } - } - return null; - } - - public FiniteStateMachine() { - logger.debug("Initializing"); - edgeStack = new Stack(); - start_time = System.currentTimeMillis(); - } - - public void setModel(Graph model) { - reset(); - this.model = model; - setVertex(Keywords.START_NODE); - } - - public Vertex getCurrentVertex() { - return currentVertex; - } - - public Vertex getStartVertex() { - for (Vertex vertex : model.getVertices()) { - if (vertex.getLabelKey().equals(Keywords.START_NODE)) { - return vertex; - } - } - return null; - } - - public String getLastEdgeName() { - return lastEdge.getLabelKey(); - } - - public String getCurrentVertexName() { - return currentVertex.getLabelKey(); - } - - public Collection getAllVertices() { - return model.getVertices(); - } - - public Collection getAllEdges() { - return model.getEdges(); - } - - public Collection getAllEdgesExceptStartEdge() { - Vector list = new Vector(model.getEdges()); - Edge e = (Edge) model.getOutEdges(getStartVertex()).toArray()[0]; - list.remove(e); - return list; - } - - public Set getCurrentOutEdges() throws FoundNoEdgeException { - Set retur = new HashSet(model.getOutEdges(currentVertex)); - if (retur.size() == 0) { - throw new FoundNoEdgeException("Cul-De-Sac, dead end found in '" + getCurrentVertex() + "'"); - } - return retur; - } - - public void setAsVisited(AbstractElement e) { - if (e instanceof Edge) { - if (e.getVisitedKey() < 1) { - numOfCoveredEdges++; - } - } else if (e instanceof Vertex) { - if (e.getVisitedKey() < 1) { - numOfCoveredVertices++; - } - } - - e.setVisitedKey(e.getVisitedKey() + 1); - - if (!e.getReqTagKey().isEmpty()) { - Hashtable reqs = getAllRequirements(); - String[] tags = e.getReqTagKey().split(","); - for (String tag : tags) { - reqs.put(tag, reqs.get(tag) + 1); - } - } - } - - public void setAsUnvisited(AbstractElement e) { - Integer visits = e.getVisitedKey(); - e.setVisitedKey(e.getVisitedKey() - 1); - if (e instanceof Edge) { - if (e.getVisitedKey() < 1) { - numOfCoveredEdges--; - } - } else if (e instanceof Vertex) { - if (e.getVisitedKey() < 1) { - numOfCoveredVertices--; - } - } - - if (visits <= 0) - logger.error(e + ", has a negative number in VISITED_KEY"); - - if (!e.getReqTagKey().isEmpty()) { - Hashtable reqs = getAllRequirements(); - String[] tags = e.getReqTagKey().split(","); - for (String tag : tags) { - reqs.put(tag, reqs.get(tag) - 1); - } - } - } - - public void walkPath(Stack path) { - for (Edge edge : path) { - walkEdge(edge); - } - } - - public boolean walkEdge(Edge edge) { - if (model.isSource(currentVertex, edge)) { - lastEdge = edge; - if (isBacktrackPossible()) { - track(); - } - - currentVertex = model.getDest(edge); - setAsVisited(lastEdge); - setAsVisited(currentVertex); - numberOfEdgesTravesed++; - logger.debug("No. of walked edges: " + numberOfEdgesTravesed); - return true; - } else { - logger.error(edge + ", is not the source of: " + currentVertex); - } - return false; - } - - public Edge getLastEdge() { - return lastEdge; - } - - public void setLastEdge(Edge e) { - lastEdge = e; - } - - public String getStatisticsStringCompact() { - int stats[] = getStatistics(); - int e = stats[0]; - int ec = stats[1]; - int v = stats[2]; - int vc = stats[3]; - int len = stats[4]; - int req = stats[5]; - int reqc = stats[6]; - - return (req > 0 ? "RC: " + reqc + "/" + req + " => " + (100 * reqc) / req + "% " : "") + "EC: " + ec + "/" + e + " => " + (100 * ec) - / e + "% " + "SC: " + vc + "/" + v + " => " + (100 * vc) / v + "% " + "L: " + len; - } - - public String getStatisticsString() { - int stats[] = getStatistics(); - int e = stats[0]; - int ec = stats[1]; - int v = stats[2]; - int vc = stats[3]; - int len = stats[4]; - int req = stats[5]; - int reqc = stats[6]; - - String str = ""; - if (e > 0 && v > 0) { - str = "Coverage Edges: " + ec + "/" + e + " => " + (100 * ec) / e + "%\n" + "Coverage Vertices: " + vc + "/" + v + " => " - + (100 * vc) / v + "%\n" + "Unvisited Edges: " + (e - ec) + "\n" + "Unvisited Vertices: " + (v - vc) + "\n" - + "Test sequence length: " + len; - } else if (req > 0) { - str = "Coverage Requirements: " + reqc + "/" + req + " => " + (100 * reqc) / req + "%\n"; - } else { - str = "No statistics available. Probably no run made?"; - } - return str; - } - - public int[] getStatistics() { - Collection e = model.getEdges(); - Collection v = model.getVertices(); - - int[] retur = {e.size(), getEdgeCoverage(e), v.size(), getVertexCoverage(v), numberOfEdgesTravesed, getAllRequirements().size(), - getCoveredRequirements().size()}; - return retur; - } - - public Boolean getValueFromReqs(String key) { - return reqs.get(key); - } - - public void setValueForReq(String key, Boolean b) { - reqs.put(key, b); - } - - /** - * This method returns all requirements and its values as a hashmap - * - * @return reqs hashmap containing requirement name as the key, and - * requirement status as the value - */ - public HashMap getReqs() { - return reqs; - } - - /** - * This method initiates and populates the hashmap reqs, with all requirements - * in the graph. There are two types of requirements: Ordinary and Variable. - * All of them are fetched by calling getReqTagKey for all the edges and - * vertexes in the graph The Ordinary requirements are directly put into the - * reqs hashmap. The Variable requirements are used as a lookup in the list of - * all the variable values returned by getAllVariableValues and the value - * matching the the Variable requirement are splitted with colon and put as - * keys into the reqs hashmap. The value for each entity in the reqs hashmap - * will be set to null, since no requirement are tested yet. Its never needed - * to call this method more than once. - */ - public void populateReqHashMap() { - reqs = new HashMap(); - Hashtable reqsVariables = getAllVariableValues(); - - for (Edge edge : model.getEdges()) { - String reqTag = edge.getReqTagKey(); - if (reqTag.length() == 0) - continue; - String[] tmp = reqTag.split(","); - for (int i = 0; i < tmp.length; i++) { - if (tmp[i].matches("[$][{].*[}]")) { - String[] reqNames = reqsVariables.get(tmp[i].substring(2, tmp[i].length() - 1)).split(":"); - for (String reqVar : reqNames) - this.reqs.put(reqVar, null); - } else - this.reqs.put(tmp[i], null); - } - } - for (Vertex vertex : model.getVertices()) { - String reqTag = vertex.getReqTagKey(); - if (reqTag.length() == 0) - continue; - String[] tmp = reqTag.split(","); - for (int i = 0; i < tmp.length; i++) { - if (tmp[i].matches("[$][{].*[}]")) { - String savedReq = reqsVariables.get(tmp[i].substring(2, tmp[i].length() - 1)); - if (savedReq == null) - continue; - String[] reqNames = savedReq.split(":"); - for (String reqVar : reqNames) - this.reqs.put(reqVar, null); - } else - this.reqs.put(tmp[i], null); - } - } - } - - public String getStatisticsVerbose() { - String retur = ""; - String newLine = "\n"; - Vector notCovered = new Vector(); - - for (Edge edge : model.getEdges()) { - if (edge.getVisitedKey() <= 0) { - notCovered.add("Edge not reached: " + edge + newLine); - } - } - for (Vertex vertex : model.getVertices()) { - if (vertex.getVisitedKey() <= 0) { - notCovered.add("Vertex not reached: " + vertex + newLine); - } - } - if (notCovered.size() > 0) { - Collections.sort(notCovered); - for (String string : notCovered) { - retur += string; - } - } - - Iterator> it = reqs.entrySet().iterator(); - while (it.hasNext()) { - Entry pairs = it.next(); - - if (pairs.getValue() == null) { - retur += "Requirement: " + pairs.getKey() + " is not tested." + newLine; - continue; - } - if (pairs.getValue().booleanValue() == true) { - retur += "Requirement: " + pairs.getKey() + " has passed." + newLine; - continue; - } - if (pairs.getValue().booleanValue() == false) { - retur += "Requirement: " + pairs.getKey() + " has failed." + newLine; - continue; - } - } - - retur += getStatisticsString() + newLine; - retur += "Execution time: " + ((System.currentTimeMillis() - start_time) / 1000) + " seconds"; - return retur; - } - - /** - * This method finds and returns all the strings found in the graph used to - * give a variable its value. Each found string will be splitted with comma - * and the results will be treated as unique values. For example In graph: - * reqtag1 = "REQ1" + ",REQ2," reqtag1 = reqtag1 + "REQ3" reqtag2 = - * "REQ3,REQ4" reqtag3 = "RE" + "Q5," reqtag4 = - * getValueFromExternalFunction("REQ6"); - * - * @return Hashmap with the variable name as key, and a string containing 1 to - * many colon separated values, as the value For example In HashMap - * ({key,value} { reqtag1,"REQ1:REQ2:REQ3" reqtag2,"REQ3:REQ4" - * reqtag3,"RE:Q5" reqtag4,"REQ6" - */ - public Hashtable getAllVariableValues() { - - Hashtable varVal = new Hashtable(); - - Vector abstractElements = new Vector(); - abstractElements.addAll(getAllVertices()); - abstractElements.addAll(getAllEdges()); - - for (AbstractElement abstractElement : abstractElements) { - String actionkey = abstractElement.getActionsKey(); - if (!actionkey.isEmpty()) { - String[] tags = actionkey.split(";"); - for (int j = 0; j < tags.length; j++) { - if (!tags[j].contains("=")) - continue; - String[] variableAndValue = tags[j].split("="); - variableAndValue[0] = variableAndValue[0].replaceAll("[ ]*", ""); - while (variableAndValue[1].contains("\"")) { - - String[] splittedValue = variableAndValue[1].split("\"", 3); - String[] reqs = splittedValue[1].split(","); - for (String s : reqs) { - - if (s.length() == 0) - continue; - // fetching previously stored values for this variable - String tmpVal = varVal.get(variableAndValue[0]); - String newValue; - if (tmpVal == null) { - newValue = s; - } else - newValue = tmpVal + ":" + s; - - varVal.put(variableAndValue[0], newValue); - } - variableAndValue[1] = splittedValue[2]; - } - } - } - } - return varVal; - } - - public boolean isCurrentVertex(Vertex vertex) { - if (getCurrentVertex() != null) - return getCurrentVertex().equals(vertex); - return false; - } - - private int getVertexCoverage(Collection modelItems) { - int unique = 0; - - for (Vertex vertex : modelItems) { - if (vertex.getVisitedKey() > 0) { - unique++; - } - } - return unique; - } - - private int getEdgeCoverage(Collection modelItems) { - int unique = 0; - - for (Edge edge : modelItems) { - if (edge.getVisitedKey() > 0) { - unique++; - } - } - return unique; - } - - public Hashtable getAllRequirements() { - if (associatedRequirements == null) { - associatedRequirements = new Hashtable(); - - Vector abstractElements = new Vector(); - abstractElements.addAll(getAllVertices()); - abstractElements.addAll(getAllEdges()); - - for (AbstractElement abstractElement : abstractElements) { - String reqtags = abstractElement.getReqTagKey(); - if (!reqtags.isEmpty()) { - String[] tags = reqtags.split(","); - for (String tag : tags) { - associatedRequirements.put(tag, 0); - } - } - } - } - return associatedRequirements; - } - - @SuppressWarnings("unchecked") - public Set getCoveredRequirements() { - Vector notCoveredValues = new Vector(); - notCoveredValues.add(0); - Hashtable allRequirements = (Hashtable) getAllRequirements().clone(); - allRequirements.values().removeAll(notCoveredValues); - return allRequirements.keySet(); - } - - public String getEdgeName(Edge edge) { - if (edge.getParameterKey().isEmpty()) { - return edge.getLabelKey(); - } - - return edge.getLabelKey() + " " + edge.getParameterKey(); - } - - public void storeVertex() { - if (this.vertexStore == null) - this.vertexStore = new Stack(); - this.vertexStore.push(edgeStack.size()); - } - - public void restoreVertex() { - if (this.vertexStore == null || this.vertexStore.size() == 0) - throw new RuntimeException("Nothing to restore"); - int prevVertex = this.vertexStore.pop(); - if (prevVertex > edgeStack.size()) - throw new RuntimeException("Cannot restore vertex from backtrack"); - while (prevVertex < edgeStack.size()) { - popVertex(); - } - } - - protected void track() { - edgeStack.push(getLastEdge()); - } - - protected void popVertex() { - setAsUnvisited(getLastEdge()); - setAsUnvisited(getCurrentVertex()); - - edgeStack.pop(); - if (lastEdge == null) { - setVertex(Keywords.START_NODE); - } else { - currentVertex = model.getSource(lastEdge); - } - lastEdge = (edgeStack.size() > 0 ? edgeStack.peek() : null); - numberOfEdgesTravesed--; - } - - /** - * @param weighted if edge weights are to be considered - */ - public void setWeighted(boolean weighted) { - this.weighted = weighted; - } - - /** - * @return true if the edge weights is considered - */ - public boolean isWeighted() { - return weighted; - } - - /** - * @return the number of edges traversed - */ - public int getNumberOfEdgesTravesed() { - return numberOfEdgesTravesed; - } - - public boolean isBacktrackPossible() { - return isCalculatingPath(); - } - - public boolean isCalculatingPath() { - return calculatingPath; - } - - public void setCalculatingPath(boolean calculatingPath) { - this.calculatingPath = calculatingPath; - } - - /** - * This functions returns a list of edges, which has not yet been covered - * - * @return - */ - public Vector getUncoveredEdges() { - Vector retur = new Vector(); - for (Edge edge : getAllEdges()) { - if (edge.getVisitedKey() <= 0) { - retur.add(edge); - } - } - return retur; - } - - /** - * This functions returns a list of edges, which has been covered - * - * @return - */ - public Vector getCoveredEdges() { - Vector retur = new Vector(getAllEdges()); - retur.removeAll(getUncoveredEdges()); - return retur; - } - - public Vector getUncoveredVertices() { - Vector retur = new Vector(); - for (Vertex vertex : getAllVertices()) { - if (vertex.getVisitedKey() <= 0) { - retur.add(vertex); - } - } - return retur; - } - - public Vector getCoveredVertices() { - Vector retur = new Vector(getAllVertices()); - retur.removeAll(getUncoveredVertices()); - return retur; - } - - public Vector getUncoveredElements() { - Vector retur = new Vector(getUncoveredEdges()); - retur.addAll(getUncoveredVertices()); - return retur; - } - - public Vector getCoveredElements() { - Vector retur = new Vector(getCoveredEdges()); - retur.addAll(getCoveredVertices()); - return retur; - } - - public Graph getModel() { - return model; - } - - public String getCurrentDataString() { - return ""; - } - - public boolean hasInternalVariables() { - return false; - } - - private void reset() { - numberOfEdgesTravesed = 0; - calculatingPath = false; - numOfCoveredEdges = 0; - numOfCoveredVertices = 0; - } - - public void setVertex(Vertex vertex) { - currentVertex = vertex; - } - - public void setAllUnvisited() { - logger.debug("setAllUnvisited"); - reset(); - for (Vertex vertex : model.getVertices()) { - vertex.setVisitedKey(0); - } - for (Edge edge : model.getEdges()) { - edge.setVisitedKey(0); - } - } -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.machines; + +import org.apache.log4j.Logger; +import org.graphwalker.core.Keywords; +import org.graphwalker.core.Util; +import org.graphwalker.core.exceptions.FoundNoEdgeException; +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; + +import java.util.*; +import java.util.Map.Entry; + +/** + *

FiniteStateMachine class.

+ * + * @author Johan Tejle + * @version $Id: $ + */ +public class FiniteStateMachine { + + private static Logger logger = Util.setupLogger(FiniteStateMachine.class); + + private Graph model = null; + private Vertex currentVertex = null; + private boolean weighted = false; + private Edge lastEdge = null; + private Stack edgeStack; + private Stack vertexStore; + private int numberOfEdgesTravesed = 0; + private HashMap reqs = new HashMap(); + private boolean calculatingPath = false; + private int numOfCoveredEdges = 0; + private int numOfCoveredVertices = 0; + + private long start_time; + + private Hashtable associatedRequirements; + + /** + *

Getter for the field numOfCoveredEdges.

+ * + * @return a int. + */ + public int getNumOfCoveredEdges() { + return numOfCoveredEdges; + } + + /** + *

Getter for the field numOfCoveredVertices.

+ * + * @return a int. + */ + public int getNumOfCoveredVertices() { + return numOfCoveredVertices; + } + + /** + *

setVertex.

+ * + * @param vertexName a {@link java.lang.String} object. + */ + public void setVertex(String vertexName) { + logger.debug("Setting vertex to: '" + vertexName + "'"); + Vertex e = model.findVertex(vertexName); + Util.AbortIf(e == null, "Vertex not Found: '" + vertexName + "'"); + + currentVertex = e; + setAsVisited(e); + } + + /** + *

findElement.

+ * + * @param index a {@link java.lang.Integer} object. + * @return a {@link org.graphwalker.core.graph.AbstractElement} object. + */ + public AbstractElement findElement(Integer index) { + for (Vertex vertex : model.getVertices()) { + if (vertex.getIndexKey().equals(index)) { + return vertex; + } + } + for (Edge edge : model.getEdges()) { + if (edge.getIndexKey().equals(index)) { + return edge; + } + } + return null; + } + + /** + *

hasVertex.

+ * + * @param vertexName a {@link java.lang.String} object. + * @return a boolean. + */ + public boolean hasVertex(String vertexName) { + return model.findVertex(vertexName) != null; + } + + /** + *

findEdge.

+ * + * @param edgeName a {@link java.lang.String} object. + * @return a {@link org.graphwalker.core.graph.Edge} object. + */ + public Edge findEdge(String edgeName) { + for (Edge edge : model.getEdges()) { + if ((edge.getLabelKey()).equals(edgeName)) { + return edge; + } + } + return null; + } + + /** + *

Constructor for FiniteStateMachine.

+ */ + public FiniteStateMachine() { + logger.debug("Initializing"); + edgeStack = new Stack(); + start_time = System.currentTimeMillis(); + } + + /** + *

Setter for the field model.

+ * + * @param model a {@link org.graphwalker.core.graph.Graph} object. + */ + public void setModel(Graph model) { + reset(); + this.model = model; + setVertex(Keywords.START_NODE); + } + + /** + *

Getter for the field currentVertex.

+ * + * @return a {@link org.graphwalker.core.graph.Vertex} object. + */ + public Vertex getCurrentVertex() { + return currentVertex; + } + + /** + *

getStartVertex.

+ * + * @return a {@link org.graphwalker.core.graph.Vertex} object. + */ + public Vertex getStartVertex() { + for (Vertex vertex : model.getVertices()) { + if (vertex.getLabelKey().equals(Keywords.START_NODE)) { + return vertex; + } + } + return null; + } + + /** + *

getLastEdgeName.

+ * + * @return a {@link java.lang.String} object. + */ + public String getLastEdgeName() { + return lastEdge.getLabelKey(); + } + + /** + *

getCurrentVertexName.

+ * + * @return a {@link java.lang.String} object. + */ + public String getCurrentVertexName() { + return currentVertex.getLabelKey(); + } + + /** + *

getAllVertices.

+ * + * @return a {@link java.util.Collection} object. + */ + public Collection getAllVertices() { + return model.getVertices(); + } + + /** + *

getAllEdges.

+ * + * @return a {@link java.util.Collection} object. + */ + public Collection getAllEdges() { + return model.getEdges(); + } + + /** + *

getAllEdgesExceptStartEdge.

+ * + * @return a {@link java.util.Collection} object. + */ + public Collection getAllEdgesExceptStartEdge() { + Vector list = new Vector(model.getEdges()); + Edge e = (Edge) model.getOutEdges(getStartVertex()).toArray()[0]; + list.remove(e); + return list; + } + + /** + *

getCurrentOutEdges.

+ * + * @return a {@link java.util.Set} object. + * @throws org.graphwalker.core.exceptions.FoundNoEdgeException if any. + */ + public Set getCurrentOutEdges() throws FoundNoEdgeException { + Set retur = new HashSet(model.getOutEdges(currentVertex)); + if (retur.size() == 0) { + throw new FoundNoEdgeException("Cul-De-Sac, dead end found in '" + getCurrentVertex() + "'"); + } + return retur; + } + + /** + *

setAsVisited.

+ * + * @param e a {@link org.graphwalker.core.graph.AbstractElement} object. + */ + public void setAsVisited(AbstractElement e) { + if (e instanceof Edge) { + if (e.getVisitedKey() < 1) { + numOfCoveredEdges++; + } + } else if (e instanceof Vertex) { + if (e.getVisitedKey() < 1) { + numOfCoveredVertices++; + } + } + + e.setVisitedKey(e.getVisitedKey() + 1); + + if (!e.getReqTagKey().isEmpty()) { + Hashtable reqs = getAllRequirements(); + String[] tags = e.getReqTagKey().split(","); + for (String tag : tags) { + reqs.put(tag, reqs.get(tag) + 1); + } + } + } + + /** + *

setAsUnvisited.

+ * + * @param e a {@link org.graphwalker.core.graph.AbstractElement} object. + */ + public void setAsUnvisited(AbstractElement e) { + Integer visits = e.getVisitedKey(); + e.setVisitedKey(e.getVisitedKey() - 1); + if (e instanceof Edge) { + if (e.getVisitedKey() < 1) { + numOfCoveredEdges--; + } + } else if (e instanceof Vertex) { + if (e.getVisitedKey() < 1) { + numOfCoveredVertices--; + } + } + + if (visits <= 0) + logger.error(e + ", has a negative number in VISITED_KEY"); + + if (!e.getReqTagKey().isEmpty()) { + Hashtable reqs = getAllRequirements(); + String[] tags = e.getReqTagKey().split(","); + for (String tag : tags) { + reqs.put(tag, reqs.get(tag) - 1); + } + } + } + + /** + *

walkPath.

+ * + * @param path a {@link java.util.Stack} object. + */ + public void walkPath(Stack path) { + for (Edge edge : path) { + walkEdge(edge); + } + } + + /** + *

walkEdge.

+ * + * @param edge a {@link org.graphwalker.core.graph.Edge} object. + * @return a boolean. + */ + public boolean walkEdge(Edge edge) { + if (model.isSource(currentVertex, edge)) { + lastEdge = edge; + if (isBacktrackPossible()) { + track(); + } + + currentVertex = model.getDest(edge); + setAsVisited(lastEdge); + setAsVisited(currentVertex); + numberOfEdgesTravesed++; + logger.debug("No. of walked edges: " + numberOfEdgesTravesed); + return true; + } else { + logger.error(edge + ", is not the source of: " + currentVertex); + } + return false; + } + + /** + *

Getter for the field lastEdge.

+ * + * @return a {@link org.graphwalker.core.graph.Edge} object. + */ + public Edge getLastEdge() { + return lastEdge; + } + + /** + *

Setter for the field lastEdge.

+ * + * @param e a {@link org.graphwalker.core.graph.Edge} object. + */ + public void setLastEdge(Edge e) { + lastEdge = e; + } + + /** + *

getStatisticsStringCompact.

+ * + * @return a {@link java.lang.String} object. + */ + public String getStatisticsStringCompact() { + int stats[] = getStatistics(); + int e = stats[0]; + int ec = stats[1]; + int v = stats[2]; + int vc = stats[3]; + int len = stats[4]; + int req = stats[5]; + int reqc = stats[6]; + + return (req > 0 ? "RC: " + reqc + "/" + req + " => " + (100 * reqc) / req + "% " : "") + "EC: " + ec + "/" + e + " => " + (100 * ec) + / e + "% " + "SC: " + vc + "/" + v + " => " + (100 * vc) / v + "% " + "L: " + len; + } + + /** + *

getStatisticsString.

+ * + * @return a {@link java.lang.String} object. + */ + public String getStatisticsString() { + int stats[] = getStatistics(); + int e = stats[0]; + int ec = stats[1]; + int v = stats[2]; + int vc = stats[3]; + int len = stats[4]; + int req = stats[5]; + int reqc = stats[6]; + + String str = ""; + if (e > 0 && v > 0) { + str = "Coverage Edges: " + ec + "/" + e + " => " + (100 * ec) / e + "%\n" + "Coverage Vertices: " + vc + "/" + v + " => " + + (100 * vc) / v + "%\n" + "Unvisited Edges: " + (e - ec) + "\n" + "Unvisited Vertices: " + (v - vc) + "\n" + + "Test sequence length: " + len; + } else if (req > 0) { + str = "Coverage Requirements: " + reqc + "/" + req + " => " + (100 * reqc) / req + "%\n"; + } else { + str = "No statistics available. Probably no run made?"; + } + return str; + } + + /** + *

getStatistics.

+ * + * @return an array of int. + */ + public int[] getStatistics() { + Collection e = model.getEdges(); + Collection v = model.getVertices(); + + int[] retur = {e.size(), getEdgeCoverage(e), v.size(), getVertexCoverage(v), numberOfEdgesTravesed, getAllRequirements().size(), + getCoveredRequirements().size()}; + return retur; + } + + /** + *

getValueFromReqs.

+ * + * @param key a {@link java.lang.String} object. + * @return a {@link java.lang.Boolean} object. + */ + public Boolean getValueFromReqs(String key) { + return reqs.get(key); + } + + /** + *

setValueForReq.

+ * + * @param key a {@link java.lang.String} object. + * @param b a {@link java.lang.Boolean} object. + */ + public void setValueForReq(String key, Boolean b) { + reqs.put(key, b); + } + + /** + * This method returns all requirements and its values as a hashmap + * + * @return reqs hashmap containing requirement name as the key, and + * requirement status as the value + */ + public HashMap getReqs() { + return reqs; + } + + /** + * This method initiates and populates the hashmap reqs, with all requirements + * in the graph. There are two types of requirements: Ordinary and Variable. + * All of them are fetched by calling getReqTagKey for all the edges and + * vertexes in the graph The Ordinary requirements are directly put into the + * reqs hashmap. The Variable requirements are used as a lookup in the list of + * all the variable values returned by getAllVariableValues and the value + * matching the the Variable requirement are splitted with colon and put as + * keys into the reqs hashmap. The value for each entity in the reqs hashmap + * will be set to null, since no requirement are tested yet. Its never needed + * to call this method more than once. + */ + public void populateReqHashMap() { + reqs = new HashMap(); + Hashtable reqsVariables = getAllVariableValues(); + + for (Edge edge : model.getEdges()) { + String reqTag = edge.getReqTagKey(); + if (reqTag.length() == 0) + continue; + String[] tmp = reqTag.split(","); + for (int i = 0; i < tmp.length; i++) { + if (tmp[i].matches("[$][{].*[}]")) { + String[] reqNames = reqsVariables.get(tmp[i].substring(2, tmp[i].length() - 1)).split(":"); + for (String reqVar : reqNames) + this.reqs.put(reqVar, null); + } else + this.reqs.put(tmp[i], null); + } + } + for (Vertex vertex : model.getVertices()) { + String reqTag = vertex.getReqTagKey(); + if (reqTag.length() == 0) + continue; + String[] tmp = reqTag.split(","); + for (int i = 0; i < tmp.length; i++) { + if (tmp[i].matches("[$][{].*[}]")) { + String savedReq = reqsVariables.get(tmp[i].substring(2, tmp[i].length() - 1)); + if (savedReq == null) + continue; + String[] reqNames = savedReq.split(":"); + for (String reqVar : reqNames) + this.reqs.put(reqVar, null); + } else + this.reqs.put(tmp[i], null); + } + } + } + + /** + *

getStatisticsVerbose.

+ * + * @return a {@link java.lang.String} object. + */ + public String getStatisticsVerbose() { + String retur = ""; + String newLine = "\n"; + Vector notCovered = new Vector(); + + for (Edge edge : model.getEdges()) { + if (edge.getVisitedKey() <= 0) { + notCovered.add("Edge not reached: " + edge + newLine); + } + } + for (Vertex vertex : model.getVertices()) { + if (vertex.getVisitedKey() <= 0) { + notCovered.add("Vertex not reached: " + vertex + newLine); + } + } + if (notCovered.size() > 0) { + Collections.sort(notCovered); + for (String string : notCovered) { + retur += string; + } + } + + Iterator> it = reqs.entrySet().iterator(); + while (it.hasNext()) { + Entry pairs = it.next(); + + if (pairs.getValue() == null) { + retur += "Requirement: " + pairs.getKey() + " is not tested." + newLine; + continue; + } + if (pairs.getValue().booleanValue() == true) { + retur += "Requirement: " + pairs.getKey() + " has passed." + newLine; + continue; + } + if (pairs.getValue().booleanValue() == false) { + retur += "Requirement: " + pairs.getKey() + " has failed." + newLine; + continue; + } + } + + retur += getStatisticsString() + newLine; + retur += "Execution time: " + ((System.currentTimeMillis() - start_time) / 1000) + " seconds"; + return retur; + } + + /** + * This method finds and returns all the strings found in the graph used to + * give a variable its value. Each found string will be splitted with comma + * and the results will be treated as unique values. For example In graph: + * reqtag1 = "REQ1" + ",REQ2," reqtag1 = reqtag1 + "REQ3" reqtag2 = + * "REQ3,REQ4" reqtag3 = "RE" + "Q5," reqtag4 = + * getValueFromExternalFunction("REQ6"); + * + * @return Hashmap with the variable name as key, and a string containing 1 to + * many colon separated values, as the value For example In HashMap + * ({key,value} { reqtag1,"REQ1:REQ2:REQ3" reqtag2,"REQ3:REQ4" + * reqtag3,"RE:Q5" reqtag4,"REQ6" + */ + public Hashtable getAllVariableValues() { + + Hashtable varVal = new Hashtable(); + + Vector abstractElements = new Vector(); + abstractElements.addAll(getAllVertices()); + abstractElements.addAll(getAllEdges()); + + for (AbstractElement abstractElement : abstractElements) { + String actionkey = abstractElement.getActionsKey(); + if (!actionkey.isEmpty()) { + String[] tags = actionkey.split(";"); + for (int j = 0; j < tags.length; j++) { + if (!tags[j].contains("=")) + continue; + String[] variableAndValue = tags[j].split("="); + variableAndValue[0] = variableAndValue[0].replaceAll("[ ]*", ""); + while (variableAndValue[1].contains("\"")) { + + String[] splittedValue = variableAndValue[1].split("\"", 3); + String[] reqs = splittedValue[1].split(","); + for (String s : reqs) { + + if (s.length() == 0) + continue; + // fetching previously stored values for this variable + String tmpVal = varVal.get(variableAndValue[0]); + String newValue; + if (tmpVal == null) { + newValue = s; + } else + newValue = tmpVal + ":" + s; + + varVal.put(variableAndValue[0], newValue); + } + variableAndValue[1] = splittedValue[2]; + } + } + } + } + return varVal; + } + + /** + *

isCurrentVertex.

+ * + * @param vertex a {@link org.graphwalker.core.graph.Vertex} object. + * @return a boolean. + */ + public boolean isCurrentVertex(Vertex vertex) { + if (getCurrentVertex() != null) + return getCurrentVertex().equals(vertex); + return false; + } + + private int getVertexCoverage(Collection modelItems) { + int unique = 0; + + for (Vertex vertex : modelItems) { + if (vertex.getVisitedKey() > 0) { + unique++; + } + } + return unique; + } + + private int getEdgeCoverage(Collection modelItems) { + int unique = 0; + + for (Edge edge : modelItems) { + if (edge.getVisitedKey() > 0) { + unique++; + } + } + return unique; + } + + /** + *

getAllRequirements.

+ * + * @return a {@link java.util.Hashtable} object. + */ + public Hashtable getAllRequirements() { + if (associatedRequirements == null) { + associatedRequirements = new Hashtable(); + + Vector abstractElements = new Vector(); + abstractElements.addAll(getAllVertices()); + abstractElements.addAll(getAllEdges()); + + for (AbstractElement abstractElement : abstractElements) { + String reqtags = abstractElement.getReqTagKey(); + if (!reqtags.isEmpty()) { + String[] tags = reqtags.split(","); + for (String tag : tags) { + associatedRequirements.put(tag, 0); + } + } + } + } + return associatedRequirements; + } + + /** + *

getCoveredRequirements.

+ * + * @return a {@link java.util.Set} object. + */ + @SuppressWarnings("unchecked") + public Set getCoveredRequirements() { + Vector notCoveredValues = new Vector(); + notCoveredValues.add(0); + Hashtable allRequirements = (Hashtable) getAllRequirements().clone(); + allRequirements.values().removeAll(notCoveredValues); + return allRequirements.keySet(); + } + + /** + *

getEdgeName.

+ * + * @param edge a {@link org.graphwalker.core.graph.Edge} object. + * @return a {@link java.lang.String} object. + */ + public String getEdgeName(Edge edge) { + if (edge.getParameterKey().isEmpty()) { + return edge.getLabelKey(); + } + + return edge.getLabelKey() + " " + edge.getParameterKey(); + } + + /** + *

storeVertex.

+ */ + public void storeVertex() { + if (this.vertexStore == null) + this.vertexStore = new Stack(); + this.vertexStore.push(edgeStack.size()); + } + + /** + *

restoreVertex.

+ */ + public void restoreVertex() { + if (this.vertexStore == null || this.vertexStore.size() == 0) + throw new RuntimeException("Nothing to restore"); + int prevVertex = this.vertexStore.pop(); + if (prevVertex > edgeStack.size()) + throw new RuntimeException("Cannot restore vertex from backtrack"); + while (prevVertex < edgeStack.size()) { + popVertex(); + } + } + + /** + *

track.

+ */ + protected void track() { + edgeStack.push(getLastEdge()); + } + + /** + *

popVertex.

+ */ + protected void popVertex() { + setAsUnvisited(getLastEdge()); + setAsUnvisited(getCurrentVertex()); + + edgeStack.pop(); + if (lastEdge == null) { + setVertex(Keywords.START_NODE); + } else { + currentVertex = model.getSource(lastEdge); + } + lastEdge = (edgeStack.size() > 0 ? edgeStack.peek() : null); + numberOfEdgesTravesed--; + } + + /** + *

Setter for the field weighted.

+ * + * @param weighted if edge weights are to be considered + */ + public void setWeighted(boolean weighted) { + this.weighted = weighted; + } + + /** + *

isWeighted.

+ * + * @return true if the edge weights is considered + */ + public boolean isWeighted() { + return weighted; + } + + /** + *

Getter for the field numberOfEdgesTravesed.

+ * + * @return the number of edges traversed + */ + public int getNumberOfEdgesTravesed() { + return numberOfEdgesTravesed; + } + + /** + *

isBacktrackPossible.

+ * + * @return a boolean. + */ + public boolean isBacktrackPossible() { + return isCalculatingPath(); + } + + /** + *

isCalculatingPath.

+ * + * @return a boolean. + */ + public boolean isCalculatingPath() { + return calculatingPath; + } + + /** + *

Setter for the field calculatingPath.

+ * + * @param calculatingPath a boolean. + */ + public void setCalculatingPath(boolean calculatingPath) { + this.calculatingPath = calculatingPath; + } + + /** + * This functions returns a list of edges, which has not yet been covered + * + * @return a {@link java.util.Vector} object. + */ + public Vector getUncoveredEdges() { + Vector retur = new Vector(); + for (Edge edge : getAllEdges()) { + if (edge.getVisitedKey() <= 0) { + retur.add(edge); + } + } + return retur; + } + + /** + * This functions returns a list of edges, which has been covered + * + * @return a {@link java.util.Vector} object. + */ + public Vector getCoveredEdges() { + Vector retur = new Vector(getAllEdges()); + retur.removeAll(getUncoveredEdges()); + return retur; + } + + /** + *

getUncoveredVertices.

+ * + * @return a {@link java.util.Vector} object. + */ + public Vector getUncoveredVertices() { + Vector retur = new Vector(); + for (Vertex vertex : getAllVertices()) { + if (vertex.getVisitedKey() <= 0) { + retur.add(vertex); + } + } + return retur; + } + + /** + *

getCoveredVertices.

+ * + * @return a {@link java.util.Vector} object. + */ + public Vector getCoveredVertices() { + Vector retur = new Vector(getAllVertices()); + retur.removeAll(getUncoveredVertices()); + return retur; + } + + /** + *

getUncoveredElements.

+ * + * @return a {@link java.util.Vector} object. + */ + public Vector getUncoveredElements() { + Vector retur = new Vector(getUncoveredEdges()); + retur.addAll(getUncoveredVertices()); + return retur; + } + + /** + *

getCoveredElements.

+ * + * @return a {@link java.util.Vector} object. + */ + public Vector getCoveredElements() { + Vector retur = new Vector(getCoveredEdges()); + retur.addAll(getCoveredVertices()); + return retur; + } + + /** + *

Getter for the field model.

+ * + * @return a {@link org.graphwalker.core.graph.Graph} object. + */ + public Graph getModel() { + return model; + } + + /** + *

getCurrentDataString.

+ * + * @return a {@link java.lang.String} object. + */ + public String getCurrentDataString() { + return ""; + } + + /** + *

hasInternalVariables.

+ * + * @return a boolean. + */ + public boolean hasInternalVariables() { + return false; + } + + private void reset() { + numberOfEdgesTravesed = 0; + calculatingPath = false; + numOfCoveredEdges = 0; + numOfCoveredVertices = 0; + } + + /** + *

setVertex.

+ * + * @param vertex a {@link org.graphwalker.core.graph.Vertex} object. + */ + public void setVertex(Vertex vertex) { + currentVertex = vertex; + } + + /** + *

setAllUnvisited.

+ */ + public void setAllUnvisited() { + logger.debug("setAllUnvisited"); + reset(); + for (Vertex vertex : model.getVertices()) { + vertex.setVisitedKey(0); + } + for (Edge edge : model.getEdges()) { + edge.setVisitedKey(0); + } + } +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelAPI.java b/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelAPI.java index bb9ff421..a4120647 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelAPI.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelAPI.java @@ -1,52 +1,73 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ -package org.graphwalker.core.multipleModels; - -import org.graphwalker.core.ModelBasedTesting; -import org.graphwalker.core.generators.PathGenerator; - -/** - * @author krikar Any test should extend this class. - */ -public class ModelAPI { - private ModelBasedTesting mbt = null; - - public ModelAPI(String model, boolean efsm, PathGenerator generator, boolean weight) { - mbt = new ModelBasedTesting(); - mbt.readGraph(model); - mbt.enableExtended(efsm); - mbt.setGenerator(generator); - mbt.setWeighted(weight); - } - - public void setMbt(ModelBasedTesting mbt) { - this.mbt = mbt; - } - - public ModelBasedTesting getMbt() { - return mbt; - } -} \ No newline at end of file +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker.core.multipleModels; + +import org.graphwalker.core.ModelBasedTesting; +import org.graphwalker.core.generators.PathGenerator; + +/** + *

ModelAPI class.

+ * + * @author krikar Any test should extend this class. + * @version $Id: $ + */ +public class ModelAPI { + private ModelBasedTesting mbt = null; + + /** + *

Constructor for ModelAPI.

+ * + * @param model a {@link java.lang.String} object. + * @param efsm a boolean. + * @param generator a {@link org.graphwalker.core.generators.PathGenerator} object. + * @param weight a boolean. + */ + public ModelAPI(String model, boolean efsm, PathGenerator generator, boolean weight) { + mbt = new ModelBasedTesting(); + mbt.readGraph(model); + mbt.enableExtended(efsm); + mbt.setGenerator(generator); + mbt.setWeighted(weight); + } + + /** + *

Setter for the field mbt.

+ * + * @param mbt a {@link org.graphwalker.core.ModelBasedTesting} object. + */ + public void setMbt(ModelBasedTesting mbt) { + this.mbt = mbt; + } + + /** + *

Getter for the field mbt.

+ * + * @return a {@link org.graphwalker.core.ModelBasedTesting} object. + */ + public ModelBasedTesting getMbt() { + return mbt; + } +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelHandler.java b/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelHandler.java index 1de47605..1cff91ab 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelHandler.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelHandler.java @@ -86,6 +86,7 @@ * @author Kristian Karl * @see SWITCH_MODEL * @see GRAPH_VERTEX + * @version $Id: $ */ public class ModelHandler { @@ -142,6 +143,8 @@ public void setExecutionRestarted(boolean executionRestarted) { } /** + *

Getter for the field models.

+ * * @return All models currently loaded. */ public ArrayList getModels() { @@ -154,7 +157,7 @@ public ArrayList getModels() { * @param name The name of the model. This is not the same as the name of the * {@link Graph#getLabelKey() graph}. It's a logical name of the * model, and it may not already be used by the handler. - * @param modelAPI + * @param modelAPI a {@link org.graphwalker.core.multipleModels.ModelAPI} object. */ public synchronized void add(String name, ModelAPI modelAPI) { if (hasModel(name)) { @@ -189,7 +192,7 @@ public void remove(long index) { * stop criteria are reached. * * @param name The logical name of the model which will start the execution. - * @throws InterruptedException + * @throws java.lang.InterruptedException if any. */ public void execute(String name) throws InterruptedException { if (!hasModel(name)) { @@ -359,7 +362,9 @@ private boolean isAnyModelRunning() { * returned. */ /** - * @return + *

isAllModelsDone.

+ * + * @return a boolean. */ public boolean isAllModelsDone() { for (ModelRunnable model : models) { @@ -406,7 +411,7 @@ private void check4Crash(ModelRunnable model) { * Returns the statistics from all models. * * @return The aggregated statistics for all models - * @throws InterruptedException + * @throws java.lang.InterruptedException if any. */ public String getStatistics() throws InterruptedException { StringBuilder statistics = new StringBuilder("Statistics for multiple models"); @@ -417,10 +422,20 @@ public String getStatistics() throws InterruptedException { return statistics.toString(); } + /** + *

Getter for the field currentVertex.

+ * + * @return a {@link java.lang.String} object. + */ public synchronized String getCurrentVertex() { return currentVertex; } + /** + *

Setter for the field currentVertex.

+ * + * @param currentVertex a {@link java.lang.String} object. + */ public synchronized void setCurrentVertex(String currentVertex) { logger.debug("Changing current vertex from: " + this.currentVertex + ", to: " + currentVertex); this.currentVertex = currentVertex; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/AbstractStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/AbstractStatistics.java new file mode 100644 index 00000000..dd54290c --- /dev/null +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/AbstractStatistics.java @@ -0,0 +1,35 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker.core.statistics; + +/** + *

Abstract AbstractStatistics class.

+ * + * @author nilols + * @version $Id: $ + */ +public abstract class AbstractStatistics implements Statistics { +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java index 113f79f7..42678429 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java @@ -1,84 +1,92 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.statistics; - -import org.graphwalker.core.graph.AbstractElement; -import org.graphwalker.core.graph.Edge; -import org.graphwalker.core.graph.Graph; - -import java.util.HashSet; - -/** - * @author Johan Tejle - */ -public class EdgeCoverageStatistics extends Statistics { - - private int max; - private HashSet usedEdges; - - /** - * @param model - */ - public EdgeCoverageStatistics(Graph model) { - max = model.getEdges().size(); - usedEdges = new HashSet(); - } - - /* - * (non-Javadoc) - * - * @see - * org.graphwalker.statistics.Statistics#addProgress(edu.uci.ics.jung.graph - * .impl.AbstractElement) - */ - @Override - public void addProgress(AbstractElement element) { - if (element instanceof Edge) - usedEdges.add(element.toString()); - } - - /* - * (non-Javadoc) - * - * @see org.graphwalker.statistics.Statistics#getCurrent() - */ - @Override - public int getCurrent() { - return usedEdges.size(); - } - - /* - * (non-Javadoc) - * - * @see org.graphwalker.statistics.Statistics#getMax() - */ - @Override - public int getMax() { - return max; - } - -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.statistics; + +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; + +import java.util.HashSet; + +/** + *

EdgeCoverageStatistics class.

+ * + * @author Johan Tejle + * @version $Id: $ + */ +public class EdgeCoverageStatistics extends AbstractStatistics { + + private int max; + private HashSet usedEdges; + + /** + *

Constructor for EdgeCoverageStatistics.

+ * + * @param model a {@link org.graphwalker.core.graph.Graph} object. + */ + public EdgeCoverageStatistics(Graph model) { + max = model.getEdges().size(); + usedEdges = new HashSet(); + } + + /* + * (non-Javadoc) + * + * @see + * org.graphwalker.statistics.Statistics#addProgress(edu.uci.ics.jung.graph + * .impl.AbstractElement) + */ + /** {@inheritDoc} */ + @Override + public void addProgress(AbstractElement element) { + if (element instanceof Edge) + usedEdges.add(element.toString()); + } + + /* + * (non-Javadoc) + * + * @see org.graphwalker.statistics.Statistics#getCurrent() + */ + /** {@inheritDoc} */ + @Override + public int getCurrent() { + return usedEdges.size(); + } + + /* + * (non-Javadoc) + * + * @see org.graphwalker.statistics.Statistics#getMax() + */ + /** {@inheritDoc} */ + @Override + public int getMax() { + return max; + } + +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java index b30f3c76..b1111b3d 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java @@ -1,146 +1,154 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.statistics; - -import org.graphwalker.core.graph.AbstractElement; -import org.graphwalker.core.graph.Edge; -import org.graphwalker.core.graph.Graph; - -import java.util.HashSet; -import java.util.Stack; - -/** - * @author Johan Tejle - */ -public class EdgeSequenceCoverageStatistics extends Statistics { - - private HashSet usedSequences; - private HashSet allSequences; - private Stack pathHistory; - private int length; - - /** - * @param model - * @param sequenceLength - */ - @SuppressWarnings("unchecked") - public EdgeSequenceCoverageStatistics(Graph model, int sequenceLength) { - this.length = sequenceLength; - usedSequences = new HashSet(); - allSequences = new HashSet(); - pathHistory = new Stack(); - - Stack[] possibilities = new Stack[sequenceLength]; - for (int i = 0; i < sequenceLength; i++) { - possibilities[i] = new Stack(); - } - possibilities[0].addAll(model.getEdges()); - while (possibilities[0].size() > 0) { - for (int i = 0; i < sequenceLength - 1; i++) { - if (possibilities[i].size() == 0) - return; - if (possibilities[i + 1].size() == 0) - possibilities[i + 1].addAll(model.getOutEdges(model.getDest(possibilities[i].peek()))); - } - while (possibilities[sequenceLength - 1].size() > 0) { - allSequences.add(getSequenceName(possibilities)); - possibilities[sequenceLength - 1].pop(); - } - for (int i = sequenceLength - 1; i > 0; i--) { - if (possibilities[i].size() == 0) { - possibilities[i - 1].pop(); - } - } - } - } - - /** - * @param possibilities - * @return - */ - private String getSequenceName(Stack[] possibilities) { - StringBuilder stringBuilder = new StringBuilder(); - for (Stack possibility : possibilities) { - stringBuilder.append(possibility.peek().hashCode()); - stringBuilder.append(" "); - } - return stringBuilder.toString().trim(); - } - - /** - * @return - */ - private String getCurrentSequenceName() { - StringBuilder stringBuilder = new StringBuilder(); - for (int i = 0; i < pathHistory.size(); i++) { - stringBuilder.append(pathHistory.elementAt(i).hashCode()); - stringBuilder.append(" "); - } - return stringBuilder.toString().trim(); - } - - /* - * (non-Javadoc) - * - * @see - * org.graphwalker.statistics.Statistics#addProgress(edu.uci.ics.jung.graph - * .impl.AbstractElement) - */ - @Override - public void addProgress(AbstractElement element) { - if (element instanceof Edge) { - pathHistory.add(element); - } - if (pathHistory.size() > this.length) { - pathHistory.remove(0); - } - if (pathHistory.size() == this.length) { - usedSequences.add(getCurrentSequenceName()); - } - } - - /* - * (non-Javadoc) - * - * @see org.graphwalker.statistics.Statistics#getCurrent() - */ - @Override - public int getCurrent() { - return usedSequences.size(); - } - - /* - * (non-Javadoc) - * - * @see org.graphwalker.statistics.Statistics#getMax() - */ - @Override - public int getMax() { - return allSequences.size(); - } - -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.statistics; + +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Edge; +import org.graphwalker.core.graph.Graph; + +import java.util.HashSet; +import java.util.Stack; + +/** + *

EdgeSequenceCoverageStatistics class.

+ * + * @author Johan Tejle + * @version $Id: $ + */ +public class EdgeSequenceCoverageStatistics extends AbstractStatistics { + + private HashSet usedSequences; + private HashSet allSequences; + private Stack pathHistory; + private int length; + + /** + *

Constructor for EdgeSequenceCoverageStatistics.

+ * + * @param model a {@link org.graphwalker.core.graph.Graph} object. + * @param sequenceLength a int. + */ + @SuppressWarnings("unchecked") + public EdgeSequenceCoverageStatistics(Graph model, int sequenceLength) { + this.length = sequenceLength; + usedSequences = new HashSet(); + allSequences = new HashSet(); + pathHistory = new Stack(); + + Stack[] possibilities = new Stack[sequenceLength]; + for (int i = 0; i < sequenceLength; i++) { + possibilities[i] = new Stack(); + } + possibilities[0].addAll(model.getEdges()); + while (possibilities[0].size() > 0) { + for (int i = 0; i < sequenceLength - 1; i++) { + if (possibilities[i].size() == 0) + return; + if (possibilities[i + 1].size() == 0) + possibilities[i + 1].addAll(model.getOutEdges(model.getDest(possibilities[i].peek()))); + } + while (possibilities[sequenceLength - 1].size() > 0) { + allSequences.add(getSequenceName(possibilities)); + possibilities[sequenceLength - 1].pop(); + } + for (int i = sequenceLength - 1; i > 0; i--) { + if (possibilities[i].size() == 0) { + possibilities[i - 1].pop(); + } + } + } + } + + /** + * @param possibilities + * @return + */ + private String getSequenceName(Stack[] possibilities) { + StringBuilder stringBuilder = new StringBuilder(); + for (Stack possibility : possibilities) { + stringBuilder.append(possibility.peek().hashCode()); + stringBuilder.append(" "); + } + return stringBuilder.toString().trim(); + } + + /** + * @return + */ + private String getCurrentSequenceName() { + StringBuilder stringBuilder = new StringBuilder(); + for (int i = 0; i < pathHistory.size(); i++) { + stringBuilder.append(pathHistory.elementAt(i).hashCode()); + stringBuilder.append(" "); + } + return stringBuilder.toString().trim(); + } + + /* + * (non-Javadoc) + * + * @see + * org.graphwalker.statistics.Statistics#addProgress(edu.uci.ics.jung.graph + * .impl.AbstractElement) + */ + /** {@inheritDoc} */ + @Override + public void addProgress(AbstractElement element) { + if (element instanceof Edge) { + pathHistory.add(element); + } + if (pathHistory.size() > this.length) { + pathHistory.remove(0); + } + if (pathHistory.size() == this.length) { + usedSequences.add(getCurrentSequenceName()); + } + } + + /* + * (non-Javadoc) + * + * @see org.graphwalker.statistics.Statistics#getCurrent() + */ + /** {@inheritDoc} */ + @Override + public int getCurrent() { + return usedSequences.size(); + } + + /* + * (non-Javadoc) + * + * @see org.graphwalker.statistics.Statistics#getMax() + */ + /** {@inheritDoc} */ + @Override + public int getMax() { + return allSequences.size(); + } + +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java index eb5e5792..92978ae8 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java @@ -1,100 +1,108 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.statistics; - -import org.graphwalker.core.graph.AbstractElement; -import org.graphwalker.core.graph.Graph; - -import java.util.Collections; -import java.util.HashSet; -import java.util.Vector; - -/** - * @author Johan Tejle - */ -public class RequirementCoverageStatistics extends Statistics { - - private HashSet usedRequirements; - private HashSet allRequirements; - - /** - * @param model - */ - public RequirementCoverageStatistics(Graph model) { - usedRequirements = new HashSet(); - allRequirements = new HashSet(); - - Vector allElements = new Vector(); - allElements.addAll(model.getEdges()); - allElements.addAll(model.getVertices()); - for (AbstractElement e : allElements) { - if (!e.getReqTagKey().isEmpty()) { - appendRequirements(allRequirements, e.getReqTagKey()); - } - } - } - - private void appendRequirements(HashSet set, String requirements) { - String[] tags = requirements.split(","); - Collections.addAll(set, tags); - } - - /* - * (non-Javadoc) - * - * @see - * org.graphwalker.statistics.Statistics#addProgress(edu.uci.ics.jung.graph - * .impl.AbstractElement) - */ - @Override - public void addProgress(AbstractElement element) { - if (element != null && !element.getReqTagKey().isEmpty()) { - appendRequirements(usedRequirements, element.getReqTagKey()); - } - } - - /* - * (non-Javadoc) - * - * @see org.graphwalker.statistics.Statistics#getCurrent() - */ - @Override - public int getCurrent() { - return usedRequirements.size(); - } - - /* - * (non-Javadoc) - * - * @see org.graphwalker.statistics.Statistics#getMax() - */ - @Override - public int getMax() { - return allRequirements.size(); - } - -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.statistics; + +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Graph; + +import java.util.Collections; +import java.util.HashSet; +import java.util.Vector; + +/** + *

RequirementCoverageStatistics class.

+ * + * @author Johan Tejle + * @version $Id: $ + */ +public class RequirementCoverageStatistics extends AbstractStatistics { + + private HashSet usedRequirements; + private HashSet allRequirements; + + /** + *

Constructor for RequirementCoverageStatistics.

+ * + * @param model a {@link org.graphwalker.core.graph.Graph} object. + */ + public RequirementCoverageStatistics(Graph model) { + usedRequirements = new HashSet(); + allRequirements = new HashSet(); + + Vector allElements = new Vector(); + allElements.addAll(model.getEdges()); + allElements.addAll(model.getVertices()); + for (AbstractElement e : allElements) { + if (!e.getReqTagKey().isEmpty()) { + appendRequirements(allRequirements, e.getReqTagKey()); + } + } + } + + private void appendRequirements(HashSet set, String requirements) { + String[] tags = requirements.split(","); + Collections.addAll(set, tags); + } + + /* + * (non-Javadoc) + * + * @see + * org.graphwalker.statistics.Statistics#addProgress(edu.uci.ics.jung.graph + * .impl.AbstractElement) + */ + /** {@inheritDoc} */ + @Override + public void addProgress(AbstractElement element) { + if (element != null && !element.getReqTagKey().isEmpty()) { + appendRequirements(usedRequirements, element.getReqTagKey()); + } + } + + /* + * (non-Javadoc) + * + * @see org.graphwalker.statistics.Statistics#getCurrent() + */ + /** {@inheritDoc} */ + @Override + public int getCurrent() { + return usedRequirements.size(); + } + + /* + * (non-Javadoc) + * + * @see org.graphwalker.statistics.Statistics#getMax() + */ + /** {@inheritDoc} */ + @Override + public int getMax() { + return allRequirements.size(); + } + +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java index b6ff3cb5..74a6e6d7 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java @@ -1,40 +1,59 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.statistics; - -import org.graphwalker.core.graph.AbstractElement; - -/** - * @author Johan Tejle - */ -public abstract class Statistics { - public abstract void addProgress(AbstractElement element); - - public abstract int getCurrent(); - - public abstract int getMax(); -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.statistics; + +import org.graphwalker.core.graph.AbstractElement; + +/** + *

Statistics interface.

+ * + * @author Johan Tejle + * @version $Id: $ + */ +public interface Statistics { + + /** + *

addProgress.

+ * + * @param element a {@link org.graphwalker.core.graph.AbstractElement} object. + */ + void addProgress(AbstractElement element); + + /** + *

getCurrent.

+ * + * @return a int. + */ + int getCurrent(); + + /** + *

getMax.

+ * + * @return a int. + */ + int getMax(); +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java index dfed3448..644a845f 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java @@ -1,85 +1,93 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core.statistics; - -import org.graphwalker.core.graph.AbstractElement; -import org.graphwalker.core.graph.Graph; -import org.graphwalker.core.graph.Vertex; - -import java.util.HashSet; - -/** - * @author Johan Tejle - */ -public class VertexCoverageStatistics extends Statistics { - - private int max; - private HashSet usedVertices; - - /** - * @param model - */ - public VertexCoverageStatistics(Graph model) { - max = model.getVertices().size(); - usedVertices = new HashSet(); - } - - /* - * (non-Javadoc) - * - * @see - * org.graphwalker.statistics.Statistics#addProgress(edu.uci.ics.jung.graph - * .impl.AbstractElement) - */ - @Override - public void addProgress(AbstractElement element) { - if (element instanceof Vertex) { - usedVertices.add(element.toString()); - } - } - - /* - * (non-Javadoc) - * - * @see org.graphwalker.statistics.Statistics#getCurrent() - */ - @Override - public int getCurrent() { - return usedVertices.size(); - } - - /* - * (non-Javadoc) - * - * @see org.graphwalker.statistics.Statistics#getMax() - */ - @Override - public int getMax() { - return max; - } - -} +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +package org.graphwalker.core.statistics; + +import org.graphwalker.core.graph.AbstractElement; +import org.graphwalker.core.graph.Graph; +import org.graphwalker.core.graph.Vertex; + +import java.util.HashSet; + +/** + *

VertexCoverageStatistics class.

+ * + * @author Johan Tejle + * @version $Id: $ + */ +public class VertexCoverageStatistics extends AbstractStatistics { + + private int max; + private HashSet usedVertices; + + /** + *

Constructor for VertexCoverageStatistics.

+ * + * @param model a {@link org.graphwalker.core.graph.Graph} object. + */ + public VertexCoverageStatistics(Graph model) { + max = model.getVertices().size(); + usedVertices = new HashSet(); + } + + /* + * (non-Javadoc) + * + * @see + * org.graphwalker.statistics.Statistics#addProgress(edu.uci.ics.jung.graph + * .impl.AbstractElement) + */ + /** {@inheritDoc} */ + @Override + public void addProgress(AbstractElement element) { + if (element instanceof Vertex) { + usedVertices.add(element.toString()); + } + } + + /* + * (non-Javadoc) + * + * @see org.graphwalker.statistics.Statistics#getCurrent() + */ + /** {@inheritDoc} */ + @Override + public int getCurrent() { + return usedVertices.size(); + } + + /* + * (non-Javadoc) + * + * @see org.graphwalker.statistics.Statistics#getMax() + */ + /** {@inheritDoc} */ + @Override + public int getMax() { + return max; + } + +} diff --git a/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java b/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java index 847b5c57..e37122e9 100644 --- a/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java +++ b/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java @@ -108,6 +108,12 @@ import edu.uci.ics.jung.visualization.renderers.Renderer; import edu.uci.ics.jung.visualization.util.Animator; +/** + *

App class.

+ * + * @author nilols + * @version $Id: $ + */ public class App extends JFrame implements ActionListener, MbtEvent, Application { /** * @@ -154,19 +160,39 @@ public class App extends JFrame implements ActionListener, MbtEvent, Application private Vector parsedLogFile = null; private Integer currentStep = null; + /** + *

Getter for the field status.

+ * + * @return a {@link org.graphwalker.core.Status} object. + */ public Status getStatus() { return status; } + /** + *

Setter for the field status.

+ * + * @param status a {@link org.graphwalker.core.Status} object. + */ public void setStatus(Status status) { this.status = status; setButtons(); } + /** + *

Getter for the field mbt.

+ * + * @return a {@link org.graphwalker.core.ModelBasedTesting} object. + */ public ModelBasedTesting getMbt() { return mbt; } + /** + *

Setter for the field mbt.

+ * + * @param mbt a {@link org.graphwalker.core.ModelBasedTesting} object. + */ public void setMbt(ModelBasedTesting mbt) { this.mbt = mbt; } @@ -258,6 +284,7 @@ private void runSoap() { } } + /** {@inheritDoc} */ @Override public void getNextEvent() { updateUI(); @@ -267,6 +294,7 @@ public void getNextEvent() { } } + /** {@inheritDoc} */ @Override public void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); @@ -351,6 +379,9 @@ private void outPut() { variablesTextArea.setText(str); } + /** + *

setButtons.

+ */ public void setButtons() { if (status.isStopped()) { loadButton.setEnabled(true); @@ -488,6 +519,9 @@ private void reset() { setDefaultCursor(); } + /** + *

run.

+ */ public void run() { status.unsetState(Status.stopped); if (status.isExecutingSoapTest()) { @@ -499,6 +533,7 @@ public void run() { setButtons(); } + /** {@inheritDoc} */ public void executingJavaTest(boolean executingJavaTest) { if (executingJavaTest) { status.setState(Status.executingJavaTest); @@ -544,6 +579,9 @@ private void stop() { setButtons(); } + /** + *

pause.

+ */ public void pause() { status.unsetState(Status.stopped); status.unsetState(Status.running); @@ -674,6 +712,11 @@ private void reload() { loadModel(); } + /** + *

Setter for the field graphLayout.

+ * + * @param graphLayout a {@link edu.uci.ics.jung.algorithms.layout.Layout} object. + */ public void setGraphLayout(Layout graphLayout) { logger.debug("setLayout using: " + graphLayout.toString()); this.graphLayout = graphLayout; @@ -688,6 +731,11 @@ public Point2D transform(Vertex v) { this.graphLayout.setInitializer(vertexLocation); } + /** + *

Getter for the field vv.

+ * + * @return a {@link edu.uci.ics.jung.visualization.VisualizationViewer} object. + */ public VisualizationViewer getVv() { return vv; } @@ -700,6 +748,9 @@ private void setDefaultCursor() { setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } + /** + *

updateLayout.

+ */ public void updateLayout() { if (mbt == null || mbt.getGraph() == null) { return; @@ -1071,15 +1122,28 @@ private static class AppHolder { private static final App INSTANCE = new App(); } + /** + *

getInstance.

+ * + * @return a {@link org.graphwalker.gui.App} object. + */ @SuppressWarnings("synthetic-access") public static App getInstance() { return AppHolder.INSTANCE; } + /** + *

main.

+ */ public static void main() { App.getInstance(); } + /** + *

main.

+ * + * @param args an array of {@link java.lang.String} objects. + */ public static void main(String args[]) { if (args != null && args.length == 1) { App.getInstance().setXmlFile(new File(args[0])); @@ -1090,30 +1154,65 @@ public static void main(String args[]) { App.getInstance(); } + /** + *

Setter for the field latestVertexLabel.

+ * + * @param latestVertexLabel a {@link javax.swing.JLabel} object. + */ public void setLatestVertexLabel(JLabel latestVertexLabel) { this.latestVertexLabel = latestVertexLabel; } + /** + *

Getter for the field latestVertexLabel.

+ * + * @return a {@link javax.swing.JLabel} object. + */ public JLabel getLatestVertexLabel() { return latestVertexLabel; } + /** + *

Getter for the field xmlFile.

+ * + * @return a {@link java.io.File} object. + */ public File getXmlFile() { return xmlFile; } + /** + *

Getter for the field graphLayout.

+ * + * @return a {@link edu.uci.ics.jung.algorithms.layout.Layout} object. + */ public Layout getGraphLayout() { return graphLayout; } + /** + *

Setter for the field xmlFile.

+ * + * @param xmlFile a {@link java.io.File} object. + */ public void setXmlFile(File xmlFile) { this.xmlFile = xmlFile; } + /** + *

Setter for the field graphmlFile.

+ * + * @param graphmlFile a {@link java.io.File} object. + */ public void setGraphmlFile(File graphmlFile) { this.graphmlFile = graphmlFile; } + /** + *

Setter for the field logFile.

+ * + * @param logFile a {@link java.io.File} object. + */ public void setLogFile(File logFile) { this.logFile = logFile; } diff --git a/graphwalker-gui/src/main/java/org/graphwalker/gui/StatusBar.java b/graphwalker-gui/src/main/java/org/graphwalker/gui/StatusBar.java index f7d5082b..fc33b5e4 100644 --- a/graphwalker-gui/src/main/java/org/graphwalker/gui/StatusBar.java +++ b/graphwalker-gui/src/main/java/org/graphwalker/gui/StatusBar.java @@ -30,15 +30,28 @@ import javax.swing.JLabel; +/** + *

StatusBar class.

+ * + * @author nilols + * @version $Id: $ + */ @SuppressWarnings("serial") public class StatusBar extends JLabel { - /** Creates a new instance of StatusBar */ + /** + * Creates a new instance of StatusBar + */ public StatusBar() { super.setPreferredSize(new Dimension(100, 16)); setMessage("Ready"); } + /** + *

setMessage.

+ * + * @param message a {@link java.lang.String} object. + */ public void setMessage(String message) { setText(" " + message); } diff --git a/graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServices.java b/graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServices.java index f298b88c..b5e932dc 100644 --- a/graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServices.java +++ b/graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServices.java @@ -38,6 +38,12 @@ import org.graphwalker.core.exceptions.InvalidDataException; @WebService +/** + *

SoapServices class.

+ * + * @author nilols + * @version $Id: $ + */ public class SoapServices { private static Logger logger = Util.setupLogger(SoapServices.class); @@ -46,14 +52,28 @@ public class SoapServices { private boolean hardStop = false; public ModelBasedTesting mbt; + /** + *

Constructor for SoapServices.

+ */ public SoapServices() { } + /** + *

Constructor for SoapServices.

+ * + * @param mbt a {@link org.graphwalker.core.ModelBasedTesting} object. + */ public SoapServices(ModelBasedTesting mbt) { this.mbt = mbt; Reset(); } + /** + *

SetCurrentVertex.

+ * + * @param newVertex a {@link java.lang.String} object. + * @return a boolean. + */ public boolean SetCurrentVertex(String newVertex) { logger.debug("SOAP service SetCurrentVertex recieving: " + newVertex); boolean value = mbt.setCurrentVertex(newVertex); @@ -61,6 +81,12 @@ public boolean SetCurrentVertex(String newVertex) { return value; } + /** + *

GetDataValue.

+ * + * @param data a {@link java.lang.String} object. + * @return a {@link java.lang.String} object. + */ public String GetDataValue(String data) { logger.debug("SOAP service getDataValue recieving: " + data); String value = ""; @@ -73,6 +99,12 @@ public String GetDataValue(String data) { return value; } + /** + *

ExecAction.

+ * + * @param action a {@link java.lang.String} object. + * @return a {@link java.lang.String} object. + */ public String ExecAction(String action) { logger.debug("SOAP service ExecAction recieving: " + action); String value = ""; @@ -87,6 +119,11 @@ public String ExecAction(String action) { return value; } + /** + *

PassRequirement.

+ * + * @param pass a {@link java.lang.String} object. + */ public void PassRequirement(String pass) { logger.debug("SOAP service PassRequirement recieving: " + pass); if ("TRUE".equalsIgnoreCase(pass)) { @@ -98,6 +135,11 @@ public void PassRequirement(String pass) { } } + /** + *

GetNextStep.

+ * + * @return a {@link java.lang.String} object. + */ public String GetNextStep() { logger.debug("SOAP service getNextStep"); try { @@ -140,6 +182,11 @@ public String GetNextStep() { } } + /** + *

HasNextStep.

+ * + * @return a boolean. + */ public boolean HasNextStep() { logger.debug("SOAP service hasNextStep"); boolean value = false; @@ -155,6 +202,11 @@ public boolean HasNextStep() { return value; } + /** + *

Reload.

+ * + * @return a boolean. + */ public boolean Reload() { logger.debug("SOAP service reload"); boolean retValue = true; @@ -181,6 +233,12 @@ public boolean Reload() { return retValue; } + /** + *

Load.

+ * + * @param xmlFile a {@link java.lang.String} object. + * @return a boolean. + */ public boolean Load(String xmlFile) { logger.debug("SOAP service load recieving: " + xmlFile); if (xmlFile == null) { @@ -216,6 +274,11 @@ public boolean Load(String xmlFile) { return retValue; } + /** + *

GetStatistics.

+ * + * @return a {@link java.lang.String} object. + */ public String GetStatistics() { logger.debug("SOAP service getStatistics"); return mbt.getStatisticsVerbose(); From 094840c1f2e94388ecbbb3a54092a34a673da579 Mon Sep 17 00:00:00 2001 From: Nils Olsson Date: Sun, 20 Nov 2011 22:21:41 +0100 Subject: [PATCH 008/371] Adds UML diagrams to the javadoc files --- graphwalker-parent/pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/graphwalker-parent/pom.xml b/graphwalker-parent/pom.xml index 67036811..0900ad3d 100644 --- a/graphwalker-parent/pom.xml +++ b/graphwalker-parent/pom.xml @@ -234,6 +234,16 @@ org.apache.maven.plugins maven-javadoc-plugin 2.8 + + org.umlgraph.doclet.UmlGraphDoc + + org.umlgraph + doclet + 5.1 + + -views + true + org.codehaus.mojo From a50135381d986848f49cdc4fe7255c9a9141331b Mon Sep 17 00:00:00 2001 From: Nils Olsson Date: Sun, 20 Nov 2011 23:22:55 +0100 Subject: [PATCH 009/371] Configured the javadoc plugin to skip @author, @version and @since tags --- .../main/java/org/graphwalker/cli/CLI.java | 21 ++++++++-- .../org/graphwalker/core/Application.java | 3 -- .../org/graphwalker/core/ClassPathHack.java | 3 -- .../graphwalker/core/EventDrivenModels.java | 3 -- .../org/graphwalker/core/ExtendedMain.java | 3 -- .../java/org/graphwalker/core/Keywords.java | 3 -- .../main/java/org/graphwalker/core/Model.java | 3 -- .../graphwalker/core/ModelBasedTesting.java | 3 -- .../org/graphwalker/core/MultipleModels.java | 41 ++++++++++++++++--- .../graphwalker/core/StatisticsManager.java | 3 -- .../java/org/graphwalker/core/Status.java | 3 -- .../main/java/org/graphwalker/core/Util.java | 3 -- .../conditions/AbstractStopCondition.java | 3 -- .../core/conditions/AlternativeCondition.java | 3 -- .../conditions/CombinationalCondition.java | 3 -- .../core/conditions/EdgeCoverage.java | 3 -- .../core/conditions/NeverCondition.java | 3 -- .../core/conditions/ReachedEdge.java | 3 -- .../core/conditions/ReachedRequirement.java | 3 -- .../core/conditions/ReachedVertex.java | 3 -- .../core/conditions/RequirementCoverage.java | 3 -- .../core/conditions/StopCondition.java | 3 -- .../core/conditions/TestCaseLength.java | 3 -- .../core/conditions/TimeDuration.java | 3 -- .../core/conditions/VertexCoverage.java | 3 -- .../org/graphwalker/core/events/AppEvent.java | 3 -- .../org/graphwalker/core/events/MbtEvent.java | 3 -- .../core/exceptions/FoundNoEdgeException.java | 3 -- .../core/exceptions/GeneratorException.java | 3 -- .../core/exceptions/GuiStoppedExecution.java | 3 -- .../core/exceptions/InvalidDataException.java | 3 -- .../exceptions/StopConditionException.java | 3 -- .../core/filters/AccessableEdgeFilter.java | 3 -- .../core/generators/A_StarPathGenerator.java | 3 -- .../generators/AbstractPathGenerator.java | 3 -- .../AllPathPermutationsGenerator.java | 3 -- .../core/generators/CodeGenerator.java | 3 -- .../generators/CombinedPathGenerator.java | 3 -- .../core/generators/ListGenerator.java | 3 -- .../generators/NonOptimizedShortestPath.java | 3 -- .../core/generators/PathGenerator.java | 3 -- .../core/generators/RandomPathGenerator.java | 3 -- .../generators/RequirementsGenerator.java | 3 -- .../core/graph/AbstractElement.java | 3 -- .../java/org/graphwalker/core/graph/Edge.java | 3 -- .../org/graphwalker/core/graph/Graph.java | 3 -- .../org/graphwalker/core/graph/Vertex.java | 3 -- .../core/io/AbstractModelHandler.java | 3 -- .../java/org/graphwalker/core/io/GraphML.java | 3 -- .../org/graphwalker/core/io/ParseLog.java | 3 -- .../core/io/PrintHTMLTestSequence.java | 3 -- .../machines/ExtendedFiniteStateMachine.java | 3 -- .../core/machines/FiniteStateMachine.java | 3 -- .../core/multipleModels/ModelAPI.java | 3 -- .../core/multipleModels/ModelHandler.java | 5 --- .../core/statistics/AbstractStatistics.java | 3 -- .../statistics/EdgeCoverageStatistics.java | 3 -- .../EdgeSequenceCoverageStatistics.java | 3 -- .../RequirementCoverageStatistics.java | 3 -- .../core/statistics/Statistics.java | 3 -- .../statistics/VertexCoverageStatistics.java | 3 -- .../core/ModelBasedTestingTest.java | 3 -- .../core/StatisticsManagerTest.java | 3 -- .../generators/CombinedPathGeneratorTest.java | 3 -- .../main/java/org/graphwalker/gui/App.java | 3 -- .../java/org/graphwalker/gui/StatusBar.java | 3 -- graphwalker-parent/pom.xml | 3 ++ .../graphwalker/webservice/SoapServices.java | 3 -- 68 files changed, 57 insertions(+), 205 deletions(-) diff --git a/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java b/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java index 4da731d0..11933d67 100644 --- a/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java +++ b/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java @@ -107,9 +107,6 @@ * *

*
- * - * @author nilols - * @version $Id: $ */ public class CLI { @@ -1081,6 +1078,24 @@ private void RunCommandLog(CommandLine cl) throws IOException { App.main(new String[] { cl.getOptionValue("f"), cl.getOptionValue("l") }); } */ + /* + private void RunCommandLog(CommandLine cl) throws IOException { + if (helpNeeded("log", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") + || helpNeeded("log", !cl.hasOption("l"), "Missing the log file. See -l")) + return; + + App.main(new String[] { cl.getOptionValue("f"), cl.getOptionValue("l") }); + } + */ + /* + private void RunCommandLog(CommandLine cl) throws IOException { + if (helpNeeded("log", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") + || helpNeeded("log", !cl.hasOption("l"), "Missing the log file. See -l")) + return; + + App.main(new String[] { cl.getOptionValue("f"), cl.getOptionValue("l") }); + } + */ private boolean helpNeeded(String module, boolean condition, String message) { if (condition) { System.out.println(message); diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Application.java b/graphwalker-core/src/main/java/org/graphwalker/core/Application.java index ea1ca61e..15538e65 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Application.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Application.java @@ -27,9 +27,6 @@ /** *

Application interface.

- * - * @author nilols - * @version $Id: $ */ public interface Application { /** diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java b/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java index bab63712..1cc6fe81 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java @@ -33,9 +33,6 @@ /** *

ClassPathHack class.

- * - * @author nilols - * @version $Id: $ */ public class ClassPathHack { private static final Class[] parameters = new Class[]{URL.class}; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java b/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java index 14905ee7..875c64d0 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java @@ -33,9 +33,6 @@ /** *

EventDrivenModels class.

- * - * @author nilols - * @version $Id: $ */ public class EventDrivenModels { private static Logger logger = Util.setupLogger(EventDrivenModels.class); diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java b/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java index c2853e42..e42860b9 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java @@ -31,9 +31,6 @@ /** *

ExtendedMain class.

- * - * @author Johan Tejle - * @version $Id: $ */ public class ExtendedMain { /** diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java b/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java index 8497cd98..8571950e 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java @@ -36,9 +36,6 @@ * Handles the common constants for the org.graphwalker package. This includes * reserved key words, and text strings used for storing custom data as * UserDatum in graphs, vertices and edges. - * - * @author nilols - * @version $Id: $ */ public class Keywords { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Model.java b/graphwalker-core/src/main/java/org/graphwalker/core/Model.java index 74a8add1..75cf7788 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Model.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Model.java @@ -31,9 +31,6 @@ /** *

Model class.

- * - * @author nilols - * @version $Id: $ */ public class Model implements Observer { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java b/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java index 24a35b00..ab813cd0 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java @@ -64,9 +64,6 @@ /** * The object handles the test case generation, both online and offline. - * - * @author krikar - * @version $Id: $ */ public class ModelBasedTesting { private static Logger logger = Util.setupLogger(ModelBasedTesting.class); diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/MultipleModels.java b/graphwalker-core/src/main/java/org/graphwalker/core/MultipleModels.java index 8eee6e14..c6b969ed 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/MultipleModels.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/MultipleModels.java @@ -34,10 +34,6 @@ * execute them in parallel. This is only usable for running online since * multiple models will be executed at the same time. The method is to add a * model and then execute it when appropriate. - * - * @author Ola Sundin - * @see ModelBasedTesting - * @version $Id: $ */ public class MultipleModels { /** @@ -108,6 +104,42 @@ public ModelBasedTesting getModel(String modelName) { * @param modelName the name of the model * @param modelName the name of the model * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model + * @param modelName the name of the model * @param model the model to be added * @throws java.lang.IllegalArgumentException if the given name has all ready been used. */ @@ -237,7 +269,6 @@ public synchronized String getUniqueName(String desiredName) throws IndexOutOfBo /** * Private class for execution of models in a seperate thread. * - * @author Ola Sundin */ private class ModelThread implements Runnable { private String modelName; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/StatisticsManager.java b/graphwalker-core/src/main/java/org/graphwalker/core/StatisticsManager.java index 6dd72582..11ecdc77 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/StatisticsManager.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/StatisticsManager.java @@ -48,9 +48,6 @@ /** *

StatisticsManager class.

- * - * @author Johan Tejle - * @version $Id: $ */ public class StatisticsManager { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Status.java b/graphwalker-core/src/main/java/org/graphwalker/core/Status.java index 4ded1f23..45e62434 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Status.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Status.java @@ -30,9 +30,6 @@ /** *

Status class.

- * - * @author nilols - * @version $Id: $ */ public class Status { static private Logger log = Util.setupLogger(Status.class); diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Util.java b/graphwalker-core/src/main/java/org/graphwalker/core/Util.java index 59e3646b..c3575609 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Util.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Util.java @@ -57,9 +57,6 @@ * functionality is:
* * Getting names with extra info for vertices and edges
* * Setting up the logger for classes
- * - * @author nilols - * @version $Id: $ */ public class Util { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AbstractStopCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AbstractStopCondition.java index 2699a9cc..677d2952 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AbstractStopCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AbstractStopCondition.java @@ -29,9 +29,6 @@ /** *

Abstract AbstractStopCondition class.

- * - * @author nilols - * @version $Id: $ */ public abstract class AbstractStopCondition implements StopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java index 96e18d1b..f339f386 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java @@ -33,9 +33,6 @@ /** *

AlternativeCondition class.

- * - * @author nilols - * @version $Id: $ */ public class AlternativeCondition extends AbstractStopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java index 87ccc38b..77c8e69e 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java @@ -33,9 +33,6 @@ /** *

CombinationalCondition class.

- * - * @author nilols - * @version $Id: $ */ public class CombinationalCondition extends AbstractStopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java index 8b9699f4..5cf3aefe 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/EdgeCoverage.java @@ -32,9 +32,6 @@ /** *

EdgeCoverage class.

- * - * @author nilols - * @version $Id: $ */ public class EdgeCoverage extends AbstractStopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java index b6c20e7e..e29dc868 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/NeverCondition.java @@ -28,9 +28,6 @@ /** *

NeverCondition class.

- * - * @author nilols - * @version $Id: $ */ public class NeverCondition extends AbstractStopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java index 052f2bfb..ee7b7f0d 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedEdge.java @@ -33,9 +33,6 @@ /** *

ReachedEdge class.

- * - * @author nilols - * @version $Id: $ */ public class ReachedEdge extends AbstractStopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java index 7f77447c..8262e013 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java @@ -32,9 +32,6 @@ /** *

ReachedRequirement class.

- * - * @author nilols - * @version $Id: $ */ public class ReachedRequirement extends AbstractStopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java index cbb34887..3f625717 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedVertex.java @@ -38,9 +38,6 @@ /** *

ReachedVertex class.

- * - * @author nilols - * @version $Id: $ */ public class ReachedVertex extends AbstractStopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java index 937e101f..c89b9676 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java @@ -30,9 +30,6 @@ /** *

RequirementCoverage class.

- * - * @author nilols - * @version $Id: $ */ public class RequirementCoverage extends AbstractStopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java index f3a0845b..9c7b8520 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopCondition.java @@ -30,9 +30,6 @@ /** *

StopCondition interface.

- * - * @author nilols - * @version $Id: $ */ public interface StopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java index e1d9fc0c..e913ae9f 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TestCaseLength.java @@ -28,9 +28,6 @@ /** *

TestCaseLength class.

- * - * @author nilols - * @version $Id: $ */ public class TestCaseLength extends AbstractStopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java index 6d84344d..2ba74d24 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/TimeDuration.java @@ -28,9 +28,6 @@ /** * Stops test execution after a certain amount of time has passed. - * - * @author Johan Tejle - * @version $Id: $ */ public class TimeDuration extends AbstractStopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java index 6b7741e6..30ad13a6 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/conditions/VertexCoverage.java @@ -30,9 +30,6 @@ /** *

VertexCoverage class.

- * - * @author nilols - * @version $Id: $ */ public class VertexCoverage extends AbstractStopCondition { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java b/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java index 265447ca..0bb967a0 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java @@ -28,9 +28,6 @@ /** *

AppEvent interface.

- * - * @author nilols - * @version $Id: $ */ public interface AppEvent { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java b/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java index 003b1b4d..72769266 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/events/MbtEvent.java @@ -28,9 +28,6 @@ /** *

MbtEvent interface.

- * - * @author nilols - * @version $Id: $ */ public interface MbtEvent { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java index ec2c94ee..afa7b693 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java @@ -30,9 +30,6 @@ * This exception is thrown during test sequence generation, when no out edge is * found from a given vertex. This could be due to a cul-de-sac, which may or * may not be perfectly all right. - * - * @author nilols - * @version $Id: $ */ public class FoundNoEdgeException extends Exception { /** diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java index 68cd8a19..5270b149 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java @@ -28,9 +28,6 @@ /** *

GeneratorException class.

- * - * @author nilols - * @version $Id: $ */ public class GeneratorException extends Exception { private static final long serialVersionUID = -6355062559015580205L; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java index f25e8726..6aa2ac9a 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GuiStoppedExecution.java @@ -28,9 +28,6 @@ /** * This exception indicats to MBT that GUI wants to stop execution of MBT - * - * @author nilols - * @version $Id: $ */ public class GuiStoppedExecution extends RuntimeException { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java index d5535488..6fbcafde 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/InvalidDataException.java @@ -29,9 +29,6 @@ /** * This exception should be used whenever data extraction from the data space * from a EFSM machine fails. - * - * @author nilols - * @version $Id: $ */ public class InvalidDataException extends Exception { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java index b2d17cab..5b0597b0 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/StopConditionException.java @@ -29,9 +29,6 @@ /** * This exception should be used whenever there is something wrong with the stop * condition. - * - * @author nilols - * @version $Id: $ */ public class StopConditionException extends Exception { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java b/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java index 551ef2e2..2cdffca5 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java @@ -35,9 +35,6 @@ /** *

AccessableEdgeFilter class.

- * - * @author Johan Tejle - * @version $Id: $ */ public class AccessableEdgeFilter { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java index 4e1a904a..f872d8cf 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java @@ -37,9 +37,6 @@ /** *

A_StarPathGenerator class.

- * - * @author nilols - * @version $Id: $ */ public class A_StarPathGenerator extends AbstractPathGenerator { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/AbstractPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/AbstractPathGenerator.java index d21aabd0..6124502a 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/AbstractPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/AbstractPathGenerator.java @@ -34,9 +34,6 @@ /** *

Abstract AbstractPathGenerator class.

- * - * @author nilols - * @version $Id: $ */ public abstract class AbstractPathGenerator implements PathGenerator { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java index ef5a9bf8..1ebf748e 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java @@ -48,9 +48,6 @@ * The algorithm always tries the "path less traveled" where a path is a list of * n edges. If several paths are available with the same number of traversals on * is chosen by random. - * - * @author nilols - * @version $Id: $ */ public class AllPathPermutationsGenerator extends AbstractPathGenerator { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java index 1d1029f8..1df9de69 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java @@ -51,9 +51,6 @@ * throw new RuntimeException( "Not implemented" ); * } * - * - * @author nilols - * @version $Id: $ */ public class CodeGenerator extends ListGenerator { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java index 1be8974b..504078e6 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java @@ -34,9 +34,6 @@ /** *

CombinedPathGenerator class.

- * - * @author nilols - * @version $Id: $ */ public class CombinedPathGenerator extends AbstractPathGenerator { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java index 452aaf14..00c00d05 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java @@ -38,9 +38,6 @@ /** *

ListGenerator class.

- * - * @author nilols - * @version $Id: $ */ public class ListGenerator extends AbstractPathGenerator { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java index d0ce7b44..88968c0e 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java @@ -38,9 +38,6 @@ /** *

NonOptimizedShortestPath class.

- * - * @author nilols - * @version $Id: $ */ public class NonOptimizedShortestPath extends RandomPathGenerator { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java index f341ede9..6a0183c3 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGenerator.java @@ -32,9 +32,6 @@ /** *

PathGenerator interface.

- * - * @author nilols - * @version $Id: $ */ public interface PathGenerator { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java index 9c9bdbb4..566cde7a 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java @@ -39,9 +39,6 @@ /** *

RandomPathGenerator class.

- * - * @author nilols - * @version $Id: $ */ public class RandomPathGenerator extends AbstractPathGenerator { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java index 4ad61e9e..3332c051 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java @@ -33,9 +33,6 @@ /** *

RequirementsGenerator class.

- * - * @author nilols - * @version $Id: $ */ public class RequirementsGenerator extends AbstractPathGenerator { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java index 2fb8b9f6..ce5bf38c 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java @@ -35,9 +35,6 @@ /** *

AbstractElement class.

- * - * @author nilols - * @version $Id: $ */ public class AbstractElement { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java index 2ce2bd99..8c5fb98b 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java @@ -33,9 +33,6 @@ /** *

Edge class.

- * - * @author nilols - * @version $Id: $ */ public class Edge extends AbstractElement { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java index 642885fc..e088ab97 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java @@ -33,9 +33,6 @@ /** *

Graph class.

- * - * @author nilols - * @version $Id: $ */ public class Graph extends SparseMultigraph { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java index 7fc6e5e3..0050be8e 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java @@ -37,9 +37,6 @@ /** *

Vertex class.

- * - * @author nilols - * @version $Id: $ */ public class Vertex extends AbstractElement { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java index 49e83bde..d23ac698 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/AbstractModelHandler.java @@ -32,9 +32,6 @@ /** *

Abstract AbstractModelHandler class.

- * - * @author nilols - * @version $Id: $ */ public abstract class AbstractModelHandler { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java index 874db008..d3010d7f 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java @@ -61,9 +61,6 @@ * Example: Folder containing several graphml files
* GraphML graphML = new GraphML();
* Graph graph = graphML.load( "/home/user/graphml_folder/" );
- * - * @author nilols - * @version $Id: $ */ public class GraphML extends AbstractModelHandler { /** diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java index ac69b2d2..8c40c437 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java @@ -38,9 +38,6 @@ /** *

ParseLog class.

- * - * @author nilols - * @version $Id: $ */ public class ParseLog { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java b/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java index 294b6091..6080ccde 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java @@ -31,9 +31,6 @@ /** *

PrintHTMLTestSequence class.

- * - * @author nilols - * @version $Id: $ */ public class PrintHTMLTestSequence { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java b/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java index 92915bc6..b14f75df 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java @@ -41,9 +41,6 @@ /** *

ExtendedFiniteStateMachine class.

- * - * @author nilols - * @version $Id: $ */ public class ExtendedFiniteStateMachine extends FiniteStateMachine { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java b/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java index b7fe5475..c45a8d8e 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java @@ -40,9 +40,6 @@ /** *

FiniteStateMachine class.

- * - * @author Johan Tejle - * @version $Id: $ */ public class FiniteStateMachine { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelAPI.java b/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelAPI.java index a4120647..3e77b446 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelAPI.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelAPI.java @@ -30,9 +30,6 @@ /** *

ModelAPI class.

- * - * @author krikar Any test should extend this class. - * @version $Id: $ */ public class ModelAPI { private ModelBasedTesting mbt = null; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelHandler.java b/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelHandler.java index 1cff91ab..7efab8dd 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelHandler.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelHandler.java @@ -82,11 +82,6 @@ * the current paused model can be resumed. *

* The executions ends when all models has reached their stop criteria. - * - * @author Kristian Karl - * @see SWITCH_MODEL - * @see GRAPH_VERTEX - * @version $Id: $ */ public class ModelHandler { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/AbstractStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/AbstractStatistics.java index dd54290c..7a70dffe 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/AbstractStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/AbstractStatistics.java @@ -27,9 +27,6 @@ /** *

Abstract AbstractStatistics class.

- * - * @author nilols - * @version $Id: $ */ public abstract class AbstractStatistics implements Statistics { } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java index 42678429..606a5279 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java @@ -34,9 +34,6 @@ /** *

EdgeCoverageStatistics class.

- * - * @author Johan Tejle - * @version $Id: $ */ public class EdgeCoverageStatistics extends AbstractStatistics { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java index b1111b3d..62d7d5c3 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java @@ -35,9 +35,6 @@ /** *

EdgeSequenceCoverageStatistics class.

- * - * @author Johan Tejle - * @version $Id: $ */ public class EdgeSequenceCoverageStatistics extends AbstractStatistics { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java index 92978ae8..166fc8a5 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java @@ -35,9 +35,6 @@ /** *

RequirementCoverageStatistics class.

- * - * @author Johan Tejle - * @version $Id: $ */ public class RequirementCoverageStatistics extends AbstractStatistics { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java index 74a6e6d7..7735e1b0 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/Statistics.java @@ -30,9 +30,6 @@ /** *

Statistics interface.

- * - * @author Johan Tejle - * @version $Id: $ */ public interface Statistics { diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java index 644a845f..8703e7f8 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java @@ -34,9 +34,6 @@ /** *

VertexCoverageStatistics class.

- * - * @author Johan Tejle - * @version $Id: $ */ public class VertexCoverageStatistics extends AbstractStatistics { diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/ModelBasedTestingTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/ModelBasedTestingTest.java index 25f6c210..37656d16 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/ModelBasedTestingTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/ModelBasedTestingTest.java @@ -38,9 +38,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -/** - * @author Johan Tejle - */ public class ModelBasedTestingTest extends TestCase { @Override diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/StatisticsManagerTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/StatisticsManagerTest.java index 69f3ef35..68e06f0a 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/StatisticsManagerTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/StatisticsManagerTest.java @@ -38,9 +38,6 @@ import java.io.ByteArrayOutputStream; import java.io.PrintStream; -/** - * @author Johan Tejle - */ public class StatisticsManagerTest extends TestCase { Graph graph; diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/generators/CombinedPathGeneratorTest.java b/graphwalker-core/src/test/java/org/graphwalker/core/generators/CombinedPathGeneratorTest.java index 8b042ab1..cabac2d3 100644 --- a/graphwalker-core/src/test/java/org/graphwalker/core/generators/CombinedPathGeneratorTest.java +++ b/graphwalker-core/src/test/java/org/graphwalker/core/generators/CombinedPathGeneratorTest.java @@ -35,9 +35,6 @@ import org.graphwalker.core.graph.Vertex; import org.graphwalker.core.machines.FiniteStateMachine; -/** - * @author Johan Tejle - */ public class CombinedPathGeneratorTest extends TestCase { Graph graph; diff --git a/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java b/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java index e37122e9..b7de8a0b 100644 --- a/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java +++ b/graphwalker-gui/src/main/java/org/graphwalker/gui/App.java @@ -110,9 +110,6 @@ /** *

App class.

- * - * @author nilols - * @version $Id: $ */ public class App extends JFrame implements ActionListener, MbtEvent, Application { /** diff --git a/graphwalker-gui/src/main/java/org/graphwalker/gui/StatusBar.java b/graphwalker-gui/src/main/java/org/graphwalker/gui/StatusBar.java index fc33b5e4..1cc1682b 100644 --- a/graphwalker-gui/src/main/java/org/graphwalker/gui/StatusBar.java +++ b/graphwalker-gui/src/main/java/org/graphwalker/gui/StatusBar.java @@ -32,9 +32,6 @@ /** *

StatusBar class.

- * - * @author nilols - * @version $Id: $ */ @SuppressWarnings("serial") public class StatusBar extends JLabel { diff --git a/graphwalker-parent/pom.xml b/graphwalker-parent/pom.xml index 0900ad3d..c7b5a915 100644 --- a/graphwalker-parent/pom.xml +++ b/graphwalker-parent/pom.xml @@ -201,6 +201,9 @@ + + param,return,throws +
org.codehaus.mojo diff --git a/graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServices.java b/graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServices.java index b5e932dc..992b8c83 100644 --- a/graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServices.java +++ b/graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServices.java @@ -40,9 +40,6 @@ @WebService /** *

SoapServices class.

- * - * @author nilols - * @version $Id: $ */ public class SoapServices { From 4a7ab8aba3ea8d32a0569115eda42352543e860b Mon Sep 17 00:00:00 2001 From: Nils Olsson Date: Sun, 20 Nov 2011 23:38:20 +0100 Subject: [PATCH 010/371] Moved test class to the test source folder --- .../src/test/resources/xml/javaExecutor.xml | 16 +- .../org/graphwalker/core/ExtendedMain.java | 161 ------------------ .../org/graphwalker/core/MultipleModels.java | 41 ----- 3 files changed, 8 insertions(+), 210 deletions(-) delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java diff --git a/graphwalker-cli/src/test/resources/xml/javaExecutor.xml b/graphwalker-cli/src/test/resources/xml/javaExecutor.xml index f3453e0e..5c07a7b9 100644 --- a/graphwalker-cli/src/test/resources/xml/javaExecutor.xml +++ b/graphwalker-cli/src/test/resources/xml/javaExecutor.xml @@ -24,11 +24,11 @@ THE SOFTWARE. #L% --> - - - - - - - - + + + + + + + + diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java b/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java deleted file mode 100644 index e42860b9..00000000 --- a/graphwalker-core/src/main/java/org/graphwalker/core/ExtendedMain.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -/** - * - */ -package org.graphwalker.core; - -/** - *

ExtendedMain class.

- */ -public class ExtendedMain { - /** - * This method implements the Edge 'e_Cancel' - */ - public void e_Cancel() { - System.out.println("Edge: e_Cancel"); - } - - /** - * This method implements the Edge 'e_ChangeDatabase' - */ - public void e_ChangeDatabase() { - System.out.println("Edge: e_ChangeDatabase"); - } - - /** - * This method implements the Edge 'e_CloseApp' - */ - public void e_CloseApp() { - System.out.println("Edge: e_CloseApp"); - } - - /** - * This method implements the Edge 'e_CloseDB' - */ - public void e_CloseDB() { - System.out.println("Edge: e_CloseDB"); - } - - /** - * This method implements the Edge 'e_CloseDialog' - */ - public void e_CloseDialog() { - System.out.println("Edge: e_CloseDialog"); - } - - /** - * This method implements the Edge 'e_EnterCorrectKey' - */ - public void e_EnterCorrectKey() { - System.out.println("Edge: e_EnterCorrectKey"); - } - - /** - * This method implements the Edge 'e_EnterInvalidKey' - */ - public void e_EnterInvalidKey() { - System.out.println("Edge: e_EnterInvalidKey"); - } - - /** - * This method implements the Edge 'e_Initialize' - */ - public void e_Initialize() { - System.out.println("Edge: e_Initialize"); - } - - /** - * This method implements the Edge 'e_No' - */ - public void e_No() { - System.out.println("Edge: e_No"); - } - - /** - * This method implements the Edge 'e_Start' - */ - public void e_Start() { - System.out.println("Edge: e_Start"); - } - - /** - * This method implements the Edge 'e_StartWithDatabase' - */ - public void e_StartWithDatabase() { - System.out.println("Edge: e_StartWithDatabase"); - } - - /** - * This method implements the Edge 'e_Yes' - */ - public void e_Yes() { - System.out.println("Edge: e_Yes"); - } - - /** - * This method implements the Vertex 'v_EnterMasterCompositeMasterKey' - */ - public void v_EnterMasterCompositeMasterKey() { - System.out.println("Vertex: v_EnterMasterCompositeMasterKey"); - } - - /** - * This method implements the Vertex 'v_InvalidKey' - */ - public void v_InvalidKey() { - System.out.println("Vertex: v_InvalidKey"); - } - - /** - * This method implements the Vertex 'v_KeePassNotRunning' - */ - public void v_KeePassNotRunning() { - System.out.println("Vertex: v_KeePassNotRunning"); - } - - /** - * This method implements the Vertex 'v_MainWindowEmpty' - */ - public void v_MainWindowEmpty() { - System.out.println("Vertex: v_MainWindowEmpty"); - } - - /** - * This method implements the Vertex 'v_MainWindow_DB_Loaded' - */ - public void v_MainWindow_DB_Loaded() { - System.out.println("Vertex: v_MainWindow_DB_Loaded"); - } - - /** - * This method implements the Vertex 'v_SaveBeforeCloseLock' - */ - public void v_SaveBeforeCloseLock() { - System.out.println("Vertex: v_SaveBeforeCloseLock"); - } -} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/MultipleModels.java b/graphwalker-core/src/main/java/org/graphwalker/core/MultipleModels.java index c6b969ed..351946bb 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/MultipleModels.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/MultipleModels.java @@ -99,47 +99,6 @@ public ModelBasedTesting getModel(String modelName) { * model name use the helper function {@link #getUniqueName(String)}. * * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model - * @param modelName the name of the model * @param model the model to be added * @throws java.lang.IllegalArgumentException if the given name has all ready been used. */ From d5f97ee36afaf0d7f2048a018ce25fbead320f7e Mon Sep 17 00:00:00 2001 From: Nils Olsson Date: Sun, 20 Nov 2011 23:39:08 +0100 Subject: [PATCH 011/371] Moved test class to the test source folder --- .../org/graphwalker/cli/ExtendedMain.java | 161 ++++++++++++++++++ .../org/graphwalker/core/ExtendedMain.java | 161 ++++++++++++++++++ 2 files changed, 322 insertions(+) create mode 100644 graphwalker-cli/src/test/java/org/graphwalker/cli/ExtendedMain.java create mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/ExtendedMain.java diff --git a/graphwalker-cli/src/test/java/org/graphwalker/cli/ExtendedMain.java b/graphwalker-cli/src/test/java/org/graphwalker/cli/ExtendedMain.java new file mode 100644 index 00000000..df791ff2 --- /dev/null +++ b/graphwalker-cli/src/test/java/org/graphwalker/cli/ExtendedMain.java @@ -0,0 +1,161 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +/** + * + */ +package org.graphwalker.cli; + +/** + *

ExtendedMain class.

+ */ +public class ExtendedMain { + /** + * This method implements the Edge 'e_Cancel' + */ + public void e_Cancel() { + System.out.println("Edge: e_Cancel"); + } + + /** + * This method implements the Edge 'e_ChangeDatabase' + */ + public void e_ChangeDatabase() { + System.out.println("Edge: e_ChangeDatabase"); + } + + /** + * This method implements the Edge 'e_CloseApp' + */ + public void e_CloseApp() { + System.out.println("Edge: e_CloseApp"); + } + + /** + * This method implements the Edge 'e_CloseDB' + */ + public void e_CloseDB() { + System.out.println("Edge: e_CloseDB"); + } + + /** + * This method implements the Edge 'e_CloseDialog' + */ + public void e_CloseDialog() { + System.out.println("Edge: e_CloseDialog"); + } + + /** + * This method implements the Edge 'e_EnterCorrectKey' + */ + public void e_EnterCorrectKey() { + System.out.println("Edge: e_EnterCorrectKey"); + } + + /** + * This method implements the Edge 'e_EnterInvalidKey' + */ + public void e_EnterInvalidKey() { + System.out.println("Edge: e_EnterInvalidKey"); + } + + /** + * This method implements the Edge 'e_Initialize' + */ + public void e_Initialize() { + System.out.println("Edge: e_Initialize"); + } + + /** + * This method implements the Edge 'e_No' + */ + public void e_No() { + System.out.println("Edge: e_No"); + } + + /** + * This method implements the Edge 'e_Start' + */ + public void e_Start() { + System.out.println("Edge: e_Start"); + } + + /** + * This method implements the Edge 'e_StartWithDatabase' + */ + public void e_StartWithDatabase() { + System.out.println("Edge: e_StartWithDatabase"); + } + + /** + * This method implements the Edge 'e_Yes' + */ + public void e_Yes() { + System.out.println("Edge: e_Yes"); + } + + /** + * This method implements the Vertex 'v_EnterMasterCompositeMasterKey' + */ + public void v_EnterMasterCompositeMasterKey() { + System.out.println("Vertex: v_EnterMasterCompositeMasterKey"); + } + + /** + * This method implements the Vertex 'v_InvalidKey' + */ + public void v_InvalidKey() { + System.out.println("Vertex: v_InvalidKey"); + } + + /** + * This method implements the Vertex 'v_KeePassNotRunning' + */ + public void v_KeePassNotRunning() { + System.out.println("Vertex: v_KeePassNotRunning"); + } + + /** + * This method implements the Vertex 'v_MainWindowEmpty' + */ + public void v_MainWindowEmpty() { + System.out.println("Vertex: v_MainWindowEmpty"); + } + + /** + * This method implements the Vertex 'v_MainWindow_DB_Loaded' + */ + public void v_MainWindow_DB_Loaded() { + System.out.println("Vertex: v_MainWindow_DB_Loaded"); + } + + /** + * This method implements the Vertex 'v_SaveBeforeCloseLock' + */ + public void v_SaveBeforeCloseLock() { + System.out.println("Vertex: v_SaveBeforeCloseLock"); + } +} diff --git a/graphwalker-core/src/test/java/org/graphwalker/core/ExtendedMain.java b/graphwalker-core/src/test/java/org/graphwalker/core/ExtendedMain.java new file mode 100644 index 00000000..e42860b9 --- /dev/null +++ b/graphwalker-core/src/test/java/org/graphwalker/core/ExtendedMain.java @@ -0,0 +1,161 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +/** + * + */ +package org.graphwalker.core; + +/** + *

ExtendedMain class.

+ */ +public class ExtendedMain { + /** + * This method implements the Edge 'e_Cancel' + */ + public void e_Cancel() { + System.out.println("Edge: e_Cancel"); + } + + /** + * This method implements the Edge 'e_ChangeDatabase' + */ + public void e_ChangeDatabase() { + System.out.println("Edge: e_ChangeDatabase"); + } + + /** + * This method implements the Edge 'e_CloseApp' + */ + public void e_CloseApp() { + System.out.println("Edge: e_CloseApp"); + } + + /** + * This method implements the Edge 'e_CloseDB' + */ + public void e_CloseDB() { + System.out.println("Edge: e_CloseDB"); + } + + /** + * This method implements the Edge 'e_CloseDialog' + */ + public void e_CloseDialog() { + System.out.println("Edge: e_CloseDialog"); + } + + /** + * This method implements the Edge 'e_EnterCorrectKey' + */ + public void e_EnterCorrectKey() { + System.out.println("Edge: e_EnterCorrectKey"); + } + + /** + * This method implements the Edge 'e_EnterInvalidKey' + */ + public void e_EnterInvalidKey() { + System.out.println("Edge: e_EnterInvalidKey"); + } + + /** + * This method implements the Edge 'e_Initialize' + */ + public void e_Initialize() { + System.out.println("Edge: e_Initialize"); + } + + /** + * This method implements the Edge 'e_No' + */ + public void e_No() { + System.out.println("Edge: e_No"); + } + + /** + * This method implements the Edge 'e_Start' + */ + public void e_Start() { + System.out.println("Edge: e_Start"); + } + + /** + * This method implements the Edge 'e_StartWithDatabase' + */ + public void e_StartWithDatabase() { + System.out.println("Edge: e_StartWithDatabase"); + } + + /** + * This method implements the Edge 'e_Yes' + */ + public void e_Yes() { + System.out.println("Edge: e_Yes"); + } + + /** + * This method implements the Vertex 'v_EnterMasterCompositeMasterKey' + */ + public void v_EnterMasterCompositeMasterKey() { + System.out.println("Vertex: v_EnterMasterCompositeMasterKey"); + } + + /** + * This method implements the Vertex 'v_InvalidKey' + */ + public void v_InvalidKey() { + System.out.println("Vertex: v_InvalidKey"); + } + + /** + * This method implements the Vertex 'v_KeePassNotRunning' + */ + public void v_KeePassNotRunning() { + System.out.println("Vertex: v_KeePassNotRunning"); + } + + /** + * This method implements the Vertex 'v_MainWindowEmpty' + */ + public void v_MainWindowEmpty() { + System.out.println("Vertex: v_MainWindowEmpty"); + } + + /** + * This method implements the Vertex 'v_MainWindow_DB_Loaded' + */ + public void v_MainWindow_DB_Loaded() { + System.out.println("Vertex: v_MainWindow_DB_Loaded"); + } + + /** + * This method implements the Vertex 'v_SaveBeforeCloseLock' + */ + public void v_SaveBeforeCloseLock() { + System.out.println("Vertex: v_SaveBeforeCloseLock"); + } +} From 9d2a8b50408be4f8d9683672cc1111dc3b7c9c93 Mon Sep 17 00:00:00 2001 From: Nils Olsson Date: Mon, 21 Nov 2011 00:22:17 +0100 Subject: [PATCH 012/371] Moved mbt_setup.dtd to the main resource folder --- .../graphwalker/core/ModelBasedTesting.java | 1 + .../main/java/org/graphwalker/core/Util.java | 21 +++++++------------ .../xml => main/resources}/mbt_setup.dtd | 0 3 files changed, 8 insertions(+), 14 deletions(-) rename graphwalker-core/src/{test/resources/xml => main/resources}/mbt_setup.dtd (100%) diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java b/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java index ab813cd0..c1fb8fa6 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java @@ -66,6 +66,7 @@ * The object handles the test case generation, both online and offline. */ public class ModelBasedTesting { + private static Logger logger = Util.setupLogger(ModelBasedTesting.class); private AbstractModelHandler modelHandler; diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Util.java b/graphwalker-core/src/main/java/org/graphwalker/core/Util.java index c3575609..94846714 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Util.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/Util.java @@ -351,8 +351,7 @@ public static ModelBasedTesting loadMbtAsWSFromXml(final File file) throws StopC * @throws java.lang.InterruptedException if any. * @return a {@link org.graphwalker.core.ModelBasedTesting} object. */ - public static ModelBasedTesting loadMbtFromXml(final File file, final boolean dryRun) throws StopConditionException, - GeneratorException, IOException, JDOMException, InterruptedException { + public static ModelBasedTesting loadMbtFromXml(final File file, final boolean dryRun) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { return loadXml(file, false, dryRun, false); } @@ -367,8 +366,7 @@ public static ModelBasedTesting loadMbtFromXml(final File file, final boolean dr * @throws java.lang.InterruptedException if any. * @return a {@link org.graphwalker.core.ModelBasedTesting} object. */ - public static ModelBasedTesting loadMbtFromXml(final File file) throws StopConditionException, GeneratorException, IOException, - JDOMException, InterruptedException { + public static ModelBasedTesting loadMbtFromXml(final File file) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { return loadXml(file, false, false, false); } @@ -383,8 +381,7 @@ public static ModelBasedTesting loadMbtFromXml(final File file) throws StopCondi * @throws java.lang.InterruptedException if any. * @return a {@link org.graphwalker.core.ModelBasedTesting} object. */ - public static ModelBasedTesting getNewMbtFromXml(final File file) throws StopConditionException, GeneratorException, IOException, - JDOMException, InterruptedException { + public static ModelBasedTesting getNewMbtFromXml(final File file) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { return loadXml(file, false, false, true); } @@ -399,8 +396,7 @@ public static ModelBasedTesting getNewMbtFromXml(final File file) throws StopCon * @throws java.lang.InterruptedException if any. * @return a {@link org.graphwalker.core.ModelBasedTesting} object. */ - public ModelBasedTesting loadMbtFromXmlNonStatic(final File file) throws StopConditionException, GeneratorException, IOException, - JDOMException, InterruptedException { + public ModelBasedTesting loadMbtFromXmlNonStatic(final File file) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { return loadXmlNonStatic(file, false, false); } @@ -419,8 +415,7 @@ public ModelBasedTesting loadMbtFromXmlNonStatic(final File file) throws StopCon * @throws InterruptedException */ @SuppressWarnings("unchecked") - private static ModelBasedTesting loadXml(final File file, final boolean runningSoapServices, final boolean dryRun, - final boolean generateNewModel) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + private static ModelBasedTesting loadXml(final File file, final boolean runningSoapServices, final boolean dryRun, final boolean generateNewModel) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { final ModelBasedTesting mbt = new ModelBasedTesting(); mbt.setDryRun(dryRun); @@ -616,8 +611,7 @@ public void run() { } @SuppressWarnings("unchecked") - private ModelBasedTesting loadXmlNonStatic(final File file, final boolean runningSoapServices, final boolean dryRun) - throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { + private ModelBasedTesting loadXmlNonStatic(final File file, final boolean runningSoapServices, final boolean dryRun) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { final ModelBasedTesting mbt = new ModelBasedTesting(); mbt.setDryRun(dryRun); @@ -830,8 +824,7 @@ private static String getScriptContent(final List scripts) throws IOExc } @SuppressWarnings("unchecked") - private static PathGenerator getGenerator(final FiniteStateMachine machine, final Element generator) throws StopConditionException, - GeneratorException, IOException { + private static PathGenerator getGenerator(final FiniteStateMachine machine, final Element generator) throws StopConditionException, GeneratorException, IOException { int generatorType = Keywords.getGenerator(generator.getAttributeValue("TYPE")); PathGenerator generatorObject = getGenerator(generatorType); if (generatorObject instanceof CodeGenerator) { diff --git a/graphwalker-core/src/test/resources/xml/mbt_setup.dtd b/graphwalker-core/src/main/resources/mbt_setup.dtd similarity index 100% rename from graphwalker-core/src/test/resources/xml/mbt_setup.dtd rename to graphwalker-core/src/main/resources/mbt_setup.dtd From cd284e1aa794051c18c7935d34f7f2d4c87e79ca Mon Sep 17 00:00:00 2001 From: Nils Olsson Date: Mon, 21 Nov 2011 23:23:16 +0100 Subject: [PATCH 013/371] Removed the report generation during the install goal for faster build time, run mvn site:site to generate reports instead --- graphwalker-parent/pom.xml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/graphwalker-parent/pom.xml b/graphwalker-parent/pom.xml index c7b5a915..f142dc5f 100644 --- a/graphwalker-parent/pom.xml +++ b/graphwalker-parent/pom.xml @@ -255,15 +255,6 @@
- - - generate-reports - install - - site - - - From 2a3a717020fcce507d6fa143568cf58c0a9ab04b Mon Sep 17 00:00:00 2001 From: Nils Olsson Date: Thu, 5 Jan 2012 16:03:38 +0100 Subject: [PATCH 014/371] A first rewrite of the core module --- .../main/java/org/graphwalker/cli/CLI.java | 160 +- .../java/org/graphwalker/cli/CLITest.java | 439 --- .../org/graphwalker/cli/ExtendedMain.java | 161 - .../org/graphwalker/cli/bugs/Issue_10.java | 106 - .../org/graphwalker/cli/bugs/Issue_9.java | 107 - .../src/test/resources/graphml/UC01.graphml | 296 -- .../graphml/methods/ExtendedMain.graphml | 412 --- .../resources/graphml/methods/Main.graphml | 421 --- .../graphml/misc/missing_inedges.graphml | 389 --- .../graphml/misc/no_missing_inedges.graphml | 401 --- .../graphml/reqtags/ExtendedMain.graphml | 416 --- .../graphml/test24/AddressBook.graphml | 1459 -------- .../graphml/test24/AddressBookContact.graphml | 600 ---- .../test24/AddressBookReadOnly.graphml | 226 -- .../resources/graphml/test24/Alarm.graphml | 818 ----- .../graphml/test24/AlarmEdit.graphml | 714 ---- .../resources/graphml/test24/Audio.graphml | 411 --- .../graphml/test24/Calculator.graphml | 234 -- .../resources/graphml/test24/Calendar.graphml | 760 ----- .../test24/CalendarAppointment.graphml | 976 ------ .../graphml/test24/Calendar_ToolsMenu.graphml | 267 -- .../graphml/test24/CallHistory.graphml | 313 -- .../resources/graphml/test24/Camera.graphml | 871 ----- .../graphml/test24/ContactFavorites.graphml | 579 ---- .../test24/ContactFavoritesReadOnly.graphml | 83 - .../test24/ContactTapToSelectNumber.graphml | 480 --- .../resources/graphml/test24/Contacts.graphml | 228 -- .../graphml/test24/ContactsReadOnly.graphml | 194 -- .../resources/graphml/test24/Date.graphml | 115 - .../graphml/test24/DefaultValues.graphml | 255 -- .../graphml/test24/DeleteItems.graphml | 253 -- .../graphml/test24/GlobalSettings.graphml | 466 --- .../graphml/test24/ImageViewer.graphml | 126 - .../graphml/test24/KeyboardNumeric.graphml | 250 -- .../graphml/test24/KeyboardText.graphml | 367 -- .../graphml/test24/KeyboardToolsMenu.graphml | 752 ---- .../resources/graphml/test24/Main.graphml | 925 ----- .../resources/graphml/test24/MakeCall.graphml | 143 - .../graphml/test24/MediaPlayer.graphml | 854 ----- .../graphml/test24/MessagingCompose.graphml | 466 --- .../graphml/test24/MessagingDrafts.graphml | 133 - .../graphml/test24/MessagingInbox.graphml | 233 -- .../graphml/test24/MessagingSent.graphml | 133 - .../graphml/test24/NeoBrowser.graphml | 951 ------ .../resources/graphml/test24/Notes.graphml | 440 --- .../graphml/test24/NumberToDial.graphml | 208 -- .../test24/RunningApplications.graphml | 238 -- .../graphml/test24/SendMessage.graphml | 231 -- .../graphml/test24/SendPictureAsMMS.graphml | 448 --- .../graphml/test24/SendVCard.graphml | 589 ---- .../resources/graphml/test24/SysFiles.graphml | 99 - .../resources/graphml/test24/Tetris.graphml | 142 - .../resources/graphml/test24/Time.graphml | 98 - .../src/test/resources/lib/small_jar.jar | Bin 6809 -> 0 bytes .../test/resources/templates/junit.template | 19 - .../test/resources/templates/perl.template | 42 - .../src/test/resources/xml/ReachedVertex.xml | 34 - .../src/test/resources/xml/javaExecutor.xml | 34 - .../test/resources/xml/reqtags/mbt_init6.xml | 32 - .../test/resources/xml/reqtags/mbt_init8.xml | 41 - .../test/resources/xml/reqtags/mbt_init9.xml | 41 - graphwalker-core/pom.xml | 76 +- .../org/graphwalker/core/ClassPathHack.java | 72 - .../graphwalker/core/EventDrivenModels.java | 192 -- ...neratorException.java => GraphWalker.java} | 27 +- .../graphwalker/core/GraphWalkerFactory.java | 73 + .../org/graphwalker/core/GraphWalkerImpl.java | 100 + .../java/org/graphwalker/core/Keywords.java | 522 --- .../graphwalker/core/ModelBasedTesting.java | 1530 --------- .../org/graphwalker/core/MultipleModels.java | 257 -- .../graphwalker/core/StatisticsManager.java | 189 -- .../java/org/graphwalker/core/Status.java | 247 -- .../main/java/org/graphwalker/core/Util.java | 1135 ------- .../Algorithm.java} | 12 +- .../core/algorithms/FloydWarshall.java | 158 + .../LoggerAspect.java} | 19 +- .../ValidatorAspect.java} | 16 +- .../conditions/AbstractStopCondition.java | 27 +- .../org/graphwalker/core/conditions/All.java | 92 + .../core/conditions/AlternativeCondition.java | 102 - .../org/graphwalker/core/conditions/Any.java | 95 + .../conditions/CombinationalCondition.java | 101 - .../core/conditions/EdgeCoverage.java | 61 +- .../{TestCaseLength.java => Length.java} | 41 +- .../{NeverCondition.java => Never.java} | 30 +- .../core/conditions/ReachedEdge.java | 112 +- .../core/conditions/ReachedRequirement.java | 82 - .../core/conditions/ReachedVertex.java | 136 +- .../core/conditions/RequirementCoverage.java | 79 - .../core/conditions/StopCondition.java | 35 +- .../conditions/StopConditionException.java | 53 + .../core/conditions/StopConditionFactory.java | 99 + .../core/conditions/TimeDuration.java | 46 +- .../core/conditions/VertexCoverage.java | 56 +- .../core/configuration/Configuration.java | 99 + .../configuration/ConfigurationException.java | 53 + .../configuration/ConfigurationFactory.java | 162 + .../core/configuration/ConfigurationImpl.java | 124 + .../core/exceptions/FoundNoEdgeException.java | 45 - .../EdgeFilter.java} | 35 +- .../core/filter/EdgeFilterException.java | 53 + .../core/filter/EdgeFilterImpl.java | 82 + .../core/filters/AccessableEdgeFilter.java | 101 - .../core/generators/A_StarPathGenerator.java | 241 -- .../generators/AbstractPathGenerator.java | 108 +- .../AllPathPermutationsGenerator.java | 215 -- .../core/generators/CodeGenerator.java | 110 - .../generators/CombinedPathGenerator.java | 139 - .../core/generators/ListGenerator.java | 105 - .../generators/NonOptimizedShortestPath.java | 156 - .../core/generators/PathGenerator.java | 66 +- .../generators/PathGeneratorException.java | 53 + .../core/generators/PathGeneratorFactory.java | 53 + .../RandomPath.java} | 49 +- .../core/generators/RandomPathGenerator.java | 138 - .../generators/RequirementsGenerator.java | 108 - .../core/graph/AbstractElement.java | 584 ---- .../java/org/graphwalker/core/graph/Edge.java | 217 -- .../org/graphwalker/core/graph/Graph.java | 135 - .../org/graphwalker/core/graph/Vertex.java | 271 -- .../java/org/graphwalker/core/io/GraphML.java | 1086 ------ .../org/graphwalker/core/io/ParseLog.java | 87 - .../core/io/PrintHTMLTestSequence.java | 103 - .../org/graphwalker/core/machine/Machine.java | 79 + .../core/machine/MachineException.java | 53 + .../graphwalker/core/machine/MachineImpl.java | 170 + .../machines/ExtendedFiniteStateMachine.java | 393 --- .../core/machines/FiniteStateMachine.java | 922 ----- .../core/model/AbstractElement.java | 121 + .../org/graphwalker/core/model/Action.java | 60 + .../java/org/graphwalker/core/model/Edge.java | 183 + .../org/graphwalker/core/model/Element.java | 65 + .../org/graphwalker/core/model/Guard.java | 60 + .../org/graphwalker/core/model/Model.java | 192 ++ .../ModelException.java} | 43 +- .../graphwalker/core/model/ModelFactory.java | 180 + .../org/graphwalker/core/model/ModelImpl.java | 315 ++ .../Requirement.java} | 57 +- .../org/graphwalker/core/model/Vertex.java | 158 + .../core/multipleModels/ModelAPI.java | 70 - .../core/multipleModels/ModelHandler.java | 438 --- .../statistics/EdgeCoverageStatistics.java | 89 - .../EdgeSequenceCoverageStatistics.java | 151 - .../RequirementCoverageStatistics.java | 105 - .../statistics/VertexCoverageStatistics.java | 90 - .../org/graphwalker/core/util/Resource.java | 86 + .../ResourceException.java} | 30 +- .../src/main/resources/graphwalker.xsd | 83 + .../{version.properties => log4j.properties} | 4 - .../src/main/resources/mbt_setup.dtd | 51 - .../message.properties} | 42 +- .../messages/message_es_ES.properties | 30 + .../messages/message_sv_SE.properties | 30 + .../core/ExtendedFiniteStateMachineTest.java | 90 - .../org/graphwalker/core/ExtendedMain.java | 161 - .../core/FiniteStateMachineTest.java | 91 - .../org/graphwalker/core/KeywordsTest.java | 93 - .../core/ModelBasedTestingTest.java | 256 -- .../graphwalker/core/MultipleModelsTest.java | 424 --- .../core/RequirementVariableTest.java | 236 -- .../core/StatisticsManagerTest.java | 204 -- .../java/org/graphwalker/core/UtilTest.java | 86 - .../conditions/AlternativeConditionTest.java | 56 - .../CombinationalConditionTest.java | 52 - .../core/conditions/EdgeCoverageTest.java | 170 +- .../core/conditions/LengthTest.java | 66 + .../core/conditions/NeverTest.java | 66 + .../core/conditions/ReachedEdgeTest.java | 189 +- .../conditions/ReachedRequirementTest.java | 104 - .../core/conditions/ReachedStateTest.java | 99 - .../core/conditions/ReachedVertexTest.java | 87 + .../conditions/RequirementCoverageTest.java | 106 - .../core/conditions/StateCoverageTest.java | 98 - .../conditions/StopConditionFactoryTest.java | 80 + .../core/conditions/TestCaseLengthTest.java | 99 - .../core/conditions/TimeDurationTest.java | 178 +- .../core/conditions/VertexCoverageTest.java | 75 + .../core/configuration/MultiModelTest.java | 68 + .../core/configuration/SingleModelTest.java | 55 + .../core/configuration/StopConditionTest.java | 57 + .../core/filter/EdgeFilterTest.java | 54 + .../filters/AccessableEdgeFilterTest.java | 154 - .../A_StarPathGeneratorEFSMBeanShellTest.java | 129 - ...A_StarPathGeneratorEFSMJavaScriptTest.java | 129 - .../A_StarPathGeneratorFSMTest.java | 106 - .../AllPathPermutationsGeneratorTest.java | 63 - .../core/generators/CodeGeneratorTest.java | 104 - .../generators/CombinedPathGeneratorTest.java | 87 - .../core/generators/ListGeneratorTest.java | 71 - .../generators/PathGeneratorFactoryTest.java} | 27 +- .../generators/RandomPathGeneratorTest.java | 90 - .../core/generators/RandomPathTest.java | 70 + .../org/graphwalker/core/io/GraphMLTest.java | 440 --- .../core/machine/MachineImplTest.java | 70 + .../ActionTest.java} | 38 +- .../org/graphwalker/core/model/EdgeTest.java | 134 + .../Model_B_API.java => model/GuardTest.java} | 35 +- .../ModelFactoryTest.java} | 46 +- .../graphwalker/core/model/ModelImplTest.java | 114 + .../RequirementTest.java} | 33 +- .../graphwalker/core/model/VertexTest.java | 72 + .../core/multiple/ModelHandlerTest.java | 164 - .../core/multiple/Model_A_API.java | 69 - .../src/test/resources/bsh/reqtags/graph.bsh | 46 - .../resources/bsh/reqtags/mbt_startup.bsh | 3 - .../{xml/multipleB.xml => edgeFilterTest.xml} | 26 +- ...ModelBasedTestingTest.testNewState.graphml | 296 -- .../src/test/resources/graphml/UC01.graphml | 296 -- .../resources/graphml/bugs/Issue_10.graphml | 177 - .../resources/graphml/bugs/Issue_9.graphml | 296 -- .../efsm_lables/testMergeEFSM_Lables.graphml | 337 -- .../graphml/mergeSubgraphs_01/a.graphml | 133 - .../graphml/mergeSubgraphs_01/b.graphml | 278 -- .../graphml/mergeSubgraphs_02/a.graphml | 342 -- .../graphml/mergeSubgraphs_02/b.graphml | 740 ---- .../resources/graphml/merging/Filter.graphml | 215 -- .../graphml/merging/Filterval5CD.graphml | 328 -- .../graphml/merging/Filterval7CD.graphml | 333 -- .../graphml/merging/FiltervalOH.graphml | 501 --- .../graphml/merging/FiltervalTH.graphml | 719 ---- .../resources/graphml/modelWithDescr.graphml | 101 - .../test/resources/graphml/multiple/A.graphml | 188 - .../test/resources/graphml/multiple/B.graphml | 127 - .../graphml/multiple/switch/A.graphml | 179 - .../graphml/multiple/switch/A1.graphml | 99 - .../graphml/multiple/switch/B.graphml | 93 - .../graphml/multiple/switch/B1.graphml | 120 - .../graphml/multiple/switch/C.graphml | 92 - ...ker.EventDrivenModels.eventModel.a.graphml | 112 - ...er.EventDrivenModels.load2Models.1.graphml | 296 -- .../a.graphml | 167 - .../b.graphml | 278 -- ...r.EventDrivenModels.switchModels.A.graphml | 276 -- ...r.EventDrivenModels.switchModels.B.graphml | 263 -- ...r.EventDrivenModels.switchModels.C.graphml | 263 -- .../graphml/reqtags/ExtendedMain.graphml | 416 --- .../graphml/reqtags/execAction.graphml | 114 - .../resources/graphml/test01/graph1.graphml | 108 - .../resources/graphml/test01/graph2.graphml | 139 - .../resources/graphml/test02/graph1.graphml | 146 - .../resources/graphml/test02/graph2.graphml | 139 - .../resources/graphml/test03/Graph001.graphml | 209 -- .../resources/graphml/test03/Graph002.graphml | 204 -- .../resources/graphml/test03/Graph003.graphml | 79 - .../resources/graphml/test03/Graph004.graphml | 219 -- .../resources/graphml/test03/Graph005.graphml | 79 - .../resources/graphml/test03/Graph006.graphml | 219 -- .../resources/graphml/test03/Graph007.graphml | 79 - .../resources/graphml/test03/Graph008.graphml | 205 -- .../resources/graphml/test03/Graph009.graphml | 252 -- .../resources/graphml/test03/Graph010.graphml | 205 -- .../resources/graphml/test03/Graph011.graphml | 185 - .../resources/graphml/test03/Graph012.graphml | 185 - .../resources/graphml/test03/Graph013.graphml | 145 - .../resources/graphml/test03/Graph014.graphml | 348 -- .../resources/graphml/test03/Graph015.graphml | 324 -- .../resources/graphml/test03/Graph016.graphml | 324 -- .../resources/graphml/test03/Graph017.graphml | 330 -- .../resources/graphml/test03/Graph018.graphml | 145 - .../resources/graphml/test03/Graph019.graphml | 227 -- .../resources/graphml/test03/Graph020.graphml | 160 - .../resources/graphml/test03/Graph021.graphml | 160 - .../resources/graphml/test03/Graph022.graphml | 79 - .../resources/graphml/test03/Graph023.graphml | 205 -- .../resources/graphml/test03/Graph024.graphml | 79 - .../resources/graphml/test03/Graph025.graphml | 161 - .../resources/graphml/test03/Graph026.graphml | 145 - .../resources/graphml/test03/Graph027.graphml | 227 -- .../resources/graphml/test03/Graph028.graphml | 257 -- .../resources/graphml/test03/Graph029.graphml | 255 -- .../resources/graphml/test03/Graph030.graphml | 123 - .../resources/graphml/test03/Graph031.graphml | 123 - .../resources/graphml/test03/Graph032.graphml | 145 - .../resources/graphml/test03/Graph033.graphml | 227 -- .../resources/graphml/test03/Graph034.graphml | 183 - .../resources/graphml/test03/Graph035.graphml | 183 - .../resources/graphml/test03/Graph036.graphml | 145 - .../resources/graphml/test03/Graph037.graphml | 265 -- .../resources/graphml/test03/Graph038.graphml | 227 -- .../resources/graphml/test03/Graph039.graphml | 227 -- .../resources/graphml/test03/Graph040.graphml | 145 - .../resources/graphml/test03/Graph041.graphml | 309 -- .../resources/graphml/test03/Graph042.graphml | 242 -- .../resources/graphml/test03/Graph043.graphml | 242 -- .../resources/graphml/test03/Graph044.graphml | 138 - .../resources/graphml/test03/Graph045.graphml | 343 -- .../resources/graphml/test03/Graph046.graphml | 343 -- .../resources/graphml/test03/Graph047.graphml | 425 --- .../resources/graphml/test03/Graph050.graphml | 305 -- .../resources/graphml/test03/Graph051.graphml | 305 -- .../resources/graphml/test03/Graph052.graphml | 286 -- .../resources/graphml/test03/Graph053.graphml | 286 -- .../resources/graphml/test03/Graph054.graphml | 286 -- .../resources/graphml/test03/Graph055.graphml | 286 -- .../resources/graphml/test03/Graph070.graphml | 256 -- .../resources/graphml/test03/Graph071.graphml | 256 -- .../resources/graphml/test03/Graph072.graphml | 195 -- .../resources/graphml/test03/Graph073.graphml | 195 -- .../resources/graphml/test03/Graph074.graphml | 145 - .../resources/graphml/test03/Graph075.graphml | 227 -- .../resources/graphml/test03/Graph076.graphml | 160 - .../resources/graphml/test03/Graph077.graphml | 160 - .../resources/graphml/test03/Graph078.graphml | 145 - .../resources/graphml/test03/Graph079.graphml | 183 - .../resources/graphml/test03/Graph080.graphml | 160 - .../resources/graphml/test03/Graph081.graphml | 160 - .../resources/graphml/test03/Graph082.graphml | 185 - .../resources/graphml/test03/Graph083.graphml | 162 - .../resources/graphml/test03/Graph084.graphml | 80 - .../resources/graphml/test03/Graph085.graphml | 162 - .../resources/graphml/test03/Graph086.graphml | 80 - .../resources/graphml/test03/Graph087.graphml | 124 - .../resources/graphml/test03/Graph088.graphml | 204 -- .../resources/graphml/test03/Graph089.graphml | 204 -- .../resources/graphml/test03/Graph092.graphml | 204 -- .../resources/graphml/test03/Graph093.graphml | 124 - .../resources/graphml/test03/Graph094.graphml | 189 -- .../resources/graphml/test03/Graph095.graphml | 123 - .../resources/graphml/test03/Graph096.graphml | 123 - .../resources/graphml/test03/Graph097.graphml | 273 -- .../resources/graphml/test03/Graph098.graphml | 273 -- .../resources/graphml/test03/Graph099.graphml | 376 -- .../resources/graphml/test03/Graph100.graphml | 517 --- .../resources/graphml/test03/Graph101.graphml | 457 --- .../resources/graphml/test03/Graph102.graphml | 457 --- .../resources/graphml/test03/Graph103.graphml | 457 --- .../resources/graphml/test03/Graph104.graphml | 307 -- .../resources/graphml/test03/Graph105.graphml | 477 --- .../resources/graphml/test03/Graph106.graphml | 168 - .../resources/graphml/test03/Graph107.graphml | 350 -- .../resources/graphml/test03/Graph108.graphml | 366 -- .../resources/graphml/test03/Graph109.graphml | 366 -- .../resources/graphml/test03/Graph110.graphml | 146 - .../resources/graphml/test03/Graph111.graphml | 267 -- .../resources/graphml/test03/Graph112.graphml | 185 - .../resources/graphml/test03/Graph113.graphml | 185 - .../resources/graphml/test03/Graph114.graphml | 450 --- .../resources/graphml/test03/Graph115.graphml | 576 ---- .../resources/graphml/test03/Graph116.graphml | 80 - .../resources/graphml/test03/Graph117.graphml | 244 -- .../resources/graphml/test03/Graph118.graphml | 177 - .../resources/graphml/test03/Graph119.graphml | 162 - .../resources/graphml/test03/Graph120.graphml | 206 -- .../resources/graphml/test03/Graph121.graphml | 428 --- .../resources/graphml/test03/Graph122.graphml | 404 --- .../resources/graphml/test03/Graph123.graphml | 404 --- .../resources/graphml/test03/Graph124.graphml | 404 --- .../resources/graphml/test03/Graph125.graphml | 206 -- .../resources/graphml/test03/Graph126.graphml | 428 --- .../resources/graphml/test03/Graph127.graphml | 360 -- .../resources/graphml/test03/Graph128.graphml | 360 -- .../resources/graphml/test03/Graph129.graphml | 206 -- .../resources/graphml/test03/Graph130.graphml | 414 --- .../resources/graphml/test03/Graph131.graphml | 385 --- .../resources/graphml/test03/Graph132.graphml | 385 --- .../resources/graphml/test03/Graph133.graphml | 206 -- .../resources/graphml/test03/Graph134.graphml | 414 --- .../resources/graphml/test03/Graph135.graphml | 347 -- .../resources/graphml/test03/Graph136.graphml | 347 -- .../resources/graphml/test03/Graph137.graphml | 168 - .../resources/graphml/test03/Graph138.graphml | 146 - .../resources/graphml/test03/Graph139.graphml | 328 -- .../resources/graphml/test03/Graph140.graphml | 246 -- .../resources/graphml/test03/Graph141.graphml | 246 -- .../resources/graphml/test03/Graph142.graphml | 146 - .../resources/graphml/test03/Graph143.graphml | 228 -- .../resources/graphml/test03/Graph144.graphml | 146 - .../resources/graphml/test03/Graph145.graphml | 146 - .../resources/graphml/test03/Graph146.graphml | 146 - .../resources/graphml/test03/Graph147.graphml | 228 -- .../resources/graphml/test03/Graph148.graphml | 199 -- .../resources/graphml/test03/Graph149.graphml | 199 -- .../resources/graphml/test03/Graph150.graphml | 206 -- .../resources/graphml/test03/Graph151.graphml | 370 -- .../resources/graphml/test03/Graph152.graphml | 303 -- .../resources/graphml/test03/Graph153.graphml | 265 -- .../resources/graphml/test03/Graph154.graphml | 162 - .../resources/graphml/test03/Graph155.graphml | 168 - .../resources/graphml/test03/Graph156.graphml | 220 -- .../resources/graphml/test03/Graph157.graphml | 279 -- .../resources/graphml/test03/Graph158.graphml | 279 -- .../resources/graphml/test03/Graph159.graphml | 138 - .../resources/graphml/test03/Graph160.graphml | 206 -- .../resources/graphml/test03/Graph161.graphml | 124 - .../resources/graphml/test03/Graph162.graphml | 244 -- .../resources/graphml/test03/Graph163.graphml | 523 --- .../resources/graphml/test03/Graph164.graphml | 264 -- .../resources/graphml/test03/Graph165.graphml | 134 - .../resources/graphml/test03/Graph166.graphml | 769 ----- .../resources/graphml/test03/Graph167.graphml | 162 - .../resources/graphml/test03/Graph168.graphml | 162 - .../resources/graphml/test03/Graph169.graphml | 687 ---- .../resources/graphml/test03/Graph170.graphml | 216 -- .../resources/graphml/test03/Graph171.graphml | 118 - .../resources/graphml/test03/Graph172.graphml | 118 - .../resources/graphml/test03/Graph173.graphml | 80 - .../resources/graphml/test03/Graph174.graphml | 118 - .../resources/graphml/test03/Graph175.graphml | 162 - .../resources/graphml/test03/Graph176.graphml | 264 -- .../resources/graphml/test03/Graph177.graphml | 1111 ------ .../resources/graphml/test03/Graph178.graphml | 3020 ----------------- .../resources/graphml/test03/Graph179.graphml | 599 ---- .../resources/graphml/test03/Start.graphml | 130 - .../test/resources/graphml/test09/B.graphml | 139 - .../test/resources/graphml/test09/C.graphml | 139 - .../resources/graphml/test09/Start.graphml | 146 - .../test/resources/graphml/test10/B.graphml | 138 - .../test/resources/graphml/test10/C.graphml | 138 - .../resources/graphml/test10/Start.graphml | 146 - .../test/resources/graphml/test11/B.graphml | 138 - .../test/resources/graphml/test11/C.graphml | 138 - .../resources/graphml/test11/Start.graphml | 146 - .../test/resources/graphml/test13/B.graphml | 138 - .../test/resources/graphml/test13/C.graphml | 155 - .../resources/graphml/test13/Start.graphml | 146 - .../test/resources/graphml/test14/B.graphml | 138 - .../test/resources/graphml/test14/C.graphml | 138 - .../resources/graphml/test14/Start.graphml | 145 - .../resources/graphml/test15/test15.graphml | 145 - .../resources/graphml/test17/test17.graphml | 199 -- .../resources/graphml/test18/test18.graphml | 199 -- .../resources/graphml/test19/test19.graphml | 199 -- .../resources/graphml/test20/test20.graphml | 176 - .../test/resources/graphml/test22/1.graphml | 113 - .../test/resources/graphml/test22/2.graphml | 185 - .../resources/graphml/test22/main.graphml | 89 - .../graphml/test23/AddressBook.graphml | 116 - .../test23/ContactTapToSelectNumber.graphml | 107 - .../resources/graphml/test23/Contacts.graphml | 84 - .../resources/graphml/test23/Main.graphml | 100 - .../graphml/test23/SendVCard.graphml | 139 - .../test/resources/graphml/weight/FSM.graphml | 182 - .../test/resources/models/brokenModel.graphml | 1 + .../resources/models/edgeFilterModelA.graphml | 57 + .../resources/models/edgeFilterModelB.graphml | 114 + .../resources/models/edgeFilterModelC.graphml | 57 + .../test/resources/models/multiModelA.graphml | 80 + .../test/resources/models/multiModelB.graphml | 80 + .../test/resources/models/multiModelC.graphml | 80 + .../resources/models/requirementModel.graphml | 152 + .../test/resources/models/singleModel.graphml | 132 + .../{xml/multipleA.xml => multiModelTest.xml} | 22 +- .../reqCoverage.xml => singleModelTest.xml} | 19 +- .../src/test/resources/stopConditionTest.xml | 46 + .../src/test/resources/templates/short.report | 24 - .../src/test/resources/xml/bugs/Issue_10.xml | 34 - ...aphwalker.EventDrivenModels.eventModel.xml | 34 - ...walker.EventDrivenModels.load2Models.1.xml | 34 - ...walker.EventDrivenModels.load2Models.2.xml | 34 - ...alker.EventDrivenModels.switchModels.A.xml | 34 - ...alker.EventDrivenModels.switchModels.B.xml | 34 - ...alker.EventDrivenModels.switchModels.C.xml | 34 - .../test/resources/xml/reqtags/mbt_init.xml | 34 - .../test/resources/xml/reqtags/mbt_init10.xml | 37 - .../test/resources/xml/reqtags/mbt_init11.xml | 34 - .../test/resources/xml/reqtags/mbt_init2.xml | 40 - .../test/resources/xml/reqtags/mbt_init3.xml | 46 - .../test/resources/xml/reqtags/mbt_init4.xml | 57 - .../test/resources/xml/reqtags/mbt_init5.xml | 34 - .../test/resources/xml/reqtags/mbt_init6.xml | 32 - .../test/resources/xml/reqtags/mbt_init7.xml | 32 - .../src/test/resources/xml/switch/A.xml | 34 - .../src/test/resources/xml/switch/B.xml | 34 - .../src/test/resources/xml/switch/C.xml | 34 - .../main/java/org/graphwalker/gui/App.java | 140 +- graphwalker-parent/pom.xml | 113 +- graphwalker-webservice/pom.xml | 12 +- .../graphwalker/webservice/SoapService.java | 18 +- .../webservice/SoapServiceImpl.java | 135 + .../graphwalker/webservice/SoapServices.java | 288 -- .../webservice/SoapServiceTest.java | 36 +- .../resources/models/soapServiceModel.graphml | 82 +- .../src/test/resources/soapServiceTest.xml | 24 +- 473 files changed, 6240 insertions(+), 94504 deletions(-) delete mode 100644 graphwalker-cli/src/test/java/org/graphwalker/cli/CLITest.java delete mode 100644 graphwalker-cli/src/test/java/org/graphwalker/cli/ExtendedMain.java delete mode 100644 graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_10.java delete mode 100644 graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_9.java delete mode 100644 graphwalker-cli/src/test/resources/graphml/UC01.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/methods/ExtendedMain.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/methods/Main.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/misc/missing_inedges.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/misc/no_missing_inedges.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/reqtags/ExtendedMain.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/AddressBook.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/AddressBookContact.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/AddressBookReadOnly.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/Alarm.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/AlarmEdit.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/Audio.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/Calculator.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/Calendar.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/CalendarAppointment.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/CallHistory.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/Camera.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/ContactFavorites.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/Contacts.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/ContactsReadOnly.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/Date.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/DefaultValues.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/DeleteItems.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/GlobalSettings.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/ImageViewer.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/KeyboardNumeric.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/KeyboardText.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/Main.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/MakeCall.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/MediaPlayer.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/MessagingCompose.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/MessagingDrafts.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/MessagingInbox.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/MessagingSent.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/NeoBrowser.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/Notes.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/NumberToDial.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/RunningApplications.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/SendMessage.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/SendPictureAsMMS.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/SendVCard.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/SysFiles.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/Tetris.graphml delete mode 100644 graphwalker-cli/src/test/resources/graphml/test24/Time.graphml delete mode 100644 graphwalker-cli/src/test/resources/lib/small_jar.jar delete mode 100644 graphwalker-cli/src/test/resources/templates/junit.template delete mode 100644 graphwalker-cli/src/test/resources/templates/perl.template delete mode 100644 graphwalker-cli/src/test/resources/xml/ReachedVertex.xml delete mode 100644 graphwalker-cli/src/test/resources/xml/javaExecutor.xml delete mode 100644 graphwalker-cli/src/test/resources/xml/reqtags/mbt_init6.xml delete mode 100644 graphwalker-cli/src/test/resources/xml/reqtags/mbt_init8.xml delete mode 100644 graphwalker-cli/src/test/resources/xml/reqtags/mbt_init9.xml delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java rename graphwalker-core/src/main/java/org/graphwalker/core/{exceptions/GeneratorException.java => GraphWalker.java} (72%) create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/GraphWalkerFactory.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/GraphWalkerImpl.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/ModelBasedTesting.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/MultipleModels.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/StatisticsManager.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/Status.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/Util.java rename graphwalker-core/src/main/java/org/graphwalker/core/{statistics/AbstractStatistics.java => algorithms/Algorithm.java} (86%) create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/algorithms/FloydWarshall.java rename graphwalker-core/src/main/java/org/graphwalker/core/{events/MbtEvent.java => aspects/LoggerAspect.java} (83%) rename graphwalker-core/src/main/java/org/graphwalker/core/{exceptions/GuiStoppedExecution.java => aspects/ValidatorAspect.java} (79%) create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/conditions/All.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/conditions/AlternativeCondition.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/conditions/Any.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/conditions/CombinationalCondition.java rename graphwalker-core/src/main/java/org/graphwalker/core/conditions/{TestCaseLength.java => Length.java} (64%) rename graphwalker-core/src/main/java/org/graphwalker/core/conditions/{NeverCondition.java => Never.java} (76%) delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/conditions/ReachedRequirement.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/conditions/RequirementCoverage.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopConditionException.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/conditions/StopConditionFactory.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/configuration/Configuration.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/configuration/ConfigurationException.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/configuration/ConfigurationFactory.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/configuration/ConfigurationImpl.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/exceptions/FoundNoEdgeException.java rename graphwalker-core/src/main/java/org/graphwalker/core/{statistics/Statistics.java => filter/EdgeFilter.java} (69%) create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/filter/EdgeFilterException.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/filter/EdgeFilterImpl.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/filters/AccessableEdgeFilter.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/generators/A_StarPathGenerator.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/generators/AllPathPermutationsGenerator.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/generators/CodeGenerator.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/generators/CombinedPathGenerator.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/generators/ListGenerator.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/generators/NonOptimizedShortestPath.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGeneratorException.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/generators/PathGeneratorFactory.java rename graphwalker-core/src/main/java/org/graphwalker/core/{Model.java => generators/RandomPath.java} (58%) delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/generators/RandomPathGenerator.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/generators/RequirementsGenerator.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/graph/AbstractElement.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/graph/Edge.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/graph/Graph.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/graph/Vertex.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/io/GraphML.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/io/ParseLog.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/io/PrintHTMLTestSequence.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/machine/Machine.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/machine/MachineException.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/machine/MachineImpl.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/machines/ExtendedFiniteStateMachine.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/machines/FiniteStateMachine.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/model/AbstractElement.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/model/Action.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/model/Edge.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/model/Element.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/model/Guard.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/model/Model.java rename graphwalker-core/src/main/java/org/graphwalker/core/{Application.java => model/ModelException.java} (68%) create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/model/ModelFactory.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/model/ModelImpl.java rename graphwalker-core/src/main/java/org/graphwalker/core/{io/AbstractModelHandler.java => model/Requirement.java} (58%) create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/model/Vertex.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelAPI.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/multipleModels/ModelHandler.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeCoverageStatistics.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/statistics/EdgeSequenceCoverageStatistics.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/statistics/RequirementCoverageStatistics.java delete mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/statistics/VertexCoverageStatistics.java create mode 100644 graphwalker-core/src/main/java/org/graphwalker/core/util/Resource.java rename graphwalker-core/src/main/java/org/graphwalker/core/{exceptions/InvalidDataException.java => util/ResourceException.java} (67%) create mode 100644 graphwalker-core/src/main/resources/graphwalker.xsd rename graphwalker-core/src/main/resources/{version.properties => log4j.properties} (94%) delete mode 100644 graphwalker-core/src/main/resources/mbt_setup.dtd rename graphwalker-core/src/main/resources/{graphwalker.properties => messages/message.properties} (54%) create mode 100644 graphwalker-core/src/main/resources/messages/message_es_ES.properties create mode 100644 graphwalker-core/src/main/resources/messages/message_sv_SE.properties delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/ExtendedFiniteStateMachineTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/ExtendedMain.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/FiniteStateMachineTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/KeywordsTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/ModelBasedTestingTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/MultipleModelsTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/RequirementVariableTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/StatisticsManagerTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/UtilTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/conditions/AlternativeConditionTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/conditions/CombinationalConditionTest.java create mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/conditions/LengthTest.java create mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/conditions/NeverTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedRequirementTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedStateTest.java create mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/conditions/ReachedVertexTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/conditions/RequirementCoverageTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/conditions/StateCoverageTest.java create mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/conditions/StopConditionFactoryTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/conditions/TestCaseLengthTest.java create mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/conditions/VertexCoverageTest.java create mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/configuration/MultiModelTest.java create mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/configuration/SingleModelTest.java create mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/configuration/StopConditionTest.java create mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/filter/EdgeFilterTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/filters/AccessableEdgeFilterTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMBeanShellTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorEFSMJavaScriptTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/generators/A_StarPathGeneratorFSMTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/generators/AllPathPermutationsGeneratorTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/generators/CodeGeneratorTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/generators/CombinedPathGeneratorTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/generators/ListGeneratorTest.java rename graphwalker-core/src/{main/java/org/graphwalker/core/exceptions/StopConditionException.java => test/java/org/graphwalker/core/generators/PathGeneratorFactoryTest.java} (69%) delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/generators/RandomPathGeneratorTest.java create mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/generators/RandomPathTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/io/GraphMLTest.java create mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/machine/MachineImplTest.java rename graphwalker-core/src/test/java/org/graphwalker/core/{multiple/Model_A1_API.java => model/ActionTest.java} (67%) create mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/model/EdgeTest.java rename graphwalker-core/src/test/java/org/graphwalker/core/{multiple/Model_B_API.java => model/GuardTest.java} (67%) rename graphwalker-core/src/test/java/org/graphwalker/core/{multiple/Model_B1_API.java => model/ModelFactoryTest.java} (51%) create mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/model/ModelImplTest.java rename graphwalker-core/src/test/java/org/graphwalker/core/{multiple/Model_C_API.java => model/RequirementTest.java} (69%) create mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/model/VertexTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/multiple/ModelHandlerTest.java delete mode 100644 graphwalker-core/src/test/java/org/graphwalker/core/multiple/Model_A_API.java delete mode 100644 graphwalker-core/src/test/resources/bsh/reqtags/graph.bsh delete mode 100644 graphwalker-core/src/test/resources/bsh/reqtags/mbt_startup.bsh rename graphwalker-core/src/test/resources/{xml/multipleB.xml => edgeFilterTest.xml} (64%) delete mode 100644 graphwalker-core/src/test/resources/graphml/ModelBasedTestingTest.testNewState.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/UC01.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/bugs/Issue_10.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/bugs/Issue_9.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/efsm_lables/testMergeEFSM_Lables.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/mergeSubgraphs_01/a.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/mergeSubgraphs_01/b.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/mergeSubgraphs_02/a.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/mergeSubgraphs_02/b.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/merging/Filter.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/merging/Filterval5CD.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/merging/Filterval7CD.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/merging/FiltervalOH.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/merging/FiltervalTH.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/modelWithDescr.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/multiple/A.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/multiple/B.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/multiple/switch/A.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/multiple/switch/A1.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/multiple/switch/B.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/multiple/switch/B1.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/multiple/switch/C.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.eventModel.a.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.1.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.2/a.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.load2Models.2/b.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.A.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.B.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/org.graphwalker.EventDrivenModels.switchModels.C.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/reqtags/ExtendedMain.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/reqtags/execAction.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test01/graph1.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test01/graph2.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test02/graph1.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test02/graph2.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph001.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph002.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph003.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph004.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph005.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph006.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph007.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph008.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph009.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph010.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph011.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph012.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph013.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph014.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph015.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph016.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph017.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph018.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph019.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph020.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph021.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph022.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph023.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph024.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph025.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph026.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph027.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph028.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph029.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph030.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph031.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph032.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph033.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph034.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph035.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph036.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph037.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph038.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph039.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph040.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph041.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph042.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph043.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph044.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph045.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph046.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph047.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph050.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph051.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph052.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph053.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph054.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph055.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph070.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph071.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph072.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph073.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph074.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph075.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph076.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph077.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph078.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph079.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph080.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph081.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph082.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph083.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph084.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph085.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph086.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph087.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph088.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph089.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph092.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph093.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph094.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph095.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph096.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph097.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph098.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph099.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph100.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph101.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph102.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph103.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph104.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph105.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph106.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph107.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph108.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph109.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph110.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph111.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph112.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph113.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph114.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph115.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph116.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph117.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph118.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph119.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph120.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph121.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph122.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph123.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph124.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph125.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph126.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph127.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph128.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph129.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph130.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph131.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph132.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph133.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph134.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph135.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph136.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph137.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph138.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph139.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph140.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph141.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph142.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph143.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph144.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph145.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph146.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph147.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph148.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph149.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph150.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph151.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph152.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph153.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph154.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph155.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph156.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph157.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph158.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph159.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph160.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph161.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph162.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph163.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph164.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph165.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph166.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph167.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph168.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph169.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph170.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph171.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph172.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph173.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph174.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph175.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph176.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph177.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph178.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Graph179.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test03/Start.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test09/B.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test09/C.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test09/Start.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test10/B.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test10/C.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test10/Start.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test11/B.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test11/C.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test11/Start.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test13/B.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test13/C.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test13/Start.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test14/B.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test14/C.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test14/Start.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test15/test15.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test17/test17.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test18/test18.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test19/test19.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test20/test20.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test22/1.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test22/2.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test22/main.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test23/AddressBook.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test23/ContactTapToSelectNumber.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test23/Contacts.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test23/Main.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/test23/SendVCard.graphml delete mode 100644 graphwalker-core/src/test/resources/graphml/weight/FSM.graphml create mode 100644 graphwalker-core/src/test/resources/models/brokenModel.graphml create mode 100644 graphwalker-core/src/test/resources/models/edgeFilterModelA.graphml create mode 100644 graphwalker-core/src/test/resources/models/edgeFilterModelB.graphml create mode 100644 graphwalker-core/src/test/resources/models/edgeFilterModelC.graphml create mode 100644 graphwalker-core/src/test/resources/models/multiModelA.graphml create mode 100644 graphwalker-core/src/test/resources/models/multiModelB.graphml create mode 100644 graphwalker-core/src/test/resources/models/multiModelC.graphml create mode 100644 graphwalker-core/src/test/resources/models/requirementModel.graphml create mode 100644 graphwalker-core/src/test/resources/models/singleModel.graphml rename graphwalker-core/src/test/resources/{xml/multipleA.xml => multiModelTest.xml} (65%) rename graphwalker-core/src/test/resources/{xml/reqCoverage.xml => singleModelTest.xml} (69%) create mode 100644 graphwalker-core/src/test/resources/stopConditionTest.xml delete mode 100644 graphwalker-core/src/test/resources/templates/short.report delete mode 100644 graphwalker-core/src/test/resources/xml/bugs/Issue_10.xml delete mode 100644 graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.eventModel.xml delete mode 100644 graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.1.xml delete mode 100644 graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.load2Models.2.xml delete mode 100644 graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.A.xml delete mode 100644 graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.B.xml delete mode 100644 graphwalker-core/src/test/resources/xml/org.graphwalker.EventDrivenModels.switchModels.C.xml delete mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init.xml delete mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init10.xml delete mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init11.xml delete mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init2.xml delete mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init3.xml delete mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init4.xml delete mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init5.xml delete mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init6.xml delete mode 100644 graphwalker-core/src/test/resources/xml/reqtags/mbt_init7.xml delete mode 100644 graphwalker-core/src/test/resources/xml/switch/A.xml delete mode 100644 graphwalker-core/src/test/resources/xml/switch/B.xml delete mode 100644 graphwalker-core/src/test/resources/xml/switch/C.xml rename graphwalker-core/src/main/java/org/graphwalker/core/events/AppEvent.java => graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapService.java (85%) create mode 100644 graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServiceImpl.java delete mode 100644 graphwalker-webservice/src/main/java/org/graphwalker/webservice/SoapServices.java rename graphwalker-core/src/test/resources/graphml/permutations/simple.graphml => graphwalker-webservice/src/test/resources/models/soapServiceModel.graphml (56%) rename graphwalker-core/src/test/resources/xml/bugs/Issue_9.xml => graphwalker-webservice/src/test/resources/soapServiceTest.xml (69%) diff --git a/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java b/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java index 11933d67..6de11fa2 100644 --- a/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java +++ b/graphwalker-cli/src/main/java/org/graphwalker/cli/CLI.java @@ -26,29 +26,6 @@ package org.graphwalker.cli; -import org.apache.commons.cli.*; -import org.apache.log4j.Logger; -import org.graphwalker.core.Keywords; -import org.graphwalker.core.Keywords.Generator; -import org.graphwalker.core.Keywords.StopCondition; -import org.graphwalker.core.ModelBasedTesting; -import org.graphwalker.core.Util; -import org.graphwalker.core.conditions.AlternativeCondition; -import org.graphwalker.core.exceptions.GeneratorException; -import org.graphwalker.core.exceptions.StopConditionException; -import org.graphwalker.core.io.PrintHTMLTestSequence; -import org.graphwalker.webservice.SoapServices; -import org.jdom.JDOMException; - -import javax.xml.ws.Endpoint; -import java.io.*; -import java.net.InetAddress; -import java.util.Iterator; -import java.util.Map.Entry; -import java.util.Timer; -import java.util.TimerTask; -import java.util.Vector; - /** * Command Line Interface object, to the org.graphwalker package. The object * provides a way of working with MBT using a Windows DOS, or a console window @@ -107,9 +84,9 @@ * *

*
- */ +*/ public class CLI { - +/* public static class VerboseStatisticsLogger extends Thread { private ModelBasedTesting mbt = null; @@ -131,7 +108,7 @@ public void run() { /** *

Constructor for CLI.

- */ + public CLI() { mbt = new ModelBasedTesting(); } @@ -142,7 +119,7 @@ private ModelBasedTesting getMbt() { /** * @param mbt the ModelBasedTesting to set - */ + private void setMbt(ModelBasedTesting mbt) { this.mbt = mbt; } @@ -151,7 +128,7 @@ private void setMbt(ModelBasedTesting mbt) { *

main.

* * @param args an array of {@link java.lang.String} objects. - */ + public static void main(String[] args) { CLI cli = new CLI(); Thread shutDownThread = new CLI.VerboseStatisticsLogger(cli.getMbt()); @@ -222,67 +199,67 @@ private void run(String[] args) { /** * Command: requirements - */ + if (args[0].equalsIgnoreCase("requirements")) { RunCommandRequirements(cl); } /** * Command: online - */ + if (args[0].equalsIgnoreCase("online")) { RunCommandOnline(cl); } /** * Command: offline - */ + else if (args[0].equalsIgnoreCase("offline")) { RunCommandOffline(cl); } /** * Command: methods - */ + else if (args[0].equalsIgnoreCase("methods")) { RunCommandMethods(cl); } /** * Command: merge - */ + else if (args[0].equalsIgnoreCase("merge")) { RunCommandMerge(cl); } /** * Command: source - */ + else if (args[0].equalsIgnoreCase("source")) { RunCommandSource(cl); } /** * Command: xml - */ + else if (args[0].equalsIgnoreCase("xml")) { RunCommandXml(cl); } /** * Command: soap - */ + else if (args[0].equalsIgnoreCase("soap")) { RunCommandSoap(cl); } /** * Command: gui - */ + //else if (args[0].equalsIgnoreCase("gui")) { // RunCommandGui(cl); //} /** * Command: log - */ + //else if (args[0].equalsIgnoreCase("log")) { // RunCommandLog(cl); //} /** * Command: manual - */ + else if (args[0].equalsIgnoreCase("manual")) { RunCommandManual(cl); } @@ -480,8 +457,7 @@ private void buildOnlineCLI() { /** * Build the command offline command line parser - */ - @SuppressWarnings("static-access") + private void buildOfflineCLI() { opt.addOption("a", false, "Prints the statistics of the test, at the end of the run."); opt.addOption("x", false, "Use an extended finite state machine to handle the model."); @@ -521,8 +497,7 @@ private void buildOfflineCLI() { /** * Build the command manual command line parser - */ - @SuppressWarnings("static-access") + private void buildManualCLI() { opt.addOption("x", false, "Use an extended finite state machine to handle the model."); opt.addOption("j", false, "Enable JavaScript engine"); @@ -559,8 +534,7 @@ private void buildMethodsCLI() { /** * Build the command merge command line parser - */ - @SuppressWarnings("static-access") + private void buildMergeCLI() { opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") .withDescription("The file (or folder) containing graphml formatted files.").hasArg().withLongOpt("input_graphml").create("f")); @@ -569,8 +543,7 @@ private void buildMergeCLI() { /** * Build the command source command line parser - */ - @SuppressWarnings("static-access") + private void buildSourceCLI() { opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") .withDescription("The file (or folder) containing graphml formatted files.").hasArg().withLongOpt("input_graphml").create("f")); @@ -580,8 +553,7 @@ private void buildSourceCLI() { /** * Build the command xml command line parser - */ - @SuppressWarnings("static-access") + private void buildXmlCLI() { opt.addOption("a", false, "Prints the statistics of the test, at the end of the run."); opt.addOption(OptionBuilder.isRequired().withArgName("file").withDescription("The xml file containing the mbt settings.").hasArg() @@ -596,8 +568,7 @@ private void buildXmlCLI() { /** * Build the command soap command line parser - */ - @SuppressWarnings("static-access") + private void buildSoapCLI() { opt.addOption(OptionBuilder.withArgName("file").withDescription("The xml file containing the mbt model and settings.").hasArg() .create("f")); @@ -610,16 +581,14 @@ private void buildSoapCLI() { /** * Build the command gui command line parser - */ - @SuppressWarnings("static-access") + private void buildGuiCLI() { opt.addOption(OptionBuilder.withArgName("file").withDescription("The xml file containing the mbt settings.").hasArg().create("f")); } /** * Build the command log command line parser - */ - @SuppressWarnings("static-access") + private void buildLogCLI() { opt.addOption(OptionBuilder.isRequired().withArgName("file|folder") .withDescription("The file (or folder) containing graphml formatted files.").hasArg().withLongOpt("input_graphml").create("f")); @@ -628,7 +597,7 @@ private void buildLogCLI() { /** * Print version information - */ + private void printVersionInformation() { System.out.println("org.graphwalker version " + mbt.getVersionString() + "\n"); System.out.println("org.graphwalker is open source software licensed under MIT licens"); @@ -645,12 +614,12 @@ private void printVersionInformation() { * @throws GeneratorException * @throws InterruptedException * @throws FileNotFoundException - */ + private void RunCommandOffline(CommandLine cl) throws StopConditionException, GeneratorException, InterruptedException, FileNotFoundException { /** * Get the model from the graphml file (or folder) - */ + if (helpNeeded("offline", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") || helpNeeded("offline", !cl.hasOption("s"), "A stop condition must be supplied, See option -s") || helpNeeded("offline", cl.hasOption("t") && !cl.hasOption("r"), @@ -667,8 +636,8 @@ private void RunCommandOffline(CommandLine cl) throws StopConditionException, Ge /* * Set the stop-conditions(s) - */ - AlternativeCondition alternativeCondition = new AlternativeCondition(); + + Any alternativeCondition = new Any(); String[] stopConditions = cl.getOptionValue("s").split("\\|"); for (String stopCondition : stopConditions) { String[] sc = stopCondition.trim().split(":"); @@ -680,7 +649,6 @@ private void RunCommandOffline(CommandLine cl) throws StopConditionException, Ge /* * Set the generators(s) - */ String[] generators = cl.getOptionValue("g").split("\\|"); for (String genrator : generators) { getMbt().setGenerator(Keywords.getGenerator(genrator.trim())); @@ -741,11 +709,10 @@ public void run() { * @throws StopConditionException * @throws GeneratorException * @throws InterruptedException - */ private void RunCommandManual(CommandLine cl) throws StopConditionException, GeneratorException, InterruptedException { /** * Get the model from the graphml file (or folder) - */ + if (helpNeeded("manual", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") || helpNeeded("manual", !cl.hasOption("s"), "A stop condition must be supplied, See option -s") || helpNeeded("manual", !cl.hasOption("g"), "Missing the generator, See option -g")) @@ -757,10 +724,8 @@ private void RunCommandManual(CommandLine cl) throws StopConditionException, Gen getMbt().enableExtended(cl.hasOption("x")); getMbt().setWeighted(cl.hasOption("w")); - /* - * Set the stop-conditions(s) - */ - AlternativeCondition alternativeCondition = new AlternativeCondition(); + + Any alternativeCondition = new Any(); String[] stopConditions = cl.getOptionValue("s").split("\\|"); for (String stopCondition : stopConditions) { String[] sc = stopCondition.trim().split(":"); @@ -770,9 +735,7 @@ private void RunCommandManual(CommandLine cl) throws StopConditionException, Gen // parameter } - /* - * Set the generators(s) - */ + String[] generators = cl.getOptionValue("g").split("\\|"); for (String genrator : generators) { getMbt().setGenerator(Keywords.getGenerator(genrator.trim())); @@ -785,7 +748,6 @@ private void RunCommandManual(CommandLine cl) throws StopConditionException, Gen new PrintHTMLTestSequence(testSequence, System.out); } - /** * Run the online command * * @param cl @@ -793,12 +755,14 @@ private void RunCommandManual(CommandLine cl) throws StopConditionException, Gen * @throws GeneratorException * @throws InterruptedException * @throws FileNotFoundException - */ + private void RunCommandOnline(CommandLine cl) throws StopConditionException, GeneratorException, InterruptedException, FileNotFoundException { + */ /** * Get the model from the graphml file (or folder) */ + /* if (helpNeeded("online", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") || helpNeeded("online", !cl.hasOption("s"), "A stop condition must be supplied, See option -s") || helpNeeded("online", cl.hasOption("t") && !cl.hasOption("r"), @@ -813,10 +777,9 @@ private void RunCommandOnline(CommandLine cl) throws StopConditionException, Gen getMbt().enableExtended(cl.hasOption("x")); getMbt().setWeighted(cl.hasOption("w")); - /* * Set the stop-conditions(s) - */ - AlternativeCondition alternativeCondition = new AlternativeCondition(); + + Any alternativeCondition = new Any(); String[] stopConditions = cl.getOptionValue("s").split("\\|"); for (String stopCondition : stopConditions) { String[] sc = stopCondition.trim().split(":"); @@ -826,18 +789,16 @@ private void RunCommandOnline(CommandLine cl) throws StopConditionException, Gen // parameter } - /* * Set the generators(s) - */ + String[] genrators = cl.getOptionValue("g").split("\\|"); for (String genrator : genrators) { getMbt().setGenerator(Keywords.getGenerator(genrator.trim())); } getMbt().getGenerator().setStopCondition(alternativeCondition); - /** * Set dry-run - */ + getMbt().setDryRun(cl.hasOption("d")); if (cl.hasOption("o")) { @@ -897,14 +858,13 @@ private void writeStatisticsVerbose(PrintStream out) { out.println(getMbt().getStatisticsVerbose()); } - /** * Run the source command * * @param cl * @throws GeneratorException * @throws IOException * @throws InterruptedException - */ + private void RunCommandSource(CommandLine cl) throws GeneratorException, IOException, InterruptedException { if (helpNeeded("source", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") || helpNeeded("source", !cl.hasOption("t"), "Missing the template file. See -t (--template)")) @@ -916,13 +876,12 @@ private void RunCommandSource(CommandLine cl) throws GeneratorException, IOExcep getMbt().writePath(System.out); } - /** * Run the requirements command This method prints out all the Requirements * found in the graph. * * @throws GeneratorException * @throws InterruptedException - */ + private void RunCommandRequirements(CommandLine cl) throws GeneratorException, InterruptedException { if (helpNeeded("requirements", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)")) return; @@ -937,13 +896,12 @@ private void RunCommandRequirements(CommandLine cl) throws GeneratorException, I } } - /** * Run the methods command * * @param cl * @throws GeneratorException * @throws InterruptedException - */ + private void RunCommandMethods(CommandLine cl) throws GeneratorException, InterruptedException { if (helpNeeded("methods", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)")) return; @@ -954,11 +912,10 @@ private void RunCommandMethods(CommandLine cl) throws GeneratorException, Interr getMbt().writePath(System.out); } - /** * Run the merge command * * @param cl - */ + private void RunCommandMerge(CommandLine cl) { if (helpNeeded("merge", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)")) return; @@ -967,7 +924,6 @@ private void RunCommandMerge(CommandLine cl) { getMbt().writeModel(System.out, !cl.hasOption("i")); } - /** * Run the xml command * * @param cl @@ -976,7 +932,7 @@ private void RunCommandMerge(CommandLine cl) { * @throws IOException * @throws JDOMException * @throws InterruptedException - */ + private void RunCommandXml(CommandLine cl) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { if (helpNeeded("xml", !cl.hasOption("f"), "Missing the input xml file, See option -f")) @@ -990,7 +946,6 @@ private void RunCommandXml(CommandLine cl) throws StopConditionException, Genera } } - /** * Run the soap command * * @param cl @@ -999,7 +954,7 @@ private void RunCommandXml(CommandLine cl) throws StopConditionException, Genera * @throws IOException * @throws JDOMException * @throws InterruptedException - */ + private void RunCommandSoap(CommandLine cl) throws StopConditionException, GeneratorException, IOException, JDOMException, InterruptedException { String port = null; @@ -1024,7 +979,7 @@ private void RunCommandSoap(CommandLine cl) throws StopConditionException, Gener } String wsURL = "http://" + nicAddr + ":" + port + "/mbt-services"; - SoapServices soapService = new SoapServices(getMbt()); + SoapServiceImpl soapService = new SoapServiceImpl(getMbt()); soapService.xmlFile = file; endpoint = Endpoint.publish(wsURL, soapService); @@ -1038,13 +993,11 @@ private void RunCommandSoap(CommandLine cl) throws StopConditionException, Gener System.out.println(""); } - /** * Run the gui command * * @param cl * @throws IOException - */ - /* + private void RunCommandGui(CommandLine cl) throws IOException { if (cl.hasOption("f")) { App.main(new String[] { cl.getOptionValue("f") }); @@ -1052,15 +1005,12 @@ private void RunCommandGui(CommandLine cl) throws IOException { App.main(); } } - */ - /** * Run the log command * * @param cl * @throws IOException - */ - /* + private void RunCommandLog(CommandLine cl) throws IOException { if (helpNeeded("log", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") || helpNeeded("log", !cl.hasOption("l"), "Missing the log file. See -l")) @@ -1068,8 +1018,7 @@ private void RunCommandLog(CommandLine cl) throws IOException { App.main(new String[] { cl.getOptionValue("f"), cl.getOptionValue("l") }); } - */ - /* + private void RunCommandLog(CommandLine cl) throws IOException { if (helpNeeded("log", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") || helpNeeded("log", !cl.hasOption("l"), "Missing the log file. See -l")) @@ -1077,8 +1026,7 @@ private void RunCommandLog(CommandLine cl) throws IOException { App.main(new String[] { cl.getOptionValue("f"), cl.getOptionValue("l") }); } - */ - /* + private void RunCommandLog(CommandLine cl) throws IOException { if (helpNeeded("log", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") || helpNeeded("log", !cl.hasOption("l"), "Missing the log file. See -l")) @@ -1086,8 +1034,7 @@ private void RunCommandLog(CommandLine cl) throws IOException { App.main(new String[] { cl.getOptionValue("f"), cl.getOptionValue("l") }); } - */ - /* + private void RunCommandLog(CommandLine cl) throws IOException { if (helpNeeded("log", !cl.hasOption("f"), "Missing the input graphml file (folder), See -f (--input_graphml)") || helpNeeded("log", !cl.hasOption("l"), "Missing the log file. See -l")) @@ -1095,7 +1042,7 @@ private void RunCommandLog(CommandLine cl) throws IOException { App.main(new String[] { cl.getOptionValue("f"), cl.getOptionValue("l") }); } - */ + private boolean helpNeeded(String module, boolean condition, String message) { if (condition) { System.out.println(message); @@ -1107,4 +1054,5 @@ private boolean helpNeeded(String module, boolean condition, String message) { private Endpoint GetEndpoint() { return endpoint; } + */ } diff --git a/graphwalker-cli/src/test/java/org/graphwalker/cli/CLITest.java b/graphwalker-cli/src/test/java/org/graphwalker/cli/CLITest.java deleted file mode 100644 index 73081d28..00000000 --- a/graphwalker-cli/src/test/java/org/graphwalker/cli/CLITest.java +++ /dev/null @@ -1,439 +0,0 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.cli; - -import junit.framework.TestCase; -import org.apache.log4j.Logger; -import org.graphwalker.core.ModelBasedTesting; -import org.graphwalker.core.Util; - -import java.io.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class CLITest extends TestCase { - - Pattern pattern; - Matcher matcher; - StringBuffer stdOutput; - StringBuffer errOutput; - String outMsg; - String errMsg; - static Logger logger = Util.setupLogger(CLITest.class); - - @Override - protected void setUp() throws Exception { - super.setUp(); - ModelBasedTesting.getInstance().reset(); - } - - private OutputStream redirectOut() { - return new OutputStream() { - @Override - public void write(int b) throws IOException { - stdOutput.append(Character.toString((char) b)); - } - }; - } - - private OutputStream redirectErr() { - return new OutputStream() { - @Override - public void write(int b) throws IOException { - errOutput.append(Character.toString((char) b)); - } - }; - } - - private InputStream redirectIn() { - return new InputStream() { - @Override - public int read() throws IOException { - try { - Thread.sleep(300); - } catch (InterruptedException e) { - Util.logStackTraceToError(e); - } - return '0'; - } - }; - } - - private void runCommand(String args[]) { - stdOutput = new StringBuffer(); - errOutput = new StringBuffer(); - - PrintStream outStream = new PrintStream(redirectOut()); - PrintStream oldOutStream = System.out; // backup - PrintStream errStream = new PrintStream(redirectErr()); - PrintStream oldErrStream = System.err; // backup - - System.setOut(outStream); - System.setErr(errStream); - - CLI.main(args); - - System.setOut(oldOutStream); - System.setErr(oldErrStream); - - outMsg = stdOutput.toString(); - errMsg = errOutput.toString(); - logger.debug("stdout: " + outMsg); - logger.debug("stderr: " + errMsg); - } - - private void moveMbtPropertiesFile() { - File mbt_properties = new File("graphwalker.properties"); - if (mbt_properties.exists()) { - mbt_properties.renameTo(new File("graphwalker.properties.bak")); - } - assertFalse(new File("graphwalker.properties").exists()); - } - - private void restoreMbtPropertiesFile() { - File mbt_properties = new File("graphwalker.properties.bak"); - if (mbt_properties.exists()) { - mbt_properties.renameTo(new File("graphwalker.properties")); - } - assertFalse(new File("graphwalker.properties.bak").exists()); - } - - /** - * Test command: java -jar mbt.jar - */ - public void testNoArgs() { - String args[] = {}; - runCommand(args); - pattern = Pattern.compile("Type 'java -jar graphwalker.jar help' for usage.", Pattern.MULTILINE); - matcher = pattern.matcher(errMsg); - assertTrue(matcher.find()); - assertTrue("Nothing should be written to standard output: " + outMsg, outMsg.isEmpty()); - } - - /** - * Test command: java -jar mbt.jar -v - */ - public void testVersion() { - String args[] = {"-v"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - pattern = Pattern.compile("^org\\.graphwalker version " + ModelBasedTesting.getInstance().getVersionString(), Pattern.MULTILINE); - matcher = pattern.matcher(outMsg); - assertTrue(matcher.find()); - } - - /** - * Test command: java -jar mbt.jar - */ - public void testNoMbtPropertiesFile() { - String args[] = {}; - moveMbtPropertiesFile(); - runCommand(args); - restoreMbtPropertiesFile(); - pattern = Pattern.compile("Type 'java -jar graphwalker.jar help' for usage.", Pattern.MULTILINE); - matcher = pattern.matcher(errMsg); - assertTrue(matcher.find()); - assertTrue("Nothing should be written to standard output: " + outMsg, outMsg.isEmpty()); - } - - /** - * Test command: java -jar mbt.jar offline -f - * graphml/reqtags/ExtendedMain.graphml -g RANDOM -s TEST_LENGTH:10 - */ - public void testNoMbtPropertiesFileOffline() { - String args[] = {"offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "RANDOM", "-s", "TEST_LENGTH:10"}; - moveMbtPropertiesFile(); - runCommand(args); - restoreMbtPropertiesFile(); - System.out.println(errMsg); - assertEquals("No error messages should occur.", "", errMsg); - assertEquals(0, getNumMatches(Pattern.compile("INFO").matcher(outMsg))); - } - - /** - * Test command: java -jar mbt.jar sputnik - */ - public void testUnkownCommand() { - String args[] = {"sputnik"}; - runCommand(args); - pattern = Pattern.compile("^Unkown command: .*\\s+", Pattern.MULTILINE); - matcher = pattern.matcher(errMsg); - assertTrue(matcher.find()); - assertTrue("Nothing should be written to standard output: " + outMsg, outMsg.isEmpty()); - } - - /** - * Test command: java -jar mbt.jar offline -f - * graphml/reqtags/ExtendedMain.graphml -g A_STAR -s EDGE_COVERAGE:100 - */ - public void testOfflineA_StarEdgeCoverage() { - String args[] = {"offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "A_STAR", "-s", "EDGE_COVERAGE:100"}; - runCommand(args); - assertEquals(errMsg, "", errMsg); - assertEquals(outMsg, 0, getNumMatches(Pattern.compile("INFO").matcher(outMsg))); - } - - private int getNumMatches(Matcher m) { - int numMatches = 0; - while (m.find() == true) - numMatches++; - return numMatches; - } - - /** - * Test command: java -jar mbt.jar offline -f - * graphml/reqtags/ExtendedMain.graphml -g RANDOM -s EDGE_COVERAGE:100 - */ - public void testOfflineRandomEdgeCoverage() { - String args[] = {"offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "RANDOM", "-s", "EDGE_COVERAGE:100"}; - runCommand(args); - assertTrue("No error messgaes should occur: " + errMsg, errMsg.isEmpty()); - assertTrue("Expected at least 78 lines, got: " + outMsg.split("\r\n|\r|\n").length, outMsg.split("\r\n|\r|\n").length >= 78); - } - - /** - * Test command: java -jar mbt.jar offline -f - * graphml/reqtags/ExtendedMain.graphml -g RANDOM -s VERTEX_COVERAGE:100 - */ - public void testOfflineRandomStateCoverage() { - String args[] = {"offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "RANDOM", "-s", "VERTEX_COVERAGE:100"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - assertTrue("Expected at least 24 lines, got: " + outMsg.split("\r\n|\r|\n").length, outMsg.split("\r\n|\r|\n").length >= 24); - } - - /** - * Test command: java -jar mbt.jar offline -f - * graphml/reqtags/ExtendedMain.graphml -g A_STAR -s VERTEX_COVERAGE:100 - */ - public void testOfflineA_StarStateCoverage() { - String args[] = {"offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "A_STAR", "-s", "VERTEX_COVERAGE:100"}; - runCommand(args); - assertEquals("No error messages should occur.", "", errMsg); - assertTrue(outMsg, getNumMatches(Pattern.compile("INFO").matcher(outMsg)) <= 21); - } - - /** - * Test command: java -jar mbt.jar offline -f - * graphml/reqtags/ExtendedMain.graphml -g a_star -s "REACHED_REQUIREMENT:req - * 78 - */ - public void testOfflineA_StarReachedRequirement() { - String args[] = {"offline", "-f", "graphml/reqtags/ExtendedMain.graphml", "-g", "a_star", "-s", "REACHED_REQUIREMENT:req 78"}; - runCommand(args); - assertEquals("No error messages should occur.", "", errMsg); - assertEquals(0, getNumMatches(Pattern.compile("INFO").matcher(outMsg))); - } - - /** - * Test command: java -jar mbt.jar requirements -f - * graphml/reqtags/ExtendedMain.graphml - */ - public void testListReqTags() { - String args[] = {"requirements", "-f", "graphml/reqtags/ExtendedMain.graphml"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - assertEquals(6, getNumMatches(Pattern.compile("req[ \\d]+").matcher(outMsg))); - } - - /** - * Test command: java -jar mbt.jar source -f graphml/methods/Main.graphml -t - * templates/perl.template - */ - public void testGenerateCodeFromTemplateHeaderAndFooter() { - String args[] = {"source", "-f", "graphml/methods/Main.graphml", "-t", "templates/junit.template"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - pattern = Pattern.compile(" implements the ", Pattern.MULTILINE); - matcher = pattern.matcher(outMsg); - assertTrue(matcher.find()); - } - - /** - * Test command: java -jar mbt.jar source -f graphml/methods/Main.graphml -t - * templates/perl.template - */ - public void testGenerateCodeFromTemplate() { - String args[] = {"source", "-f", "graphml/methods/Main.graphml", "-t", "templates/perl.template"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - pattern = Pattern.compile(" implements the ", Pattern.MULTILINE); - matcher = pattern.matcher(outMsg); - assertTrue(matcher.find()); - } - - /** - * Test command: java -jar mbt.jar offline -f - * graphml/misc/missing_inedges.graphml -g RANDOM -s EDGE_COVERAGE:100 - */ - public void testNoVerticesWithNoInEdges() { - String args[] = {"offline", "-f", "graphml/misc/missing_inedges.graphml", "-g", "RANDOM", "-s", "EDGE_COVERAGE:100"}; - runCommand(args); - pattern = Pattern.compile("^No in-edges! Vertex: .* is not reachable, from file: 'graphml.misc.missing_inedges.graphml'$", - Pattern.MULTILINE); - matcher = pattern.matcher(errMsg); - assertTrue(matcher.find()); - } - - /** - * Test command: java -jar mbt.jar offline -f - * graphml/misc/missing_inedges.graphml -g RANDOM -s EDGE_COVERAGE:100 - */ - public void testVertexWithNoInEdges() { - String args[] = {"offline", "-f", "graphml/misc/missing_inedges.graphml", "-g", "RANDOM", "-s", "EDGE_COVERAGE:100"}; - runCommand(args); - pattern = Pattern.compile("No in-edges! Vertex: 'v_InvalidKey', INDEX=9 is not reachable.", Pattern.MULTILINE); - matcher = pattern.matcher(errMsg); - assertTrue(matcher.find()); - } - - /** - * Test command: java -jar mbt.jar online -f graphml/methods/Main.graphml -g - * RANDOM -s TEST_DURATION:10 - */ - public void testOnlineRandom10seconds() { - String args[] = {"online", "-f", "graphml/methods/Main.graphml", "-g", "RANDOM", "-s", "TEST_DURATION:10", "-o", "1"}; - InputStream oldInputStream = System.in; // backup - System.setIn(redirectIn()); - long startTime = System.currentTimeMillis(); - runCommand(args); - long runTime = System.currentTimeMillis() - startTime; - System.setIn(oldInputStream); - assertEquals("No error messages should occur.", "", errMsg); - assertTrue((runTime - 10000) < 3000); - } - - /** - * Test command: java -jar mbt.jar methods -f graphml/methods/Main.graphml - */ - public void testCountMethods() { - String args[] = {"methods", "-f", "graphml/methods/Main.graphml"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - pattern = Pattern - .compile( - "e_Cancel\\s+e_CloseApp\\s+e_CloseDB\\s+e_CloseDialog\\s+e_EnterCorrectKey\\s+e_EnterInvalidKey\\s+e_Initialize\\s+e_No\\s+e_Start\\s+e_StartWithDatabase\\s+e_Yes\\s+v_EnterMasterCompositeMasterKey\\s+v_InvalidKey\\s+v_KeePassNotRunning\\s+v_MainWindowEmpty\\s+v_MainWindow_DB_Loaded\\s+v_SaveBeforeCloseLock", - Pattern.MULTILINE); - matcher = pattern.matcher(outMsg); - assertTrue(matcher.find()); - } - - /** - * Check for reserved keywords Test command: java -jar mbt.jar methods -f - * graphml/test24 - */ - public void testReservedKeywords() { - String args[] = {"methods", "-f", "graphml/test24"}; - runCommand(args); - pattern = Pattern.compile( - "Could not parse file: '.*graphml.test24.(Camera|Time).graphml'. Edge has a label 'BACKTRACK', which is a reserved keyword", - Pattern.MULTILINE); - matcher = pattern.matcher(errMsg); - System.out.println(errMsg); - assertTrue(matcher.find()); - } - - /** - * Check for reserved keywords Test command: java -jar mbt.jar xml -f - * xml/reqtags/mbt_init6.xml - */ - public void testXmlSetup() { - String args[] = {"xml", "-f", "xml/reqtags/mbt_init6.xml"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - assertEquals(6, getNumMatches(Pattern.compile("req[ \\d]+").matcher(outMsg))); - } - - /** - * Check that xml with java executor. Test command: java -jar mbt.jar xml -f - * xml/reqtags/mbt_init5.xml - */ - public void testXmlSetupWithJavaExecutor() { - String args[] = {"xml", "-f", "xml/javaExecutor.xml"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - assertEquals(outMsg, 76, getNumMatches(Pattern.compile("(Vertex:|Edge:)").matcher(outMsg))); - } - - /** - * Test command: java -jar mbt.jar soap -f xml/reqtags/mbt_init6.xml - */ - public void testSOAPWithXML() { - String args[] = {"soap", "-f", "xml/reqtags/mbt_init6.xml"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - assertTrue( - outMsg, - outMsg - .matches("(?s).*Now running as a SOAP server. For the WSDL file, see: http://.*:9090/mbt-services\\?WSDL\\s+Press Ctrl\\+C to quit\\s+")); - } - - /** - * Test command: java -jar mbt.jar soap - */ - public void testSOAPWithoutXML() { - String args[] = {"soap"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - assertEquals( - true, - outMsg - .matches("Now running as a SOAP server. For the WSDL file, see: http://.*:9090/mbt-services\\?WSDL\\s+Press Ctrl\\+C to quit\\s+")); - } - - /** - * Test command: java -jar mbt.jar soap -f xml/reqtags/mbt_init6.xml - */ - public void testSOAPWithCorrectClassPathInXML() { - String args[] = {"soap", "-f", "xml/reqtags/mbt_init8.xml"}; - runCommand(args); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - assertTrue( - outMsg, - outMsg - .matches("(?s).*Now running as a SOAP server. For the WSDL file, see: http://.*:9090/mbt-services\\?WSDL\\s+Press Ctrl\\+C to quit\\s+")); - } - - /** - * Test command: java -jar mbt.jar soap -f xml/reqtags/mbt_init9.xml - */ - public void testSOAPWithIncorrectClassPathInXML() { - String args[] = {"soap", "-f", "xml/reqtags/mbt_init9.xml"}; - runCommand(args); - assertTrue(errMsg, errMsg.matches("(?s).*Could not add: 'non-existing-path' to CLASSPATH.*")); - } - - /** - * Test command: java -jar mbt.jar xml -f xml/ReachedVertex.xml - */ - public void testReachedVertexXML() { - String args[] = {"xml", "-f", "xml/ReachedVertex.xml"}; - runCommand(args); - System.out.println(errMsg); - assertTrue("No error messages should occur: " + errMsg, errMsg.isEmpty()); - } -} diff --git a/graphwalker-cli/src/test/java/org/graphwalker/cli/ExtendedMain.java b/graphwalker-cli/src/test/java/org/graphwalker/cli/ExtendedMain.java deleted file mode 100644 index df791ff2..00000000 --- a/graphwalker-cli/src/test/java/org/graphwalker/cli/ExtendedMain.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -/** - * - */ -package org.graphwalker.cli; - -/** - *

ExtendedMain class.

- */ -public class ExtendedMain { - /** - * This method implements the Edge 'e_Cancel' - */ - public void e_Cancel() { - System.out.println("Edge: e_Cancel"); - } - - /** - * This method implements the Edge 'e_ChangeDatabase' - */ - public void e_ChangeDatabase() { - System.out.println("Edge: e_ChangeDatabase"); - } - - /** - * This method implements the Edge 'e_CloseApp' - */ - public void e_CloseApp() { - System.out.println("Edge: e_CloseApp"); - } - - /** - * This method implements the Edge 'e_CloseDB' - */ - public void e_CloseDB() { - System.out.println("Edge: e_CloseDB"); - } - - /** - * This method implements the Edge 'e_CloseDialog' - */ - public void e_CloseDialog() { - System.out.println("Edge: e_CloseDialog"); - } - - /** - * This method implements the Edge 'e_EnterCorrectKey' - */ - public void e_EnterCorrectKey() { - System.out.println("Edge: e_EnterCorrectKey"); - } - - /** - * This method implements the Edge 'e_EnterInvalidKey' - */ - public void e_EnterInvalidKey() { - System.out.println("Edge: e_EnterInvalidKey"); - } - - /** - * This method implements the Edge 'e_Initialize' - */ - public void e_Initialize() { - System.out.println("Edge: e_Initialize"); - } - - /** - * This method implements the Edge 'e_No' - */ - public void e_No() { - System.out.println("Edge: e_No"); - } - - /** - * This method implements the Edge 'e_Start' - */ - public void e_Start() { - System.out.println("Edge: e_Start"); - } - - /** - * This method implements the Edge 'e_StartWithDatabase' - */ - public void e_StartWithDatabase() { - System.out.println("Edge: e_StartWithDatabase"); - } - - /** - * This method implements the Edge 'e_Yes' - */ - public void e_Yes() { - System.out.println("Edge: e_Yes"); - } - - /** - * This method implements the Vertex 'v_EnterMasterCompositeMasterKey' - */ - public void v_EnterMasterCompositeMasterKey() { - System.out.println("Vertex: v_EnterMasterCompositeMasterKey"); - } - - /** - * This method implements the Vertex 'v_InvalidKey' - */ - public void v_InvalidKey() { - System.out.println("Vertex: v_InvalidKey"); - } - - /** - * This method implements the Vertex 'v_KeePassNotRunning' - */ - public void v_KeePassNotRunning() { - System.out.println("Vertex: v_KeePassNotRunning"); - } - - /** - * This method implements the Vertex 'v_MainWindowEmpty' - */ - public void v_MainWindowEmpty() { - System.out.println("Vertex: v_MainWindowEmpty"); - } - - /** - * This method implements the Vertex 'v_MainWindow_DB_Loaded' - */ - public void v_MainWindow_DB_Loaded() { - System.out.println("Vertex: v_MainWindow_DB_Loaded"); - } - - /** - * This method implements the Vertex 'v_SaveBeforeCloseLock' - */ - public void v_SaveBeforeCloseLock() { - System.out.println("Vertex: v_SaveBeforeCloseLock"); - } -} diff --git a/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_10.java b/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_10.java deleted file mode 100644 index e35b60e5..00000000 --- a/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_10.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.cli.bugs; - -import junit.framework.TestCase; -import org.apache.log4j.Logger; -import org.graphwalker.cli.CLI; -import org.graphwalker.cli.CLITest; -import org.graphwalker.core.ModelBasedTesting; -import org.graphwalker.core.Util; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintStream; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class Issue_10 extends TestCase { - - Pattern pattern; - Matcher matcher; - StringBuffer stdOutput; - StringBuffer errOutput; - String outMsg; - String errMsg; - static Logger logger = Util.setupLogger(CLITest.class); - - @Override - protected void setUp() throws Exception { - super.setUp(); - ModelBasedTesting.getInstance().reset(); - } - - private OutputStream redirectOut() { - return new OutputStream() { - @Override - public void write(int b) throws IOException { - // Redirect to nothing, else we'll get an OutOfMemoryException - // stdOutput.append( Character.toString((char) b) ); - } - }; - } - - private OutputStream redirectErr() { - return new OutputStream() { - @Override - public void write(int b) throws IOException { - errOutput.append(Character.toString((char) b)); - } - }; - } - - private void runCommand(String args[]) { - stdOutput = new StringBuffer(); - errOutput = new StringBuffer(); - - PrintStream outStream = new PrintStream(redirectOut()); - PrintStream oldOutStream = System.out; // backup - PrintStream errStream = new PrintStream(redirectErr()); - PrintStream oldErrStream = System.err; // backup - - System.setOut(outStream); - System.setErr(errStream); - - CLI.main(args); - - System.setOut(oldOutStream); - System.setErr(oldErrStream); - - outMsg = stdOutput.toString(); - errMsg = errOutput.toString(); - logger.debug("stdout: " + outMsg); - logger.debug("stderr: " + errMsg); - } - - // - public void testIssue_10() { - String args[] = {"xml", "-f", "xml/bugs/Issue_10.xml"}; - runCommand(args); - assertTrue(errMsg, errMsg.isEmpty()); - } -} diff --git a/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_9.java b/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_9.java deleted file mode 100644 index 458ea435..00000000 --- a/graphwalker-cli/src/test/java/org/graphwalker/cli/bugs/Issue_9.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.cli.bugs; - -import junit.framework.TestCase; -import org.apache.log4j.Logger; -import org.graphwalker.cli.CLI; -import org.graphwalker.cli.CLITest; -import org.graphwalker.core.ModelBasedTesting; -import org.graphwalker.core.Util; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintStream; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class Issue_9 extends TestCase { - - Pattern pattern; - Matcher matcher; - StringBuffer stdOutput; - StringBuffer errOutput; - String outMsg; - String errMsg; - static Logger logger = Util.setupLogger(CLITest.class); - - @Override - protected void setUp() throws Exception { - super.setUp(); - ModelBasedTesting.getInstance().reset(); - } - - private OutputStream redirectOut() { - return new OutputStream() { - @Override - public void write(int b) throws IOException { - // Redirect to nothing, else we'll get an OutOfMemoryException - // stdOutput.append( Character.toString((char) b) ); - } - }; - } - - private OutputStream redirectErr() { - return new OutputStream() { - @Override - public void write(int b) throws IOException { - errOutput.append(Character.toString((char) b)); - } - }; - } - - private void runCommand(String args[]) { - stdOutput = new StringBuffer(); - errOutput = new StringBuffer(); - - PrintStream outStream = new PrintStream(redirectOut()); - PrintStream oldOutStream = System.out; // backup - PrintStream errStream = new PrintStream(redirectErr()); - PrintStream oldErrStream = System.err; // backup - - System.setOut(outStream); - System.setErr(errStream); - - CLI.main(args); - - System.setOut(oldOutStream); - System.setErr(oldErrStream); - - outMsg = stdOutput.toString(); - errMsg = errOutput.toString(); - logger.debug("stdout: " + outMsg); - logger.debug("stderr: " + errMsg); - } - - // Test will excute during 35 seconds - public void testIssue_9() { - System.out.println("Test will excute during 35 seconds"); - String args[] = {"xml", "-f", "xml/bugs/Issue_9.xml"}; - runCommand(args); - assertTrue(errMsg, errMsg.isEmpty()); - } -} diff --git a/graphwalker-cli/src/test/resources/graphml/UC01.graphml b/graphwalker-cli/src/test/resources/graphml/UC01.graphml deleted file mode 100644 index 96f6d8f6..00000000 --- a/graphwalker-cli/src/test/resources/graphml/UC01.graphml +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_BrowserStarted - - - - - - - - - - - - - v_BaseURL -REQTAG=UC01 2.2.1 - - - - - - - - - - - - - v_SearchResult -REQTAG=UC01 2.2.2 - - - - - - - - - - - - - v_BrowserStopped - - - - - - - - - - - - - v_BookInformation -REQTAG=UC01 2.2.3 - - - - - - - - - - - - - v_OtherBoughtBooks - - - - - - - - - - - - - v_ShoppingCart -REQTAG=UC01 2.3 - - - - - - - - - - - - - e_init / num_of_books = 0; MAX_BOOKS = 5; - - - - - - - - - - - - e_EnterBaseURL - - - - - - - - - - - - e_SearchBook - - - - - - - - - - - - e_StartBrowser - - - - - - - - - - - - e_ClickBook - - - - - - - - - - - - - - - e_AddBookToCart [num_of_books<=MAX_BOOKS] / num_of_books++; - - - - - - - - - - - - - - - - - e_ShoppingCart - - - - - - - - - - - - - - - e_ShoppingCart - - - - - - - - - - - - - - - - - e_ShoppingCart - - - - - - - - - - - - - - - - - e_SearchBook - - - - - - - - - - - - - - - - - e_SearchBook - - - - - - - - - - - - - - - - - e_SearchBook - - - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/methods/ExtendedMain.graphml b/graphwalker-cli/src/test/resources/graphml/methods/ExtendedMain.graphml deleted file mode 100644 index 4ea8af8d..00000000 --- a/graphwalker-cli/src/test/resources/graphml/methods/ExtendedMain.graphml +++ /dev/null @@ -1,412 +0,0 @@ - - - - - - - - - - - - - - - Start - - - - - - - - - - - - v_KeePassNotRunning - - - - - - - - - - - - v_MainWindowEmpty - - - - - - - - - - - - v_EnterMasterCompositeMasterKey - - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - - v_MainWindow_DB_Loaded - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - e_Initialize / incorrect=0; databaseChanged=false - - - - - - - - - - - - - - - - - e_Start - - - - - - - - - - - - - - - e_StartWithDatabase - - - - - - - - - - - - - - - e_EnterInvalidKey/incorrect=incorrect+1 - - - - - - - - - - - - - - - - - e_CloseDialog[incorrect<3] - - - - - - - - - - - - - - - - - e_CloseDialog[incorrect==3]/incorrect=0 - - - - - - - - - - - - - - - e_EnterCorrectKey/incorrect=0 - - - - - - - - - - - - - - - - - e_CloseApp[databaseChanged==false] - - - - - - - - - - - - - - - - - e_CloseApp - - - - - - - - - - - - - - - e_CloseApp[databaseChanged==true&&incorrect==0] - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - e_CloseDB[databaseChanged==true] - - - - - - - - - - - - - - - e_CloseDB[databaseChanged==false] - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - e_ChangeDatabase/databaseChanged=true - - - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/methods/Main.graphml b/graphwalker-cli/src/test/resources/graphml/methods/Main.graphml deleted file mode 100644 index 54c6267e..00000000 --- a/graphwalker-cli/src/test/resources/graphml/methods/Main.graphml +++ /dev/null @@ -1,421 +0,0 @@ - - - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_KeePassNotRunning - - - - - - - - - - - - - v_MainWindowEmpty - - - - - - - - - - - - - v_EnterMasterCompositeMasterKey - - - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - - - v_MainWindow_DB_Loaded - - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - - e_Initialize - - - - - - - - - - - - - - - - - - e_Start - - - - - - - - - - - - - - - - e_StartWithDatabase - - - - - - - - - - - - - e_EnterInvalidKey - - - - - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect < 3 times */ - - - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect key 3 times */ - - - - - - - - - - - - - - - - - - e_EnterCorrectKey - - - - - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - - - e_CloseApp - - - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database changed */ - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - e_CloseDB BACKTRACK /* If database changed */ - - - - - - - - - - - - - - - - e_CloseDB BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/misc/missing_inedges.graphml b/graphwalker-cli/src/test/resources/graphml/misc/missing_inedges.graphml deleted file mode 100644 index b987cf04..00000000 --- a/graphwalker-cli/src/test/resources/graphml/misc/missing_inedges.graphml +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_KeePassNotRunning - - - - - - - - - - - v_MainWindowEmpty - - - - - - - - - - - v_EnterMasterCompositeMasterKey - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - v_MainWindow_DB_Loaded - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - e_Initialize - - - - - - - - - - - - - - - - e_Start - - - - - - - - - - - - - - e_StartWithDatabase - - - - - - - - - - - e_EnterInvalidKey - - - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect < 3 times */ - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect key 3 times */ - - - - - - - - - - - - - - - - e_EnterCorrectKey - - - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - e_CloseApp - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database changed */ - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - e_CloseDB BACKTRACK /* If database changed */ - - - - - - - - - - - - - - e_CloseDB BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect key 3 times */ - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/misc/no_missing_inedges.graphml b/graphwalker-cli/src/test/resources/graphml/misc/no_missing_inedges.graphml deleted file mode 100644 index e98dfc75..00000000 --- a/graphwalker-cli/src/test/resources/graphml/misc/no_missing_inedges.graphml +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_KeePassNotRunning - - - - - - - - - - - v_MainWindowEmpty - - - - - - - - - - - v_EnterMasterCompositeMasterKey - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - v_MainWindow_DB_Loaded - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - e_Initialize - - - - - - - - - - - - - - - - e_Start - - - - - - - - - - - - - - e_StartWithDatabase - - - - - - - - - - - e_EnterInvalidKey - - - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect < 3 times */ - - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect key 3 times */ - - - - - - - - - - - - - - - - e_EnterCorrectKey - - - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - e_CloseApp - - - - - - - - - - - - - - - - e_CloseApp BACKTRACK /* If database changed */ - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - e_CloseDB BACKTRACK /* If database changed */ - - - - - - - - - - - - - - e_CloseDB BACKTRACK /* If database unchanged */ - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - e_CloseDialog BACKTRACK /* If incorrect key 3 times */ - - - - - - - - - - - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/reqtags/ExtendedMain.graphml b/graphwalker-cli/src/test/resources/graphml/reqtags/ExtendedMain.graphml deleted file mode 100644 index 687b8720..00000000 --- a/graphwalker-cli/src/test/resources/graphml/reqtags/ExtendedMain.graphml +++ /dev/null @@ -1,416 +0,0 @@ - - - - - - - - - - - - - - - Start - - - - - - - - - - - - v_KeePassNotRunning - - - - - - - - - - - - v_MainWindowEmpty -REQTAG=req 79 - - - - - - - - - - - - v_EnterMasterCompositeMasterKey - - - - - - - - - - - - v_InvalidKey - - - - - - - - - - - - v_MainWindow_DB_Loaded -REQTAG=req 55, req 78 - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - v_SaveBeforeCloseLock - - - - - - - - - - - - e_Initialize / incorrect=0; databaseChanged=false - - - - - - - - - - - - - - - - - e_Start - - - - - - - - - - - - - - - e_StartWithDatabase -REQTAG=req1 - - - - - - - - - - - - - - - e_EnterInvalidKey/incorrect=incorrect+1 - - - - - - - - - - - - - - - - - e_CloseDialog[incorrect<3] - - - - - - - - - - - - - - - - - e_CloseDialog[incorrect==3]/incorrect=0 - - - - - - - - - - - - - - - e_EnterCorrectKey/incorrect=0 -REQTAG=req2, req 23 - - - - - - - - - - - - - - - - - e_CloseApp[databaseChanged==false] - - - - - - - - - - - - - - - - - e_CloseApp - - - - - - - - - - - - - - - e_CloseApp[databaseChanged==true&&incorrect==0] - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - e_CloseDB[databaseChanged==true] - - - - - - - - - - - - - - - e_CloseDB[databaseChanged==false] - - - - - - - - - - - - - - - e_Yes - - - - - - - - - - - - - - - e_No - - - - - - - - - - - - - - - - - e_Cancel - - - - - - - - - - - - - - - - e_ChangeDatabase/databaseChanged=true - - - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/AddressBook.graphml b/graphwalker-cli/src/test/resources/graphml/test24/AddressBook.graphml deleted file mode 100644 index 0a483c30..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/AddressBook.graphml +++ /dev/null @@ -1,1459 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_AddressBook - - - - - - - - - - - v_AddressBook_ToolsMenu_1 - - - - - - - - - - - v_AddressBook_AddContact SUBGRAPH - - - - - - - - - - - v_DeleteItems SUBGRAPH - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - v_AddressBook_AddFavorite - - - - - - - - - - - v_ContactTapToSelectNumber SUBGRAPH - - - - - - - - - - - v_AddressBook_ToolsMenu_2 - - - - - - - - - - - v_AddressBook_ContactSettings - - - - - - - - - - - Stop - - - - - - - - - - - v_SelectNameFormat - - - - - - - - - - - v_Prefer - - - - - - - - - - - v_BirthdayReminderSettingsEnabled - - - - - - - - - - - v_BirthdayReminderSettingsDisabled - - - - - - - - - - - v_DefaultValues SUBGRAPH - - - - - - - - - - - v_DefaultValues SUBGRAPH - - - - - - - - - - - v_DefaultValues SUBGRAPH - - - - - - - - - - - v_ReminderWhen - - - - - - - - - - - v_Time SUBGRAPH - - - - - - - - - - - v_Audio SUBGRAPH - - - - - - - - - - - v_SendVCard SUBGRAPH - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACKING /* If Icon 2 is enabled. */ - - - - - - - - - - - - - - e_SweepShowKeyboard - - - - - - - - - - - e_TapIcon_4 BACKTRACKING /* If Icon 4 is enabled. */ - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapRandomListItem BACKTRACKING /* If an item exists in the list. */ - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - e_TapItem3 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - e_TapItem4 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACKING /* If sending a SMS, and close app was called, we gor here */ - - - - - - - - - - - - - - e_TapItem3 - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/AddressBookContact.graphml b/graphwalker-cli/src/test/resources/graphml/test24/AddressBookContact.graphml deleted file mode 100644 index 8de79cbb..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/AddressBookContact.graphml +++ /dev/null @@ -1,600 +0,0 @@ - - - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_AddressBook_AddContact - - - - - - - - - - - - - v_ContactMustHaveName - - - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - - - v_Camera SUBGRAPH - - - - - - - - - - - - - v_AudioTone - - - - - - - - - - - - - v_KeyboardNumeric SUBGRAPH - - - - - - - - - - - - - Stop - - - - - - - - - - - - - v_ContactHasChanged - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapInListStringFirst_name - - - - - - - - - - - - - - - - e_TapInListStringPicture - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapInListStringRing_tone - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapInListStringMobile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - BACKTRACK /* No name set */ - - - - - - - - - - - - - - - - - - BACKTRACK /* Mandatory fields OK */ - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - BACKTRACK /* Fields OK */ - - - - - - - - - - - - - - - - - - BACKTRACK /* No name set */ - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/AddressBookReadOnly.graphml b/graphwalker-cli/src/test/resources/graphml/test24/AddressBookReadOnly.graphml deleted file mode 100644 index a5d0b79a..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/AddressBookReadOnly.graphml +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_AddressBookReadOnly - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - v_ContactTapToSelectNumber NO_MERGE - - - - - - - - - - - Stop - - - - - - - - - - - - - - e_SweepShowKeyboard - - - - - - - - - - - - - - e_TapRandomListItem BACKTRACK /* If an item exists in the list. */ - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TapRandomListItem BACKTRACK /* Only allowed when there are numbers in the list */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Alarm.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Alarm.graphml deleted file mode 100644 index 643a24df..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/Alarm.graphml +++ /dev/null @@ -1,818 +0,0 @@ - - - - - - - - - - - - - v_Audio SUBGRAPH - - - - - - - - - - - v_AlarmHistory_ToolsMenu - - - - - - - - - - - v_AlarmHistory - - - - - - - - - - - v_Audio SUBGRAPH - - - - - - - - - - - v_AlarmEdit SUBGRAPH - - - - - - - - - - - v_DeleteItems SUBGRAPH - - - - - - - - - - - v_AlarmToolsMenu - - - - - - - - - - - v_AlarmDateAlreadyOccured - - - - - - - - - - - v_AlarmEdit SUBGRAPH - - - - - - - - - - - v_Date SUBGRAPH - - - - - - - - - - - v_Time SUBGRAPH - - - - - - - - - - - v_Alarm - - - - - - - - - - - Start - - - - - - - - - - - Stop - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TapListItemFirst - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If an alarm exists in the list. */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_3 BACKTRACK /* If an alarm exists in the list. */ - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - e_SelectRandomListItem /* 'Add Alarm...' do always exist. New Alarms gets added to the list. */ - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - e_SelectRandomListItem /* Listan kan vara tom */ - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TryTapListItemNotFirst BACKTRACK /* If a Alarm is selected from the list. */ - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView BACKTRACK - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/AlarmEdit.graphml b/graphwalker-cli/src/test/resources/graphml/test24/AlarmEdit.graphml deleted file mode 100644 index ac02274e..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/AlarmEdit.graphml +++ /dev/null @@ -1,714 +0,0 @@ - - - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - v_AlarmEdit - - - - - - - - - - - Start - - - - - - - - - - - v_Time SUBGRAPH - - - - - - - - - - - v_Date SUBGRAPH - - - - - - - - - - - v_AlarmAction - - - - - - - - - - - v_AlarmDateAlreadyOccured - - - - - - - - - - - Stop - - - - - - - - - - - v_EditAlarmChanged - - - - - - - - - - - v_AlarmDateAlreadyOccured - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_TapItem3 - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - - e_TapItem4 - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Audio.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Audio.graphml deleted file mode 100644 index e53e523f..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/Audio.graphml +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_Audio - - - - - - - - - - - v_AudioAction - - - - - - - - - - - v_AudioTone /* TODO: Implement selection of audio file.*/ - - - - - - - - - - - v_AudioTone_ToolsMenu - - - - - - - - - - - v_ChangeVolume - - - - - - - - - - - v_DefaultValues SUBGRAPH - - - - - - - - - - - Stop - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Calculator.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Calculator.graphml deleted file mode 100644 index c1c3f1d8..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/Calculator.graphml +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_Calculator - - - - - - - - - - - v_KeyboardNumeric SUBGRAPH - - - - - - - - - - - v_Calculator_Error - - - - - - - - - - - Stop - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACK - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Calendar.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Calendar.graphml deleted file mode 100644 index e50f307b..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/Calendar.graphml +++ /dev/null @@ -1,760 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_CalendarMonthView - - - - - - - - - - - v_Calendar_ToolsMenu SUBGRAPH - - - - - - - - - - - v_CalendarWeekView - - - - - - - - - - - v_CalendarDayView - - - - - - - - - - - v_Calendar_ToolsMenu SUBGRAPH - - - - - - - - - - - v_Calendar_ToolsMenu SUBGRAPH - - - - - - - - - - - v_CalendarAppointment SUBGRAPH - - - - - - - - - - - v_Calendar SUBGRAPH - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapCalendarItem - - - - - - - - - - - - - - - - e_TapCalendarItem - - - - - - - - - - - - - - e_TryTapRandomListItem BACKTRACK - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - e_LeftKey - - - - - - - - - - - - - - - e_RightKey - - - - - - - - - - - - - - - e_UpKey - - - - - - - - - - - - - - - e_DownKey - - - - - - - - - - - - - - - e_LeftKey - - - - - - - - - - - - - - - e_RightKey - - - - - - - - - - - - - - - e_UpKey - - - - - - - - - - - - - - - e_DownKey - - - - - - - - - - - - - - - e_LeftKey - - - - - - - - - - - - - - - e_RightKey - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACK weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/CalendarAppointment.graphml b/graphwalker-cli/src/test/resources/graphml/test24/CalendarAppointment.graphml deleted file mode 100644 index d624c0a6..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/CalendarAppointment.graphml +++ /dev/null @@ -1,976 +0,0 @@ - - - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_CalendarAppointment - - - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - - - v_Date SUBGRAPH - - - - - - - - - - - - - v_Time SUBGRAPH - - - - - - - - - - - - - v_CalendarAppointmentStatus - - - - - - - - - - - - - v_CalendarAppointmentReminder - - - - - - - - - - - - - v_CalendarAppointmentReminderCustom - - - - - - - - - - - - - v_Time SUBGRAPH - - - - - - - - - - - - - v_Date SUBGRAPH - - - - - - - - - - - - - Stop - - - - - - - - - - - - - v_CalendarAppointmentSaveChanges - - - - - - - - - - - - - v_TimeMustBeLess - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - e_TapInListStringSubject BACKTRACK - - - - - - - - - - - - - - - - - e_SelectRandomListItem BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapInListStringStart_date BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapInListStringStart_time BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapInListStringStatus BACKTRACK - - - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_TapInListStringReminder BACKTRACK - - - - - - - - - - - - - - - - - - e_TapRandomListItemNotLast BACKTRACK /* If not 'Custom...' is selected. */ - - - - - - - - - - - - - - - - e_TapListItemLast - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView BACKTRACK - - - - - - - - - - - - - - - - - - e_TapItem2 BACKTRACK /* If 'Time:' is selected. */ - - - - - - - - - - - - - - - - - - e_TapItem1 BACKTRACK /* If 'Date:' is selected. */ - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACK weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACK weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml deleted file mode 100644 index eb81ddcb..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/Calendar_ToolsMenu.graphml +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_Calendar_ToolsMenu - - - - - - - - - - - v_CalendarAppointment SUBGRAPH - - - - - - - - - - - Stop - - - - - - - - - - - v_DeleteItems SUBGRAPH - - - - - - - - - - - v_Date SUBGRAPH - - - - - - - - - - - v_Audio SUBGRAPH - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/CallHistory.graphml b/graphwalker-cli/src/test/resources/graphml/test24/CallHistory.graphml deleted file mode 100644 index 8292ff5c..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/CallHistory.graphml +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_CallHistory - - - - - - - - - - - - - v_CallHistory_ToolsMenu - - - - - - - - - - - - - v_DeleteItems SUBGRAPH - - - - - - - - - - - - - v_AddressBook_AddContact SUBGRAPH - - - - - - - - - - - - - v_ContactTapToSelectNumber SUBGRAPH - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* Only if enabled */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* Only if enabled */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_4 BACKTRACK /* Only if enabled */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Camera.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Camera.graphml deleted file mode 100644 index e724e867..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/Camera.graphml +++ /dev/null @@ -1,871 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_CameraViewFinder - - - - - - - - - - - v_Camera_ToolsMenu - - - - - - - - - - - v_Camera_Settings - - - - - - - - - - - v_Camera_Settings_Resolution - - - - - - - - - - - v_Camera_ResetDefaultValues - - - - - - - - - - - v_Camera_ToolsMenu_Reset - - - - - - - - - - - v_Camera_Settings_WhiteBalance - - - - - - - - - - - v_Camera_Settings_Brightness - - - - - - - - - - - v_SavingImage - - - - - - - - - - - v_SavingImage - - - - - - - - - - - v_SendPictureAsMMS SUBGRAPH - - - - - - - - - - - v_ImageViewer SUBGRAPH - - - - - - - - - - - v_Camera_Settings_ColorSaturation - - - - - - - - - - - v_Camera - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - e_TapTakePicture - - - - - - - - - - - - - - - - e_Wait_2s - - - - - - - - - - - - - - - - - - e_Wait_4s - - - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_SweepCloseApp BLOCKED weight=0.05 - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* If enabled */ - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - e_TapItem3 - - - - - - - - - - - - - - e_TapItem4 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/ContactFavorites.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ContactFavorites.graphml deleted file mode 100644 index 2dfeb832..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/ContactFavorites.graphml +++ /dev/null @@ -1,579 +0,0 @@ - - - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_ContactFavorites - - - - - - - - - - - - - v_ContactFavorites_ToolsMenu_1 - - - - - - - - - - - - - v_ContactFavorites_ToolsMenu_2 - - - - - - - - - - - - - v_AddressBook_AddContact SUBGRAPH - - - - - - - - - - - - - v_ContactFavorite_DeleteFavorite - - - - - - - - - - - - - v_AddressBook_ImportFromSIM - - - - - - - - - - - - - v_AddressBook_ExportToSIM - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK - - - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml deleted file mode 100644 index 9e860bcd..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/ContactFavoritesReadOnly.graphml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_ContactFavoritesReadOnly SUBGRAPH - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml deleted file mode 100644 index 34757f09..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/ContactTapToSelectNumber.graphml +++ /dev/null @@ -1,480 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_ContactTapToSelectNumber - - - - - - - - - - - v_AddressBook_Contact_ToolsMenu - - - - - - - - - - - v_SendMessage SUBGRAPH - - - - - - - - - - - Stop - - - - - - - - - - - v_KeyboardNumeric SUBGRAPH - - - - - - - - - - - v_AddressBook_AddContact SUBGRAPH - - - - - - - - - - - v_AddressBook_AddContact SUBGRAPH - - - - - - - - - - - v_SendVCard SUBGRAPH - - - - - - - - - - - v_MessagingInbox NO_MERGE - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled. */ - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - e_SweepShowKeyboard BACKTRACK /* Only if contact has a number */ - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - e_SweepClose - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Contacts.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Contacts.graphml deleted file mode 100644 index d127a7c7..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/Contacts.graphml +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_AddressBook SUBGRAPH - - - - - - - - - - - v_ContactFavorites SUBGRAPH - - - - - - - - - - - v_Contacts - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/ContactsReadOnly.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ContactsReadOnly.graphml deleted file mode 100644 index a0bb43e9..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/ContactsReadOnly.graphml +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_AddressBookReadOnly SUBGRAPH - - - - - - - - - - - v_ContactFavoritesReadOnly SUBGRAPH - - - - - - - - - - - v_ContactsReadOnly - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Date.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Date.graphml deleted file mode 100644 index 96e909be..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/Date.graphml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_Date - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_PressRandomKey - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/DefaultValues.graphml b/graphwalker-cli/src/test/resources/graphml/test24/DefaultValues.graphml deleted file mode 100644 index 4b8ed698..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/DefaultValues.graphml +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_DefaultValues - - - - - - - - - - - v_ResetDefaultValues - - - - - - - - - - - v_SelectItems - - - - - - - - - - - Stop - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled. */ - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled. */ - - - - - - - - - - - - - - - e_SelectRandomListItem /* Values different from default, will be listed. */ - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/DeleteItems.graphml b/graphwalker-cli/src/test/resources/graphml/test24/DeleteItems.graphml deleted file mode 100644 index d1651024..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/DeleteItems.graphml +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_DeleteItems - - - - - - - - - - - v_SelectItems - - - - - - - - - - - Stop - - - - - - - - - - - v_ConfirmDeleteItem - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled */ - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled */ - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_SweepAccept BACKTRACK /* If any items is selected */ - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_TryTapRandomListItem BACKTRACK - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_SweepCloseApp BLOCKED weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp BLOCKED weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp BLOCKED weight=0.05 - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/GlobalSettings.graphml b/graphwalker-cli/src/test/resources/graphml/test24/GlobalSettings.graphml deleted file mode 100644 index 1269b901..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/GlobalSettings.graphml +++ /dev/null @@ -1,466 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_GlobalSettings - - - - - - - - - - - Stop - - - - - - - - - - - v_DisplaySettings - - - - - - - - - - - v_SystemSettings - - - - - - - - - - - v_CommunicationSettings - - - - - - - - - - - v_AudioSettings - - - - - - - - - - - v_GPRSSettings - - - - - - - - - - - v_GPRSSettingsToolsMenu - - - - - - - - - - - v_GPRSAddAPN - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_TheNameAlreadyExists - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - e_TapIcon_2 - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - BACKTRACK - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/ImageViewer.graphml b/graphwalker-cli/src/test/resources/graphml/test24/ImageViewer.graphml deleted file mode 100644 index b9882ced..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/ImageViewer.graphml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_ImageViewer - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardNumeric.graphml b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardNumeric.graphml deleted file mode 100644 index 9fc8a618..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardNumeric.graphml +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - Stop - - - - - - - - - - - v_KeyboardNumeric - - - - - - - - - - - v_PasteText - - - - - - - - - - - v_KeyboardToolsMenu SUBGRAPH - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - e_SweepCloseView BACKTRACK weight=0.05 - - - - - - - - - - - - - - - e_PressRandomKey BACKTRACK weight=0.8 - - - - - - - - - - - - - - e_SweepShowKeyboard BACKTRACK /* If text exists in the clipboard. */ - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepShowTools BACKTRACK - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp BACKTRACK weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardText.graphml b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardText.graphml deleted file mode 100644 index eeebb502..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardText.graphml +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - Stop - - - - - - - - - - - v_KeyboardText - - - - - - - - - - - v_PasteText - - - - - - - - - - - v_KeyboardToolsMenu SUBGRAPH - - - - - - - - - - - v_KeyboardSelectWord - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView BACKTRACK weight=0.25 - - - - - - - - - - - - - - - e_PressRandomKey BACKTRACK weight=0.5 - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - e_TryTapRandomListItem - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepShowTools BACKTRACK - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp BLOCKED BACKTRACK weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepShowKeyboard BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml b/graphwalker-cli/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml deleted file mode 100644 index 21171880..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/KeyboardToolsMenu.graphml +++ /dev/null @@ -1,752 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_KeyboardSettings - - - - - - - - - - - v_SelectFavoriteKeyboards - - - - - - - - - - - v_SelectKeyboardSpeed - - - - - - - - - - - v_ChangeButtonVibration - - - - - - - - - - - v_DefaultValues SUBGRAPH - - - - - - - - - - - v_KeyboardToolsMenu - - - - - - - - - - - v_SelectKeyboard - - - - - - - - - - - Stop - - - - - - - - - - - v_ConfirmClear - - - - - - - - - - - v_CopyTo - - - - - - - - - - - v_PasteText - - - - - - - - - - - v_Preview - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - e_TapItem3 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_MoveSliderRandom - - - - - - - - - - - - - - - e_MoveSliderRandom - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK /* If Icon 1 is enabled */ - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If Icon 2 is enabled */ - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_TapIcon_3 BACKTRACK /* If Icon 3 is enabled */ - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - e_TapIcon_4 BACKTRACK /* If Icon 4 is enabled */ - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TryTapRandomListItem - - - - - - - - - - - - - - e_TapIcon_6 BACKTRACK /* If Icon 6 is enabled */ - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Main.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Main.graphml deleted file mode 100644 index b97a7f85..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/Main.graphml +++ /dev/null @@ -1,925 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_Contacts SUBGRAPH - - - - - - - - - - - v_StatusScreen - - - - - - - - - - - v_StartMenu - - - - - - - - - - - v_Camera SUBGRAPH - - - - - - - - - - - v_MessagingInbox SUBGRAPH - - - - - - - - - - - v_MediaPlayer SUBGRAPH - - - - - - - - - - - v_StartMenu_2 - - - - - - - - - - - v_StartMenu_3 - - - - - - - - - - - v_ShortCuts - - - - - - - - - - - v_SysFiles SUBGRAPH - - - - - - - - - - - v_RunningApplications SUBGRAPH - - - - - - - - - - - v_Calendar SUBGRAPH - - - - - - - - - - - v_Notes SUBGRAPH - - - - - - - - - - - v_Tetris SUBGRAPH - - - - - - - - - - - v_Alarm SUBGRAPH - - - - - - - - - - - v_NeoBrowser SUBGRAPH - - - - - - - - - - - v_Calculator SUBGRAPH - - - - - - - - - - - v_NumberToDial SUBGRAPH - - - - - - - - - - - v_GlobalSettings SUBGRAPH - - - - - - - - - - - e_Init - - - - - - - - - - - - - - e_TapIcon_2 - - - - - - - - - - - - - - - - e_SweepShowStartMenu - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - e_TapIcon_6 - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepTabLeft weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepTabLeft weight=0.05 - - - - - - - - - - - - - - - - e_SweepTabLeft weight=0.05 - - - - - - - - - - - - - - - - e_SweepTabLeft weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - e_TapIcon_2 - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - e_TapIcon_6 - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - e_TapIcon_2 - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - e_SweepShowKeyboard - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MakeCall.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MakeCall.graphml deleted file mode 100644 index 98bf9575..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/MakeCall.graphml +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_MakeCall - - - - - - - - - - - v_OutgoingCall - - - - - - - - - - - v_NoSIMCard - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - e_NoSIMCard BACKTRACK /* If no SIM card inserted in the phone */ - - - - - - - - - - - - - - - - e_Wait_5s - - - - - - - - - - - - - - e_SweepCloseView - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MediaPlayer.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MediaPlayer.graphml deleted file mode 100644 index cfa9757f..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/MediaPlayer.graphml +++ /dev/null @@ -1,854 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_MediaPlayerChoose - - - - - - - - - - - v_MediaPlayerPlayList - - - - - - - - - - - v_MediaPlayerToolsMenu1 - - - - - - - - - - - v_MediaPlayerVolume - - - - - - - - - - - v_MediaPlayerToolsMenu2 - - - - - - - - - - - v_MediaPlayerToolsMenu - - - - - - - - - - - v_MediaPlayerPlayer - - - - - - - - - - - v_MediaPlayerSettings - - - - - - - - - - - v_CreatePlaylist - - - - - - - - - - - v_MediaPlayerAddFile - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - v_MediaPlayerPosition - - - - - - - - - - - v_EditPlaylist - - - - - - - - - - - v_MediaPlayer - - - - - - - - - - - Stop - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_SavePlaylistError - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - e_TapItem2 - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_SweepShowTools BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TapIcon_4 - - - - - - - - - - - - - - - e_MoveSliderRandom - - - - - - - - - - - - - - e_TapIcon_3 BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_MoveSliderRandom - - - - - - - - - - - - - - - - e_TapIcon_1 BACKTRACK - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK - - - - - - - - - - - - - - - - e_TapIcon_5 BACKTRACK - - - - - - - - - - - - - - - - e_TapIcon_6 BACKTRACK - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.1 - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.1 - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MessagingCompose.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MessagingCompose.graphml deleted file mode 100644 index 29d25974..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/MessagingCompose.graphml +++ /dev/null @@ -1,466 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_MessagingCompose - - - - - - - - - - - v_MessagingCompose_ToolsMenu - - - - - - - - - - - v_ContactsReadOnly SUBGRAPH - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - Stop - - - - - - - - - - - v_MessageEmpty - - - - - - - - - - - v_NoRecipient - - - - - - - - - - - v_SendFailed - - - - - - - - - - - v_SendingMessage - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_TapInListStringTo - - - - - - - - - - - - - - - - e_TapInListStringText - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_Wait_5s - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - e_Wait_5s - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MessagingDrafts.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MessagingDrafts.graphml deleted file mode 100644 index 1ab48945..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/MessagingDrafts.graphml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_MessagingInbox MERGE - - - - - - - - - - - v_MessagingDrafts - - - - - - - - - - - v_MessagingSent MERGE - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MessagingInbox.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MessagingInbox.graphml deleted file mode 100644 index 24980d58..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/MessagingInbox.graphml +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_MessagingInbox - - - - - - - - - - - v_MessagingDrafts SUBGRAPH - - - - - - - - - - - v_MessagingSent SUBGRAPH - - - - - - - - - - - v_MessagingInbox_ToolsMenu - - - - - - - - - - - v_MessagingCompose SUBGRAPH - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/MessagingSent.graphml b/graphwalker-cli/src/test/resources/graphml/test24/MessagingSent.graphml deleted file mode 100644 index 249a9191..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/MessagingSent.graphml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_MessagingInbox MERGE - - - - - - - - - - - v_MessagingSent - - - - - - - - - - - v_MessagingDrafts MERGE - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - e_SweepTabRight - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/NeoBrowser.graphml b/graphwalker-cli/src/test/resources/graphml/test24/NeoBrowser.graphml deleted file mode 100644 index a4822855..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/NeoBrowser.graphml +++ /dev/null @@ -1,951 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_NeoBrowser - - - - - - - - - - - v_NeoBrowserToolsMenu_1 - - - - - - - - - - - v_URLEntered - - - - - - - - - - - v_NoPageToDisplay - - - - - - - - - - - v_QuitBrowser - - - - - - - - - - - v_InternetConnErr - - - - - - - - - - - v_EnterURL - - - - - - - - - - - v_SelectFontSize - - - - - - - - - - - v_Favorites - - - - - - - - - - - v_NeoBrowserToolsMenu_2 - - - - - - - - - - - v_NeoBrowserSettings - - - - - - - - - - - v_KeyboardText - - - - - - - - - - - v_SelectWWWAPN - - - - - - - - - - - v_NeoBrowserWin - - - - - - - - - - - v_NoInternetConnErr - - - - - - - - - - - Stop - - - - - - - - - - - v_BrowserStatusScreen - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - e_EnterValidURL - - - - - - - - - - - - - - - - e_TapIcon_3 - - - - - - - - - - - e_TapIcon_6 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapRandomListItem - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - - - e_SweepTabLeft - - - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - e_SweepShowKeyboard - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - e_EnterInvalidURL - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - e_TryTapRandomListItem BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Notes.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Notes.graphml deleted file mode 100644 index 8a45f8af..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/Notes.graphml +++ /dev/null @@ -1,440 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_Notes - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - v_NoteHasChanged - - - - - - - - - - - v_Notes_View - - - - - - - - - - - v_Notes_ToolsMenu - - - - - - - - - - - v_DeleteItems SUBGRAPH - - - - - - - - - - - Stop - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - e_SweepCloseView weight=0.05 - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - - - e_SweepAccept BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_TryTapListItemNotFirst BACKTRACK /* If note exists */ - - - - - - - - - - - - - - - - - - - - - - e_TapIcon_2 BACKTRACK /* If icon enabled */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_TapListItemFirst - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_SweepCloseView BLOCKED weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/NumberToDial.graphml b/graphwalker-cli/src/test/resources/graphml/test24/NumberToDial.graphml deleted file mode 100644 index 273f4634..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/NumberToDial.graphml +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_NumberToDial - - - - - - - - - - - Stop - - - - - - - - - - - v_PasteText - - - - - - - - - - - v_KeyboardToolsMenu SUBGRAPH - - - - - - - - - - - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_SweepShowKeyboard BACKTRACK /* If text exists in the clipboard. */ - - - - - - - - - - - - - - - - e_TryTapRandomListItem BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/RunningApplications.graphml b/graphwalker-cli/src/test/resources/graphml/test24/RunningApplications.graphml deleted file mode 100644 index 5492292d..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/RunningApplications.graphml +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_RunningApplications - - - - - - - - - - - v_RunningApplicationsToolMenu - - - - - - - - - - - v_RunningApplicationsSettings - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - e_SweepShowTools - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_TapIcon_1 - - - - - - - - - - - - - - e_TapIcon_5 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - e_TapItem1 - - - - - - - - - - - - - - - - e_TapIcon_3 BACKTRACK - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/SendMessage.graphml b/graphwalker-cli/src/test/resources/graphml/test24/SendMessage.graphml deleted file mode 100644 index bacc8f4e..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/SendMessage.graphml +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_MessagingCompose SUBGRAPH - - - - - - - - - - - - - v_KeyboardText SUBGRAPH - - - - - - - - - - - - - Stop - - - - - - - - - - - - - v_SendMessage. - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - BACKTRACK /* No text entered */ - - - - - - - - - - - - - - - - BACKTRACK /* Text entered */ - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/SendPictureAsMMS.graphml b/graphwalker-cli/src/test/resources/graphml/test24/SendPictureAsMMS.graphml deleted file mode 100644 index 119fa590..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/SendPictureAsMMS.graphml +++ /dev/null @@ -1,448 +0,0 @@ - - - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_SendPictureAsMMS - - - - - - - - - - - - - v_ConfirmResize - - - - - - - - - - - - - v_EditSlide - - - - - - - - - - - - - v_SaveSlideChanges - - - - - - - - - - - - - v_ComposeMMS MERGE - - - - - - - - - - - - - v_Slides - - - - - - - - - - - - - Stop - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - BACKTRACK /* Image resized */ - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/SendVCard.graphml b/graphwalker-cli/src/test/resources/graphml/test24/SendVCard.graphml deleted file mode 100644 index e1dbeb94..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/SendVCard.graphml +++ /dev/null @@ -1,589 +0,0 @@ - - - - - - - - - - - - - - - - - v_SendVCard - - - - - - - - - - - - - Start - - - - - - - - - - - - - Stop - - - - - - - - - - - - - v_MessagingInbox NO_MERGE - - - - - - - - - - - - - v_KeyboardNumeric SUBGRAPH - - - - - - - - - - - - - v_EditTo - - - - - - - - - - - - - v_NoRecipient - - - - - - - - - - - - - v_ContactsReadOnly - - - - - - - - - - - - - v_ContactTapToSelectNumber NO_MERGE - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - v_Dummy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepShowKeyboard BACKTRACK /* Only contact has a number */ - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - e_SelectRandomListItem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - - - - - - - e_TapRandomListItem BACKTRACK /* Only allowed when there are numbers in the list */ - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - - - - - - - - - BACKTRACK /* Recipient dose no exist */ - - - - - - - - - - - - - BACKTRACK /* Recipient exists */ - - - - - - - - - - - - - - - - e_TapScreen - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/SysFiles.graphml b/graphwalker-cli/src/test/resources/graphml/test24/SysFiles.graphml deleted file mode 100644 index 0adaa6f2..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/SysFiles.graphml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_SysFiles - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Tetris.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Tetris.graphml deleted file mode 100644 index 9fb3fec2..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/Tetris.graphml +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - Start - - - - - - - - - - - - - v_Tetris - - - - - - - - - - - - - v_QuitTetris - - - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - e_SweepCloseView - - - - - - - - - - - - - - - - - - e_SweepAccept - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/graphml/test24/Time.graphml b/graphwalker-cli/src/test/resources/graphml/test24/Time.graphml deleted file mode 100644 index 9b2b3d7f..00000000 --- a/graphwalker-cli/src/test/resources/graphml/test24/Time.graphml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - Start - - - - - - - - - - - v_Time - - - - - - - - - - - Stop - - - - - - - - - - - - - - - - - - - - - - - - - e_PressRandomKey - - - - - - - - - - - - - - - - BACKTRACK - - - - - - - - - - - - - - - - e_SweepCloseApp weight=0.05 - - - - - - diff --git a/graphwalker-cli/src/test/resources/lib/small_jar.jar b/graphwalker-cli/src/test/resources/lib/small_jar.jar deleted file mode 100644 index 33562b6d0d132a040a7f5baf0e87e6aec135a20c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6809 zcmbtY2Rzh&_`hr+6mdezR`$xsOhPy_TZgl{JLeqPA|uhs$`)lEk&!xklO0(Z8Bu14 zP}cvnlHvzUiUoj_wyOw&*ypGAT@k~!+^c!5uh&l<>A|f6n9rw(v{~` z(YVMD`esG~aL1XQf78rsi~HLf_oeySOkG|><)V^~E}#0v74^2(%WAxQT@-4(JRNPF zMcM*A!edj&v#K4>&#Lh%kPuI%=|>$uQ_bdDk{F_WOifz{mBf=v!$@{CQdpbT^H{6) z3hp0OVJFq<2}4M*n_jd8RVt0?<0$CePZ{n+%YoMACgmo8?~wrjZU;I*^>bthD8$v- z=|?{RU;2SF_|XV(PYy_%|FEF=X5r)j2cz5&kpD2<8t8iUj~XMuUNeq=UZ_I0AR-5f6Vl^NG%;;2nRUM(}~X&2E7w5 z53gq-S6X*EY|b)?*L8LQ0wIo=(%P>G(anz;XbUhOyUcmTJ<)gvq_to-s9ZxM~ zxmw@`;4vNmaPFT6QekgO6dm9wh%1WE5(;*5x}&A8Su01Cq?bl3FJIp&RofuyKKb^F zf9Mav60*f^OZ5mC1qe{f;K54Kd7>8-owG>wfC;4_n~TD6A8roYC`<$ zJgdiuE(+K_aTi|ZaAk?=B<8r+viL-qeAZA_P-yHt=FWnoU}a-gCb|8q67o+WQGlzcTR=ZObY4}(Y@t>=t#~Sk<_jAynr1BCw{!?LT)ryQJj^c4kFb#x=uo*WKjNkWsL5Jz)k*y9Z zoL6b2!i$Qcj5A)Bc^4sOL`TL41&5kSX(EAj4fEo3dPI#2r3pZ4h)DBYH@{* z2M0)yX##H-bw|&VDtf0Cwtx(l`Un*@)k`PTv3hhn#%9;2(;mMS#TK=AVbJ1mrH4srUi9V(vOU|iBXA4D%x#e>) zHUKrkdSsShaH(O~;F*>fc#)BzWxnV56YO9Qm=Sq(T09@5(v;UMr<4+LNb5$0p%mC; z*-k~$LP9qeL>)b5O#X~Kauo`Dq#pqr3>yoezz|N$Om~31D_>IavY!{vUkY7AwX5DN z%Uc3+P!?PpVMyEH;H(LSYef+$hUzB~TbLe|ex`v5WePKlsVwwxnFx^pqbUupwP+d8Y)=<* z8=qZq_*0lg%w2guMj1Re`mB{}LuhI*<>h-<%3nC#O3y;SL)*4XG4urUp(4-os+Q6| z@rq4FPCP(anBjA1u302I6!*w{V8|10+gdk%=x5`6&XI-K?elKSGE!pZx^|Sk$Vu@t z0oguE^a_^B(WIVz&<@@7T-j_v_O6HQ)1a*w^4<{| zJr9LmbSqY2E$0c}3+YQIX?qFQ(B&&4>sxZ;+suPzVPRg1j-K~RrG!S6gOSsAHB@N4Tu#oa5{2pEO>*Z>_&h9#p#)}M z)6I#s?_x7yOusNxBu$3dx=pItwKUz!)%akm5rY(bgSE>ukue^k!*sN;CpmN4H{qMs z6grkmW}M-;Y%|i3HXi$s-zTcH6{Fid+eqUs8sMSDM~URfvvL#%-d#xKs4s zH&P`S0_CP-35LTV$gdk|bOcQEC5WbJ_xc<&#*#eo0Uo~6GivVTnLG6a5c-HrYl z3EpQxL<7pWht*OO6#`O09v?HD5d%8xvhaAQ~A*H4>uvdTD~ zt(R~{Gf9Z#J7r<zS_7H)nf3$e%R7}IYVSfx)biK`_@?+W*OmI%qbTFtOiE@~GWsTK}6{31p9g!z@z zOpkC-9}_GN(7^5n$j%KPY~QX=gSXc)dt7q868F0QPolC zQI0hD@t`Y#ALg(M*U*ocT5ffT8*d-hH{J9b02&Hjei^Tr*hgq8gB30DtJqV_ zwX#Z()iw)0i@dJZ9uKr?AUc{VmC}#e4-SwguKh?wV0)5!S0KZbsmoq*q1dNepTqvK zx!KZoFk$D*%fz)!;2nbT#^?D12m^BQx@FrfD&(nH^@G4DktCBV8^+L^^Ft=eC}5niBu@w7_^L@l)UyW-u<#mHFq>Le~}v z0bBjyu!z2>}i~B4{W{-nJi0r2NF5=nB8%=+-a=O&Vcf$I* z<+9YrfEZx3wTQ_(@6j|)=!QPUVb)hTd6_~8lif)XP`fyA>$Xame* zlz&-=npk_<%@uL%wdR8O&`)};mRPR~WDIB&eTv?N))-9NG_@g96xQtq)?2#zF6UOh z7rD4_(|9w8BYQZ3?rA4!vYpzy_(dZPcG*%T{j%E1&h2b+2V49)V7mS~?+}+!@<}fC zsH22Cy6+^_B__lr^)@WpC(*1XfusQi_Kgo9A)c)D9PFhn&9qZm04+(O6!!PQg-Wyd zLB-8yB^6w*%7bAe+MW!YG}~gVvo9 zQC#c0Rj$s7b;OdFqntf&t4UrAkDkcZaG1cN=dh`)oE{RxeU8M!l9kmllGcKmmds?j zi>4>}1BVODc>;}_yey|RP#5pnZ=}#4&S{rS6Va9zAh#~Hc^w%Nl!p|)v*9m8T$eI& z(Z5!CIg|gn1n`nQv2Ajc~t@e6>~egWH+Ke2;Wvou3h3@yHGX(i$cVOxUsx?;pVKXT#)9^F%^WbB|r>D<` zLwK^HeVmhlIKXb3o1&7b`PMjG`s_t(el3}*RS9G}h+A~0ypUUl~{47O<+-OlXy6;p> z7E@}R0%D`W=cnTHVD(J-b4>*UyFlPS3b5ZxZPwq7an&Q=_v(@Fx9agAo5;Tbe8u7Y zQd9DR5q3X9A_2JKif55_QoLkbTFp-e07(5G5fKisy@Ihpf7D?}jLN&;+;K&R_(DX2 zwHz2rG%Ql*pT0&_c5PGlMUSENnQ%sxPfb2m57X)+a>WdvrD}47jgDMjU#?%-$Q1A& zGn%ct_aeNDx0bmCcFx4&B{L%rzpNsR{-Hwp~!cJAPM7sEYPeWTHM_+3$zRxIvAd7B%VlwHp zafpBj-S2vTCALGRcCmTBosgwjwI18wNO!@Ij9@FqkbM!ht597zRm5sWgAwr4cXKA`6M>QuQ4bSx(jT>@M$#O*I zin@UakB@d6cJvD{$yfrw8-?^(aonZ{c!RZEVNtJONiy%|5YFyVkxY#ZhgCj*ZXe;z zIC{VLl69hi@cZYWq#)-+$6?8=@S(tYi2?`X`sMJF`&Zs!`C&m=b>ovkIogwU&!3!2 z_h!i`eVB9PnXI}Nt7-Wp9xQU^<_zeB#?d!yBZ1LR`3rQ^<0n-)ksf&}#?jL;(-2Mx zes%H4zDm`;gzUl-*pAjv$+=T56;-18lP!h)9M9JwilT_2O3J1H~mgoo8Rx|(}L z{UWu=eMT`|dZ<_ZM&`Y?&?=IO3v=`JaS_Y~Zz_9XV*M;7nPl= ziaxgXmg{)K+`8m0AygFmlsVo!hfih2L7zw;0m#0}9#`;6c(t)wLzxg%LA$WSG-{D& zyJWt;GO)-t8)7VckK_JU$l-F2bbWSeZi8LYI07I1U-P4~HdR_A?sa#?eHH#6uRQ|k zfPf%Tb`U4_X0^jN1*iZowi7L?i%)qQWsPa8(d7-2U5>{Pu#rYySY6{qZJIgTbSlL0 z#vh{_e5EKFQWr-d#w6CCx)`Vy@^U30w@-Y)FoMjxM>U68pOjr@p5982+qK2UidI}k z6)$35X0@YgM-6s+2&&#yLkChjghzw_cOetkEnK4lEXeQOe~4ZCZhsaw_l);inlC5r z`orxfnR6fE&jREZ_bOrzS!E)bK`k?DSgu5qT?jykeg7D?&!5uq)@5G*>&pP2g)*`Ox{bi89;eGAr&++|UNgQN3sA}!AWa8Gs zzp?yP<2p!ouwvgQJ4f=bWWU$%2U!l5Ui&P)xOes6y7ad~Y@h4*glaGQ`r7v11R31V z9~1sP7yG_ies|u>#`c}B{qBs5`wzL<-vRfsvwgrv{|5MVA^no8eP{S{w)UMP&3EVj z$nY(9+aK7ktN-Bnuut^y*lz>-r?L61D|Q diff --git a/graphwalker-cli/src/test/resources/templates/junit.template b/graphwalker-cli/src/test/resources/templates/junit.template deleted file mode 100644 index 80df344c..00000000 --- a/graphwalker-cli/src/test/resources/templates/junit.template +++ /dev/null @@ -1,19 +0,0 @@ -HEADER<{{ -import junit.framework.TestCase; - -public class MyMBTJUnitTestCase extends TestCase { -}}>HEADER - - /** - * This method implements the {EDGE_VERTEX} '{LABEL}' - * {DESCRIPTION} - */ - public void {LABEL}() - { - log.info( "{EDGE_VERTEX}: {LABEL}" ); - throw new RuntimeException( "The {EDGE_VERTEX}: {LABEL} is not implemented yet!" ); - } - -FOOTER<{{ -} -}}>FOOTER diff --git a/graphwalker-cli/src/test/resources/templates/perl.template b/graphwalker-cli/src/test/resources/templates/perl.template deleted file mode 100644 index 401b77da..00000000 --- a/graphwalker-cli/src/test/resources/templates/perl.template +++ /dev/null @@ -1,42 +0,0 @@ -HEADER<{{ -use strict; -use warnings; - -use SOAP::Lite; - -# Connect to the MBT web-service -my $MBTService = SOAP::Lite->service($ARGV[0]); - -# Load MBT with a new xml -my $arg = SOAP::Data->new(name => 'arg0', value => $ARGV[1]); -my $res = $MBTService->Load($arg); - -if ($res eq "false") { - die "Unable to reload MBT, check path to .xml file!\nRemember that the path is relative where mbt is launched."; -} - -# Walk the model -while ( $MBTService->HasNextStep() eq "true"){ - # Get next step from MBT - my $step = $MBTService->GetNextStep(); - if ($step ne '') { - # Run the step - eval( $step ) or die; - } -} -print "MBT Statistics: \n" . $MBTService->GetStatistics() . "\n"; - -}}>HEADER - -# -# This sub routine implements the {EDGE_VERTEX} '{LABEL}' -# -sub {LABEL}() -{ - print "{EDGE_VERTEX}: {LABEL}\n"; - die "The {EDGE_VERTEX}: {LABEL} is not implemented yet!"; -} - -FOOTER<{{ -return 1; -}}>FOOTER diff --git a/graphwalker-cli/src/test/resources/xml/ReachedVertex.xml b/graphwalker-cli/src/test/resources/xml/ReachedVertex.xml deleted file mode 100644 index 2c947cd0..00000000 --- a/graphwalker-cli/src/test/resources/xml/ReachedVertex.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/xml/javaExecutor.xml b/graphwalker-cli/src/test/resources/xml/javaExecutor.xml deleted file mode 100644 index 5c07a7b9..00000000 --- a/graphwalker-cli/src/test/resources/xml/javaExecutor.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init6.xml b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init6.xml deleted file mode 100644 index b656623e..00000000 --- a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init6.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init8.xml b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init8.xml deleted file mode 100644 index 9af92c78..00000000 --- a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init8.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init9.xml b/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init9.xml deleted file mode 100644 index 82b9b5f4..00000000 --- a/graphwalker-cli/src/test/resources/xml/reqtags/mbt_init9.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/graphwalker-core/pom.xml b/graphwalker-core/pom.xml index f44bf73c..9b3df7cc 100644 --- a/graphwalker-core/pom.xml +++ b/graphwalker-core/pom.xml @@ -15,15 +15,6 @@ GraphWalker Core - - junit - junit - test - - - commons-cli - commons-cli - log4j log4j @@ -33,25 +24,72 @@ jdom - commons-configuration - commons-configuration + net.sf.oval + oval - net.sf.jung - jung-graph-impl + org.aspectj + aspectjrt + 1.6.11 + compile - org.beanshell - bsh + junit + junit + test - net.sf.jung - jung-algorithms + org.beanshell + bsh + test - net.sf.jung - jung-visualization + org.codehaus.groovy + groovy + test + + + + org.codehaus.mojo + aspectj-maven-plugin + + 1.6 + ignore + + + net.sf.oval + oval + + + + + + + compile + + + + + + org.codehaus.mojo + jaxb2-maven-plugin + + + generate-sources + + xjc + + + ${basedir}/src/main/resources + graphwalker.xsd + org.graphwalker.core.configuration + + + + + + \ No newline at end of file diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java b/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java deleted file mode 100644 index 1cc6fe81..00000000 --- a/graphwalker-core/src/main/java/org/graphwalker/core/ClassPathHack.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ -package org.graphwalker.core; - -import java.io.File; -import java.io.IOException; -import java.lang.reflect.Method; -import java.net.URL; -import java.net.URLClassLoader; - -/** - *

ClassPathHack class.

- */ -public class ClassPathHack { - private static final Class[] parameters = new Class[]{URL.class}; - - /** - *

addFile.

- * - * @param f a {@link java.io.File} object. - * @throws java.io.IOException if any. - */ - @SuppressWarnings("deprecation") - public static void addFile(File f) throws IOException { - // f.toURL is deprecated - addURL(f.toURL()); - } - - /** - *

addURL.

- * - * @param u a {@link java.net.URL} object. - * @throws java.io.IOException if any. - */ - protected static void addURL(URL u) throws IOException { - URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader(); - Class sysclass = URLClassLoader.class; - - try { - Method method = sysclass.getDeclaredMethod("addURL", parameters); - method.setAccessible(true); - method.invoke(sysloader, u); - } catch (Exception e) { - Util.logStackTraceToError(e); - throw new IOException("Error, could not add URL to system classloader"); - } - - } -} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java b/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java deleted file mode 100644 index 875c64d0..00000000 --- a/graphwalker-core/src/main/java/org/graphwalker/core/EventDrivenModels.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core; - -import org.apache.log4j.Logger; - -import java.util.Stack; -import java.util.Vector; - -/** - *

EventDrivenModels class.

- */ -public class EventDrivenModels { - private static Logger logger = Util.setupLogger(EventDrivenModels.class); - Vector models = new Vector(); - Stack pausedModels = new Stack(); - private Object executionClass = null; - private ThreadWrapper executingModel = null; - private static final Object lockbox = new Object(); - - /** - *

Constructor for EventDrivenModels.

- * - * @param executionClass a {@link java.lang.Object} object. - */ - public EventDrivenModels(Object executionClass) { - this.executionClass = executionClass; - } - - /** - *

Constructor for EventDrivenModels.

- */ - public EventDrivenModels() { - } - - /** - *

Getter for the field models.

- * - * @return a {@link java.util.Vector} object. - */ - public Vector getModels() { - return models; - } - - /** - *

addModel.

- * - * @param model a {@link org.graphwalker.core.ModelBasedTesting} object. - */ - public void addModel(ModelBasedTesting model) { - models.add(model); - } - - /** - *

runModel.

- * - * @param modelName a {@link java.lang.String} object. - */ - public void runModel(String modelName) { - stopAndSwitchModel(modelName); - } - - /** - *

stopAndSwitchModel.

- * - * @param modelName a {@link java.lang.String} object. - */ - public void stopAndSwitchModel(String modelName) { - logger.debug("Will switch to model: " + modelName); - if (executingModel != null) { - logger.debug("Stopping model thread: " + executingModel); - executingModel.getModel().stop(); - executingModel = null; - } - for (ModelBasedTesting m : models) { - if (modelName.equals(m.getGraph().getLabelKey())) { - logger.debug("Found the model, will now start it: " + m.getGraph().getLabelKey()); - executingModel = new ThreadWrapper(m); - executingModel.start(); - return; - } - } - throw new RuntimeException("Did not find a model: " + modelName); - } - - /** - *

pauseAndSwitchModel.

- * - * @param modelName a {@link java.lang.String} object. - */ - public void pauseAndSwitchModel(String modelName) { - logger.debug("Will switch to model: " + modelName); - if (executingModel != null) { - logger.debug("Suspending model thread: " + executingModel); - executingModel.getModel().suspend(); - pausedModels.push(executingModel); - executingModel = null; - } - for (ModelBasedTesting m : models) { - if (modelName.equals(m.getGraph().getLabelKey())) { - logger.debug("Found the model, will now start it: " + m.getGraph().getLabelKey()); - executingModel = new ThreadWrapper(m); - executingModel.start(); - return; - } - } - throw new RuntimeException("Did not find a model: " + modelName); - } - - /** - *

waitToFinish.

- */ - public void waitToFinish() { - try { - while (true) { - synchronized (lockbox) { - if (executingModel == null) { - if (pausedModels.isEmpty()) { - logger.debug("All threads terminated"); - return; - } - logger.debug("Found suspended model: " + pausedModels.peek()); - executingModel = pausedModels.pop(); - executingModel.getModel().resume(); - } else { - if (executingModel.getState() == Thread.State.TERMINATED) { - logger.debug("Terminated: " + executingModel); - executingModel = null; - } - } - } - Thread.sleep(100); - } - } catch (InterruptedException e) { - Util.logStackTraceToError(e); - } - } - - public class ThreadWrapper extends Thread { - private ModelBasedTesting model; - - public ModelBasedTesting getModel() { - return model; - } - - public void setModel(ModelBasedTesting model) { - this.model = model; - } - - public ThreadWrapper(ModelBasedTesting model) { - this.model = model; - setName(model.getGraph().getLabelKey()); - } - - @Override - public void run() { - try { - model.setCurrentVertex("Start"); - model.reload(); - model.executePath(executionClass); - } catch (InterruptedException e) { - Util.logStackTraceToError(e); - } catch (RuntimeException e) { - logger.debug(e.getMessage()); - } - } - } -} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java b/graphwalker-core/src/main/java/org/graphwalker/core/GraphWalker.java similarity index 72% rename from graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java rename to graphwalker-core/src/main/java/org/graphwalker/core/GraphWalker.java index 5270b149..89aef41e 100644 --- a/graphwalker-core/src/main/java/org/graphwalker/core/exceptions/GeneratorException.java +++ b/graphwalker-core/src/main/java/org/graphwalker/core/GraphWalker.java @@ -2,7 +2,7 @@ * #%L * GraphWalker Core * %% - * Copyright (C) 2011 GraphWalker + * Copyright (C) 2011 - 2012 GraphWalker * %% * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,21 +23,28 @@ * THE SOFTWARE. * #L% */ +package org.graphwalker.core; -package org.graphwalker.core.exceptions; +import org.graphwalker.core.model.Element; /** - *

GeneratorException class.

+ *

GraphWalker interface.

+ * + * @author nilols + * @version $Id: $ */ -public class GeneratorException extends Exception { - private static final long serialVersionUID = -6355062559015580205L; +public interface GraphWalker { /** - *

Constructor for GeneratorException.

+ *

hasNextStep.

* - * @param message a {@link java.lang.String} object. + * @return a boolean. */ - public GeneratorException(String message) { - super(message); - } + boolean hasNextStep(); + /** + *

getNextStep.

+ * + * @return a {@link org.graphwalker.core.model.Element} object. + */ + Element getNextStep(); } diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/GraphWalkerFactory.java b/graphwalker-core/src/main/java/org/graphwalker/core/GraphWalkerFactory.java new file mode 100644 index 00000000..d6002756 --- /dev/null +++ b/graphwalker-core/src/main/java/org/graphwalker/core/GraphWalkerFactory.java @@ -0,0 +1,73 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 - 2012 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker.core; + +import org.graphwalker.core.configuration.Configuration; + +import java.io.File; + +/** + *

GraphWalkerFactory class.

+ * + * @author nilols + * @version $Id: $ + */ +public class GraphWalkerFactory { + + private GraphWalkerFactory() { + } + + /** + *

create.

+ * + * @param file a {@link java.lang.String} object. + * @return a {@link org.graphwalker.core.GraphWalker} object. + */ + public static GraphWalker create(String file) { + return new GraphWalkerImpl(file); + } + + /** + *

create.

+ * + * @param file a {@link java.io.File} object. + * @return a {@link org.graphwalker.core.GraphWalker} object. + */ + public static GraphWalker create(File file) { + return new GraphWalkerImpl(file); + } + + /** + *

create.

+ * + * @param configuration a {@link org.graphwalker.core.configuration.Configuration} object. + * @return a {@link org.graphwalker.core.GraphWalker} object. + */ + public static GraphWalker create(Configuration configuration) { + return new GraphWalkerImpl(configuration); + } + +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/GraphWalkerImpl.java b/graphwalker-core/src/main/java/org/graphwalker/core/GraphWalkerImpl.java new file mode 100644 index 00000000..51983c51 --- /dev/null +++ b/graphwalker-core/src/main/java/org/graphwalker/core/GraphWalkerImpl.java @@ -0,0 +1,100 @@ +/* + * #%L + * GraphWalker Core + * %% + * Copyright (C) 2011 - 2012 GraphWalker + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ +package org.graphwalker.core; + +import org.graphwalker.core.configuration.Configuration; +import org.graphwalker.core.configuration.ConfigurationFactory; +import org.graphwalker.core.machine.Machine; +import org.graphwalker.core.machine.MachineImpl; +import org.graphwalker.core.model.Element; + +import java.io.File; + +// TODO: Logging +// TODO: Requirements +// TODO: Statistics +// TODO: More stop conditions +// TODO: More path generators + +/** + *

GraphWalkerImpl class.

+ * + * @author nilols + * @version $Id: $ + */ +public class GraphWalkerImpl implements GraphWalker { + + private final Machine myMachine; + + /** + *

Constructor for GraphWalkerImpl.

+ * + * @param file a {@link java.lang.String} object. + */ + public GraphWalkerImpl(String file) { + this(ConfigurationFactory.create(file)); + } + + /** + *

Constructor for GraphWalkerImpl.

+ * + * @param file a {@link java.io.File} object. + */ + public GraphWalkerImpl(File file) { + this(ConfigurationFactory.create(file)); + } + + /** + *

Constructor for GraphWalkerImpl.

+ * + * @param configuration a {@link org.graphwalker.core.configuration.Configuration} object. + */ + public GraphWalkerImpl(Configuration configuration) { + myMachine = new MachineImpl(configuration); + } + + private Machine getMachine() { + return myMachine; + } + + /** + *

hasNextStep.

+ * + * @return a boolean. + */ + public boolean hasNextStep() { + return getMachine().hasNextStep(); + } + + /** + *

getNextStep.

+ * + * @return a {@link org.graphwalker.core.model.Element} object. + */ + public Element getNextStep() { + return getMachine().getNextStep(); + } +} diff --git a/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java b/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java deleted file mode 100644 index 8571950e..00000000 --- a/graphwalker-core/src/main/java/org/graphwalker/core/Keywords.java +++ /dev/null @@ -1,522 +0,0 @@ -/* - * #%L - * GraphWalker Core - * %% - * Copyright (C) 2011 GraphWalker - * %% - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * #L% - */ - -package org.graphwalker.core; - -import org.graphwalker.core.exceptions.GeneratorException; -import org.graphwalker.core.exceptions.StopConditionException; -import org.graphwalker.core.multipleModels.ModelHandler; - -import java.util.Vector; - -/** - * Handles the common constants for the org.graphwalker package. This includes - * reserved key words, and text strings used for storing custom data as - * UserDatum in graphs, vertices and edges. - */ -public class Keywords { - - /** - * Each graph has a start (entry) vertex, and that vertex holds this datum.
- * There is only one vertex in a graph, holding this datum.
- * Used by MBT when merging graphs, and when generating test sequences. - */ - public static final String START_NODE = "Start"; - - /** - * Each graph has one and only one vertex to which the START_NODE points to. - * The vertex which has this keyword set, is that node. - */ - public static final String GRAPH_VERTEX = "graph_vertex"; - - /** - * The stop (exit) vertex denotes an exit point in a graph.
- * There can only be one vertex in a graph, holding this datum.
- * Only sub-graphs can have a stop vertex.
- * Used by MBT only when merging graphs. - */ - public static final String STOP_NODE = "Stop"; - - /** - * The id taken from the graphml file. TODO Investigate if this datum is - * deprecated - */ - public static final String ID_KEY = "id"; - - /** - * The graph editor yEd, can use images to depict vertices, which normally - * gets lost during merging. So, when writing merged graphs back to file, this - * datum holds the path and file of that image. - */ - public static final String IMAGE_KEY = "image"; - - /** - * The graph editor yEd, can use images to depict vertices, which normally - * gets lost during merging. So, when writing merged graphs back to file, this - * datum holds the width of that image. - */ - public static final String WIDTH_KEY = "width"; - - /** - * The graph editor yEd, can use images to depict vertices, which normally - * gets lost during merging. So, when writing merged graphs back to file, this - * datum holds the height of that image. - */ - public static final String HEIGHT_KEY = "height"; - - /** - * The x position of the node, as saved by the yEd editor. - */ - public static final String X_POS = "x_pos"; - - /** - * The y position of the node, as saved by the yEd editor. - */ - public static final String Y_POS = "y_pos"; - - /** - * When merging graphs, the source file of each graph is noted, so that in the - * event of an error, the correct graph file can be used in meaningful error - * messages to the end user. - */ - public static final String FILE_KEY = "file"; - - /** - * The name of the vertex or edge, that will result in a method or function - * call in the executing test tool.
- * * The label of an edge can be empty (or null).
- * * A vertex must always have a label.
- * * The label is always defined at the first line in a label.
- */ - public static final String LABEL_KEY = "label"; - - /** - * This datum contain the complete text hold by a label. - */ - public static final String FULL_LABEL_KEY = "full_label"; - - /** - * This datum contains a counter for each vertex and edge. Used by MBT during - * a online test. Every time a vertex or an edge is traversed it is visited, - * thus incremented once. - */ - public static final String VISITED_KEY = "visited"; - - /** - * Used by MBT during random walks during test sequence generation. It holds a - * real value between 0 and 1, and represents the probability that a specific - * edge should be chosen. A value of 0.05, would mean a 5% chance of that edge - * to be selected during a run.
- * * Only edges uses this datum. - */ - public static final String WEIGHT_KEY = "weight"; - - /** - * Used by MBT to store information about manual testing. This data should - * containing text regarding an action or expected result. - */ - public static final String DATA_KEY = "data"; - - /** - * The datum provides the edge or vertex a unique integer number, uniquely - * identifying the object.
- * Generated by MBT when reading and merging graphs. Also used to provide - * better info during logging at:
- * * Parsing graphml files
- * * Merging
- * * Generating offline and online test sequences - */ - public static final String INDEX_KEY = "index"; - - /** - * This datum is used by MBT when merging graphs. It tells MBT that the vertex - * containing this key word, should be merged with the first occurence of a - * vertex with the same label. - */ - public static final String MERGE = "merge"; - - /** - * This datum is used by MBT when merging graphs. It tells MBT that the vertex - * containing this key word, should not merge this vertex with any subgraph. - */ - public static final String NO_MERGE = "no merge"; - - /** - * Used internally by MBT. When graphs are merged, MBT keeps track of which - * vertices have been merged by MBT. - */ - public static final String MERGED_BY_MBT = "merged by mbt"; - - /** - * Used internally by MBT. A vertex in a graph with the label START, and a - * single empty out edge is defined as the main graph (or Mother Graph) - */ - public static final String MOTHER_GRAPH_START_VERTEX = "mother graph start vertex"; - - /** - * Used internally by MBT. A vertex in a graph with the label START, and a - * single non-empty out edge is defined as a subgraph. - */ - public static final String SUBGRAPH_START_VERTEX = "subgraph start vertex"; - - /** - * A vertex or an edge with the key word BLOCKED, will not participate in the - * resulting (merged) graph, end thus be excluded. - */ - public static final String BLOCKED = "BLOCKED"; - - /** - * An edge with the key word BACKTRACK is used to enable a simple logic that - * enables a end user to backtrack in the graph to the previous vertex.
- * This is used only during a online run. - */ - public static final String BACKTRACK = "BACKTRACK"; - - /** - * This datum contains the label parameter used by an edge in EFSM models. - */ - public static final String PARAMETER_KEY = "parameter"; - - /** - * This datum contains the label guard used by an edge in EFSM models. - */ - public static final String GUARD_KEY = "guard"; - - /** - * This datum contains the actions used by an edge in EFSM models. The datum - * is a String containing the actions. - */ - public static final String ACTIONS_KEY = "action"; - - /** - * This datum contains the requirement tag which can be set in a vertex or - * edge. The datum is a String containing one or more requirement tag. - * Multiple tags are to be separated using commas. - */ - public static final String REQTAG_KEY = "reqtag"; - - /** - * Used when running multiple-models, see also {@link ModelHandler}. The - * meaning of this keyword is that if a vertex has this set, the execution of - * the model will be paused, and the execution may switch to another model - * with the same label as the vertex of the {@link Keywords#GRAPH_VERTEX - * GRAPH_VERTEX} in that other model. - */ - public static final String SWITCH_MODEL = "switch_model"; - - /** - * This datum contains the dijkstra object used to find the shortest path in - * models. - */ - public static final String DIJKSTRA = "dijkstra"; - - /** Constant CONDITION_REACHED_EDGE=1001 */ - public static final int CONDITION_REACHED_EDGE = 1001; - - /** Constant CONDITION_REACHED_VERTEX=1002 */ - public static final int CONDITION_REACHED_VERTEX = 1002; - - /** Constant CONDITION_EDGE_COVERAGE=1003 */ - public static final int CONDITION_EDGE_COVERAGE = 1003; - - /** Constant CONDITION_VERTEX_COVERAGE=1004 */ - public static final int CONDITION_VERTEX_COVERAGE = 1004; - - /** Constant CONDITION_TEST_LENGTH=1005 */ - public static final int CONDITION_TEST_LENGTH = 1005; - - /** Constant CONDITION_TEST_DURATION=1006 */ - public static final int CONDITION_TEST_DURATION = 1006; - - /** Constant CONDITION_REQUIREMENT_COVERAGE=1007 */ - public static final int CONDITION_REQUIREMENT_COVERAGE = 1007; - - /** Constant CONDITION_REACHED_REQUIREMENT=1008 */ - public static final int CONDITION_REACHED_REQUIREMENT = 1008; - - /** Constant CONDITION_NEVER=1009 */ - public static final int CONDITION_NEVER = 1009; - - /** Constant GENERATOR_RANDOM=2001 */ - public static final int GENERATOR_RANDOM = 2001; - - /** Constant GENERATOR_A_STAR=2002 */ - public static final int GENERATOR_A_STAR = 2002; - - /** Constant GENERATOR_LIST=2003 */ - public static final int GENERATOR_LIST = 2003; - - /** Constant GENERATOR_STUB=2004 */ - public static final int GENERATOR_STUB = 2004; - - /** Constant GENERATOR_REQUIREMENTS=2005 */ - public static final int GENERATOR_REQUIREMENTS = 2005; - - /** Constant GENERATOR_SHORTEST_NON_OPTIMIZED=2006 */ - public static final int GENERATOR_SHORTEST_NON_OPTIMIZED = 2006; - - /** Constant GENERATOR_MANUAL_HTML=2007 */ - public static final int GENERATOR_MANUAL_HTML = 2007; - - /** Constant GENERATOR_ALL_PATH_PERMUTATIONS=2008 */ - public static final int GENERATOR_ALL_PATH_PERMUTATIONS = 2008; - - /** - * Holds the pre-defined key words - */ - private static Vector reservedKeyWords = new Vector(); - - /** - * Defines the key words - */ - static { - Keywords.reservedKeyWords.add("BLOCKED"); - Keywords.reservedKeyWords.add("BACKTRACK"); - Keywords.reservedKeyWords.add("MERGE"); - Keywords.reservedKeyWords.add("NO_MERGE"); - Keywords.reservedKeyWords.add("SWITCH_MODEL"); - } - - /** - * Returns true if the wordToCheck is a pre-defined key word. - * - * @param wordToCheck a {@link java.lang.String} object. - * @return a boolean. - */ - public static boolean isKeyWord(final String wordToCheck) { - return Keywords.reservedKeyWords.contains(wordToCheck.toUpperCase()); - } - - public static class StopCondition { - private String name; - private String description; - private Integer id; - - private StopCondition(final String name, final String description, final Integer id) { - this.name = name; - this.description = description; - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(final String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(final String description) { - this.description = description; - } - - public Integer getId() { - return id; - } - - public void setId(final Integer id) { - this.id = id; - } - } - - /** - * Holds the pre-defined list of stop-condition. - */ - private static Vector stopConditions = new Vector(); - - /** - * Defines the stop-condition strings - * - * @return a {@link java.util.Vector} object. - */ - static { - Keywords.stopConditions.add(new StopCondition("REACHED_EDGE", "REACHED_EDGE:", Keywords.CONDITION_REACHED_EDGE)); - Keywords.stopConditions.add(new StopCondition("REACHED_VERTEX", - "REACHED_VERTEX:", Keywords.CONDITION_REACHED_VERTEX)); - Keywords.stopConditions.add(new StopCondition("EDGE_COVERAGE", "EDGE_COVERAGE:", - Keywords.CONDITION_EDGE_COVERAGE)); - Keywords.stopConditions.add(new StopCondition("VERTEX_COVERAGE", "VERTEX_COVERAGE:", - Keywords.CONDITION_VERTEX_COVERAGE)); - Keywords.stopConditions.add(new StopCondition("TEST_LENGTH", "TEST_LENGTH:", - Keywords.CONDITION_TEST_LENGTH)); - Keywords.stopConditions.add(new StopCondition("TEST_DURATION", "TEST_DURATION: