1 package org.snipsnap.test.mock; 2 3 import org.apache.lucene.search.Hits; 4 import org.snipsnap.snip.Blog; 5 import org.snipsnap.snip.Snip; 6 import org.snipsnap.snip.SnipSpace; 7 8 import java.sql.Timestamp ; 9 import java.util.List ; 10 import java.util.Map ; 11 import java.util.HashMap ; 12 13 public class MockSnipSpace extends MockObject implements SnipSpace { 14 private Map snips; 15 16 public MockSnipSpace() { 17 super(); 18 snips = new HashMap (); 19 } 20 21 public Snip[] match(String start, String end) { 22 return new Snip[0]; 23 } 24 25 public Snip[] match(String pattern) { 27 return new Snip[0]; 28 } 29 30 public void changed(Snip snip) { 31 } 32 33 public void init() { 34 } 35 36 public void setETag() { 37 } 38 39 public int getSnipCount() { 40 return 0; 41 } 42 43 public List getChanged() { 44 return null; 45 } 46 47 public List getChanged(int count) { 48 return null; 49 } 50 51 public List getAll() { 52 return null; 53 } 54 55 public List getSince(Timestamp date) { 56 return null; 57 } 58 59 public List getByDate(String nameSpace, String start, String end) { 60 return null; 61 } 62 63 public List getHot(int count) { 64 return null; 65 } 66 67 public List getComments(Snip snip) { 68 return null; 69 } 70 71 public List getByUser(String login) { 72 return null; 73 } 74 75 public List getChildren(Snip snip) { 76 return null; 77 } 78 79 public List getChildrenDateOrder(Snip snip, int count) { 80 return null; 81 } 82 83 public List getChildrenModifiedOrder(Snip snip, int count) { 84 return null; 85 } 86 87 public void reIndex() { 88 } 89 90 public Hits search(String queryString) { 91 return null; 92 } 93 94 public Blog getBlog(String name) { 95 return null; 96 } 97 98 public boolean exists(String name) { 99 inc("exists"); 101 return snips.containsKey(name); 102 } 103 104 public Snip load(String name) { 105 return null; 106 } 107 108 public void store(Snip snip) { 109 } 110 111 public Blog getBlog() { 112 return null; 113 } 114 115 public void systemStore(Snip snip) { 116 } 117 118 public void delayedStore(Snip snip) { 119 } 120 121 public Snip create(String name, String content) { 122 inc("create"); 123 return null; 124 } 125 126 public void remove(Snip snip) { 127 } 128 129 public String getETag() { 130 return null; 131 } 132 133 public void addSnip(String name) { 134 snips.put(name, name); 135 } 136 137 public Snip copy(Snip snip, String newName) { 138 return null; 139 } 140 } 141 | Popular Tags |