]> git.saurik.com Git - redis.git/blobdiff - client-libraries/scala/src/test/scala/com/redis/operations/KeySpaceOperationsSpec.scala
client libs removed from Redis git
[redis.git] / client-libraries / scala / src / test / scala / com / redis / operations / KeySpaceOperationsSpec.scala
diff --git a/client-libraries/scala/src/test/scala/com/redis/operations/KeySpaceOperationsSpec.scala b/client-libraries/scala/src/test/scala/com/redis/operations/KeySpaceOperationsSpec.scala
deleted file mode 100644 (file)
index ced34fe..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-import org.specs._
-import com.redis._
-
-import org.specs.mock.Mockito
-import org.mockito.Mock._
-import org.mockito.Mockito._
-import org.mockito.Mockito.doNothing
-
-object KeySpaceOperationsSpec extends Specification with Mockito {
-
-  "Redis Client Key Operations" should {
-    var client: RedisTestClient = null
-    var connection: Connection = null
-    
-    doBefore{
-      connection = mock[Connection]
-      client = new RedisTestClient(connection)
-    }
-    
-    "return all keys matching" in {
-      connection.readResponse returns "akey anotherkey adiffkey"
-      client.keys("a*")
-      connection.write("KEYS a*\r\n") was called
-    }
-    
-    "return a random key" in {
-      connection.readResponse returns "+somerandonkey"
-      client.randomKey mustEqual "somerandonkey"
-      connection.write("RANDOMKEY\r\n") was called
-    }
-    
-    "remame a key" in {
-      connection.readBoolean returns true
-      client.rename("a", "b") must beTrue
-      connection.write("RENAME a b\r\n") was called
-    }
-    
-    "rename a key only if destintation doesn't exist" in {
-      connection.readBoolean returns false
-      client.renamenx("a", "b") must beFalse
-      connection.write("RENAMENX a b\r\n") was called
-    }
-    
-    "tell the size of the db, # of keys" in {
-      connection.readInt returns 4
-      client.dbSize mustEqual 4
-      connection.write("DBSIZE\r\n") was called
-    }
-  }
-}
\ No newline at end of file