Crossfire JXClient, Trunk  R20561
TestScriptProcess.java
Go to the documentation of this file.
1 /*
2  * This file is part of JXClient, the Fullscreen Java Crossfire Client.
3  *
4  * JXClient is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * JXClient is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with JXClient; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * Copyright (C) 2005-2008 Yann Chachkoff.
19  * Copyright (C) 2006-2011 Andreas Kirschbaum.
20  */
21 
22 package com.realtime.crossfire.jxclient.test;
23 
26 import org.jetbrains.annotations.NotNull;
27 import org.jetbrains.annotations.Nullable;
28 import org.junit.Assert;
29 
35 public class TestScriptProcess implements ScriptProcess {
36 
40  @Override
41  public int getScriptId() {
42  Assert.fail();
43  throw new AssertionError();
44  }
45 
49  @NotNull
50  @Override
51  public String getFilename() {
52  Assert.fail();
53  throw new AssertionError();
54  }
55 
59  @Override
60  public void commandSent(@NotNull final String cmd) {
61  Assert.fail();
62  }
63 
67  @Override
68  public void addScriptProcessListener(@NotNull final ScriptProcessListener scriptProcessListener) {
69  Assert.fail();
70  }
71 
75  @Override
76  public void killScript() {
77  Assert.fail();
78  }
79 
83  @Override
84  public int compareTo(@NotNull final ScriptProcess o) {
85  Assert.fail();
86  throw new AssertionError();
87  }
88 
92  @Override
93  public int hashCode() {
94  return 0;
95  }
96 
100  @Override
101  public boolean equals(@Nullable final Object obj) {
102  return obj != null && obj.getClass() == getClass();
103  }
104 
105 }
void addScriptProcessListener(@NotNull final ScriptProcessListener scriptProcessListener)
Adds a ScriptProcessListener to be notified.the listener to add
void killScript()
Kills the script process.Does nothing if the process is not running.
Interface for listeners interested in ScriptProcess related events.
void commandSent(@NotNull final String cmd)
Sends a message to the script process.the message to send
int getScriptId()
Returns the script ID identifying this script instance.the script ID
String getFilename()
Returns the script's filename.the script's filename
Implements ScriptProcess for regression tests.
An external command executed as a client-sided script.