Package com.quui.chat.tests

Source Code of com.quui.chat.tests.RubyCallerTest

package com.quui.chat.tests;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

import org.junit.Before;
import org.junit.Test;

import com.quui.chat.commands.RubyCaller;
import com.quui.chat.ui.HollalaSolution;

public class RubyCallerTest {

  private RubyCaller caller;

  @Before
  public void init() {
    Properties p = new Properties();
    try {
      p.load(new FileInputStream("config/hollaka.properties"));
    } catch (FileNotFoundException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    caller = new RubyCaller("src-ruby", p, new HollalaSolution(p
        .getProperty("name"), "dude"));
  }

  @Test
  public void call() {
    // String string = caller.exec("!tuennes", "testing1")[0];
    // Assert.assertEquals("Testing1", string);
    // string = caller.exec("!kappes", "testing2");
    // Assert.assertEquals("Testing2", string);
    // string = caller.exec("kappesdudu", "testing2");
    // Assert.assertEquals("", string);
  }

  @Test
  public void callAll() {
    // for (String command : caller.getMap().keySet()) {
    // String string = (String) caller.exec(command, "test")[0];
    // Assert.assertTrue(string != null);
    // }
  }

}
TOP

Related Classes of com.quui.chat.tests.RubyCallerTest

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.