es.upm.dit.gsi.beast.reader.mas
Class CreateMASCaseManager

java.lang.Object
  extended by es.upm.dit.gsi.beast.reader.mas.CreateMASCaseManager

public class CreateMASCaseManager
extends Object

Project: beast File: es.upm.dit.gsi.beast.reader.mas.CreateMASCaseManager.java Main class that generates the CaseManager.java File to run the MAS tests. Grupo de Sistemas Inteligentes Departamento de Ingeniería de Sistemas Telemáticos Universidad Politécnica de Madrid (UPM)

Version:
0.1
Author:
Alberto Mardomingo, Jorge Solitario, alvarocarrera

Constructor Summary
CreateMASCaseManager()
           
 
Method Summary
static void addStory(File caseManager, String storyName, String testPath, String user, String feature, String benefit)
          The third method to write caseManager.
static void closeMASCaseManager(File caseManager)
          Method to close the file caseManager.
static void createTest(File caseManager, String test_name, String test_path, String scenario, String given, String when, String then)
          The second method to write caseManager.
static File startMASCaseManager(String package_path, String dest_dir)
          This method creates CaseManager file and writes on it: the package, the imports, its comments and the class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateMASCaseManager

public CreateMASCaseManager()
Method Detail

startMASCaseManager

public static File startMASCaseManager(String package_path,
                                       String dest_dir)
                                throws BeastException
This method creates CaseManager file and writes on it: the package, the imports, its comments and the class name.

Parameters:
package_path - as es.upm.dit...
dest_dir - as src/main/java
Returns:
the File with its first part written
Throws:
BeastException

createTest

public static void createTest(File caseManager,
                              String test_name,
                              String test_path,
                              String scenario,
                              String given,
                              String when,
                              String then)
The second method to write caseManager. Its task is to write the Tests to run in our platform, so this method is called once for each Test by MasReader.java when there is no story Name.

Parameters:
caseManager - the file where the test must be added
test_name - the name of the test to be written
test_path - the path where the test can be founded
scenario - the name of the scenario of the test
given - the GIVEN part of the plain text given by the client
when - the WHEN part of the plain text given by the client
then - the THEN part of the plain text given by the client

addStory

public static void addStory(File caseManager,
                            String storyName,
                            String testPath,
                            String user,
                            String feature,
                            String benefit)
                     throws BeastException
The third method to write caseManager. Its task is to write the call to the story to be run.

Parameters:
caseManager - the file where the test must be written
storyName - the name of the story
test_path - the path where the story can be found
user - the user requesting the story
feature - the feature requested by the user
benefit - the benefit provided by the feature
Throws:
BeastException

closeMASCaseManager

public static void closeMASCaseManager(File caseManager)
Method to close the file caseManager. It is called just one time, by the MASReader, once every test and stroy have been added.

Parameters:
caseManager -


Copyright © 2014 Grupo de Sistemas Inteligentes - Universidad Politécnica de Madrid. All Rights Reserved.