Commit a58cfd2 1 parent 80df8c2 commit a58cfd2 Copy full SHA for a58cfd2
File tree 3 files changed +83
-8
lines changed
junit/com/jreale4/RPG/shared
RPGPersistence/src/com/jreale4/RPG/server/model/persist
3 files changed +83
-8
lines changed Original file line number Diff line number Diff line change 1
- <?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <classpath >
3
- <classpathentry kind =" src" path =" junit" />
4
- <classpathentry kind =" con" path =" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7" />
5
- <classpathentry kind =" con" path =" org.eclipse.jdt.junit.JUNIT_CONTAINER/4" />
6
- <classpathentry combineaccessrules =" false" kind =" src" path =" /RPGModelClasses" />
7
- <classpathentry kind =" output" path =" bin" />
8
- </classpath >
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <classpath >
3
+ <classpathentry kind =" src" path =" junit" />
4
+ <classpathentry kind =" con" path =" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7" />
5
+ <classpathentry kind =" con" path =" org.eclipse.jdt.junit.JUNIT_CONTAINER/4" />
6
+ <classpathentry combineaccessrules =" false" kind =" src" path =" /RPGModelClasses" />
7
+ <classpathentry combineaccessrules =" false" kind =" src" path =" /RPG" />
8
+ <classpathentry combineaccessrules =" false" kind =" src" path =" /RPGControllers" />
9
+ <classpathentry kind =" output" path =" bin" />
10
+ </classpath >
Original file line number Diff line number Diff line change
1
+ package com .jreale4 .RPG .shared ;
2
+
3
+ import com .google .gwt .user .client .rpc .AsyncCallback ;
4
+ import com .jreale4 .RPG .client .RPC ;
5
+
6
+ import junit .framework .TestCase ;
7
+
8
+ public class HeroTest2 extends TestCase {
9
+ Hero h ;
10
+
11
+ protected void setUp (){
12
+ RPC .loginService .login ("jreale" , "darking" , new AsyncCallback <User >() {
13
+
14
+ @ Override
15
+ public void onSuccess (User result ) {
16
+ if (result == null ) {
17
+ // no such user
18
+ String text = "No Such User Exists" ;
19
+ System .out .println (text );
20
+
21
+ } else {
22
+ // login successful
23
+ System .out .println ("Login Successful!" );
24
+
25
+ }
26
+ }
27
+
28
+ @ Override
29
+ public void onFailure (Throwable caught ) {
30
+ // TODO Auto-generated method stub
31
+
32
+ }
33
+ });
34
+ }
35
+ }
Original file line number Diff line number Diff line change
1
+ package com .jreale4 .RPG .server .model .persist ;
2
+
3
+ import java .sql .Connection ;
4
+ import java .sql .DriverManager ;
5
+ import java .sql .SQLException ;
6
+
7
+ import com .jreale4 .RPG .shared .Attack ;
8
+ import com .jreale4 .RPG .shared .Equipment ;
9
+ import com .jreale4 .RPG .shared .Hero ;
10
+ import com .jreale4 .RPG .shared .Item ;
11
+ import com .jreale4 .RPG .shared .User ;
12
+
13
+ public class DerbyDatabase implements IDatabase {
14
+
15
+ @ Override
16
+ public User logIn (String userName , String password ) {
17
+ // TODO Auto-generated method stub
18
+ return null ;
19
+ }
20
+
21
+ @ Override
22
+ public Item [] getItemsForHero (Hero h ) {
23
+ // TODO Auto-generated method stub
24
+ return null ;
25
+ }
26
+
27
+ @ Override
28
+ public Attack [] getAttacksForHero (Hero h ) {
29
+ // TODO Auto-generated method stub
30
+ return null ;
31
+ }
32
+
33
+ @ Override
34
+ public Equipment [] getEquipForHero (Hero h ) {
35
+ // TODO Auto-generated method stub
36
+ return null ;
37
+ }
38
+ }
You can’t perform that action at this time.
0 commit comments