Crossfire JXClient, Trunk  R20561
TestCrossfireServerConnection.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.server.crossfire;
23 
25 import org.jetbrains.annotations.NotNull;
26 import org.jetbrains.annotations.Nullable;
27 import org.junit.Assert;
28 
36 
41  super(new Model());
42  }
43 
47  @Override
48  public void start() {
49  Assert.fail();
50  }
51 
55  @Override
56  public void stop() {
57  Assert.fail();
58  }
59 
63  @Override
64  public void setCrossfireUpdateMapListener(@Nullable final CrossfireUpdateMapListener listener) {
65  Assert.fail();
66  }
67 
71  @Override
72  public void sendAddme() {
73  Assert.fail();
74  }
75 
79  @Override
80  public void sendApply(final int tag) {
81  Assert.fail();
82  }
83 
87  @Override
88  public void sendAskface(final int faceNum) {
89  Assert.fail();
90  }
91 
95  @Override
96  public void sendExamine(final int tag) {
97  Assert.fail();
98  }
99 
103  @Override
104  public void sendLock(final boolean val, final int tag) {
105  Assert.fail();
106  }
107 
111  @Override
112  public void sendLookat(final int dx, final int dy) {
113  Assert.fail();
114  }
115 
119  @Override
120  public void sendMark(final int tag) {
121  Assert.fail();
122  }
123 
127  @Override
128  public void sendMove(final int to, final int tag, final int nrof) {
129  Assert.fail();
130  }
131 
135  @Override
136  public int sendNcom(final int repeat, @NotNull final String command) {
137  Assert.fail();
138  throw new AssertionError();
139  }
140 
144  @Override
145  public void sendReply(@NotNull final String text) {
146  Assert.fail();
147  }
148 
152  @Override
153  public void sendRequestinfo(@NotNull final String infoType) {
154  Assert.fail();
155  }
156 
160  @Override
161  public void sendSetup(@NotNull final String... options) {
162  Assert.fail();
163  }
164 
168  @Override
169  public void sendToggleextendedtext(@NotNull final int... types) {
170  Assert.fail();
171  }
172 
176  @Override
177  public void sendVersion(final int csval, final int scval, @NotNull final String vinfo) {
178  Assert.fail();
179  }
180 
184  @Override
185  public void setPreferredMapSize(final int preferredMapWidth, final int preferredMapHeight) {
186  Assert.fail();
187  }
188 
192  @Override
193  public void setPreferredNumLookObjects(final int preferredNumLookObjects) {
194  Assert.fail();
195  }
196 
200  @Nullable
201  @Override
202  public String getAccountName() {
203  return null;
204  }
205 
209  @Override
210  public void addClientSocketListener(@NotNull final ClientSocketListener clientSocketListener) {
211  }
212 
216  @Override
217  public void removeClientSocketListener(@NotNull final ClientSocketListener clientSocketListener) {
218  throw new AssertionError();
219  }
220 
224  @Override
225  public void connect(@NotNull final String hostname, final int port) {
226  Assert.fail();
227  }
228 
232  @Override
233  public void disconnect(@NotNull final String reason) {
234  Assert.fail();
235  }
236 
240  @Override
241  public void sendAccountLogin(@NotNull final String login, @NotNull final String password) {
242  Assert.fail();
243  }
244 
248  @Override
249  public void sendAccountPlay(@NotNull final String name) {
250  Assert.fail();
251  }
252 
256  @Override
257  public void sendAccountLink(final int force, @NotNull final String login, @NotNull final String password) {
258  Assert.fail();
259  }
260 
264  @Override
265  public void sendAccountCreate(@NotNull final String login, @NotNull final String password) {
266  Assert.fail();
267  }
268 
272  @Override
273  public void sendAccountCharacterCreate(@NotNull final String login, @NotNull final String password) {
274  Assert.fail();
275  }
276 
277  @Override
278  public void sendAccountPassword(@NotNull final String currentPassword, @NotNull final String newPassword) {
279  Assert.fail();
280  }
281 
282 }
void sendAskface(final int faceNum)
Sends an "askface" command.the face number to request
Abstract base class for CrossfireServerConnection implementing classes.
void setPreferredMapSize(final int preferredMapWidth, final int preferredMapHeight)
Sets the preferred map size.the preferred map width in tiles; must be odd the preferred map height in...
void sendAccountCreate(@NotNull final String login, @NotNull final String password)
Sends a request to create a new account.the account login the account password
void addClientSocketListener(@NotNull final ClientSocketListener clientSocketListener)
Adds a ClientSocketListener to notify.the client socket listener to add
void sendAccountLink(final int force, @NotNull final String login, @NotNull final String password)
Sends a request to add an existing character to an account.0 to allow failure, 1 to force in certain ...
void sendApply(final int tag)
Sends an "apply" command to the server.the item to apply
void sendMove(final int to, final int tag, final int nrof)
Sends a "move" command to the server.the destination location the item to move the number of items to...
void sendLock(final boolean val, final int tag)
Sends a "lock" command to the server.whether to lock the item the item to lock
void sendExamine(final int tag)
Sends an "examine" command to the server.the item to examine
void disconnect(@NotNull final String reason)
Disconnects from the server.Does nothing if not connected. the reason for the disconnect ...
Combines all model classes that are updated.
Definition: Model.java:44
void sendAccountLogin(@NotNull final String login, @NotNull final String password)
Asks for an account login.the account login the account password
void sendReply(@NotNull final String text)
Sends a "reply" command to the server.the text to reply
int sendNcom(final int repeat, @NotNull final String command)
Sends a "ncom" command to the server.the repeat count the command the packet id
void sendAccountPlay(@NotNull final String name)
Sends a request to play a character from an account.the character's name to play
void sendAccountPassword(@NotNull final String currentPassword, @NotNull final String newPassword)
Sends a request to change the account's password.
Interface for listeners interested in ClientSocket related events.
void sendLookat(final int dx, final int dy)
Sends a "lookat" command to the server.the x-coordinate in tiles, relative to the player the y-coordi...
void setPreferredNumLookObjects(final int preferredNumLookObjects)
Sets the maximum number of objects in the ground view.Must not be called in connected state...
void removeClientSocketListener(@NotNull final ClientSocketListener clientSocketListener)
Removes a ClientSocketListener to notify.the client socket listener to remove
String getAccountName()
Returns the current account name.the current account name ornull
void sendToggleextendedtext(@NotNull final int... types)
Sends a "toggleextendedtext" command to the server.the types to request
void setCrossfireUpdateMapListener(@Nullable final CrossfireUpdateMapListener listener)
Sets a listener to be notified about map changes.At most one such listener may be set...
void sendVersion(final int csval, final int scval, @NotNull final String vinfo)
Sends a "version" command to the server.the client version number the server version number the clien...
void sendMark(final int tag)
Sends a "mark" command to the server.the item to mark
void sendRequestinfo(@NotNull final String infoType)
Sends a "requestinfo" command to the server.the info type to request
void connect(@NotNull final String hostname, final int port)
Attempts to connect the client to a server.the hostname to connect to the port to connect to ...
void sendAccountCharacterCreate(@NotNull final String login, @NotNull final String password)
Sends a request to create a new character associated to the account.the character's name the characte...
void sendSetup(@NotNull final String... options)
Sends a "setup" command to the server.the option/value pairs to send