Examples of SuitePresenter


Examples of com.sandwich.koan.ui.SuitePresenter

    }
    if(isEmpty() || !containsKey(ArgumentType.RUN_KOANS) && (
        containsKey(ArgumentType.CLASS_ARG) ||
        containsKey(ArgumentType.DEBUG))){
      if(ApplicationSettings.isDebug()){
        SuitePresenter presenter = ApplicationUtils.getPresenter();
        presenter.displayMessage("Planting default run target.");
        for(Entry<ArgumentType, CommandLineArgument> argEntry : entrySet()){
          presenter.displayMessage("Key: '"+argEntry.getKey()+"'");
          presenter.displayMessage("Value: '"+argEntry.getValue()+"'");
        }
      }
      put(ArgumentType.RUN_KOANS, new CommandLineArgument(ArgumentType.RUN_KOANS, true, new String[0]));
    }
  }
View Full Code Here

Examples of com.sandwich.koan.ui.SuitePresenter

  }
 
  @Test  /** Ensures that koans are ready for packaging & distribution */
  public void testKoanSuiteRunner_firstKoanFail() throws Exception {
    final KoanSuiteResult[] result = new KoanSuiteResult[]{null};
    stubPresenter(new SuitePresenter(){
        public void displayResult(KoanSuiteResult actualAppResult) {
          // don't display, capture them so we can analyze and ensure first failure is reported
          result[0] = actualAppResult;
        }
        public void displayError(String error) {fail();}
View Full Code Here

Examples of com.sandwich.koan.ui.SuitePresenter

  @Test  /** Ensures that koans are ready for packaging & distribution */
  public void testKoanSuiteRunner_allKoansFail() throws Exception {
    setRealPath();
    final KoanSuiteResult[] result = new KoanSuiteResult[]{null};
    stubPresenter(new SuitePresenter(){
      public void displayResult(KoanSuiteResult actualAppResult) {
        // don't display, capture them so we can analyze and ensure first failure is reported
        result[0] = actualAppResult;
      }
      public void displayError(String error) {
View Full Code Here

Examples of com.sandwich.koan.ui.SuitePresenter

 
  @Test  /** Ensures that koans are ready for packaging & distribution */
  public void testKoanSuiteRunner_firstKoanFail() throws Exception {
    setRealPath();
    final KoanSuiteResult[] result = new KoanSuiteResult[]{null};
    final SuitePresenter presenter = new SuitePresenter(){
      public void displayResult(KoanSuiteResult actualAppResult) {
        // don't display, capture them so we can analyze and ensure first failure is reported
        result[0] = actualAppResult;
      }
    };
View Full Code Here

Examples of com.sandwich.koan.ui.SuitePresenter

 
  @Test  /** Ensures that koans are ready for packaging & distribution */
  public void testKoanSuiteRunner_allKoansFail() throws Exception {
    setRealPath();
    final KoanSuiteResult[] result = new KoanSuiteResult[]{null};
    final SuitePresenter presenter = new SuitePresenter(){
      public void displayResult(KoanSuiteResult actualAppResult) {
        // don't display, capture them so we can analyze and ensure first failure is reported
        result[0] = actualAppResult;
      }
    };
View Full Code Here

Examples of com.sandwich.koan.ui.SuitePresenter

import com.sandwich.util.io.directories.DirectoryManager;

public abstract class KoanFileCopying extends AbstractArgumentBehavior {

  public void run(String... values) {
    SuitePresenter presenter = ApplicationUtils.getPresenter();
    try {
      copy(DirectoryManager.getProjectDataSourceDir(), DirectoryManager.getSourceDir());
    } catch (IOException e) {
      e.printStackTrace();
      presenter.displayError(getErrorMessage());
      System.exit(-1);
    }
    presenter.displayMessage(getSuccessMessage());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.