Permalink
Browse files

More refactoring, import cleanup and name compliance

  • Loading branch information...
1 parent d666fc7 commit f2410f6a95ac98ec0e2a30be9d0335acd6154546 @indrajitr indrajitr committed Feb 22, 2011
Showing with 139 additions and 134 deletions.
  1. +1 −0 core/actor/src/test/scala/net/liftweb/actor/ActorSpec.scala
  2. +4 −4 core/common/src/test/scala/net/liftweb/common/BoxSpec.scala
  3. +1 −0 core/common/src/test/scala/net/liftweb/common/ConversionsSpec.scala
  4. +2 −0 core/util/src/test/scala/net/liftweb/util/BasicTypesHelpersSpec.scala
  5. +2 −0 core/util/src/test/scala/net/liftweb/util/BindHelpersSpec.scala
  6. +2 −0 core/util/src/test/scala/net/liftweb/util/BundleBuilderSpec.scala
  7. +1 −0 core/util/src/test/scala/net/liftweb/util/ClassHelpersSpec.scala
  8. +4 −3 core/util/src/test/scala/net/liftweb/util/CombParserHelpersSpec.scala
  9. +1 −0 core/util/src/test/scala/net/liftweb/util/ControlHelpersSpec.scala
  10. +1 −0 core/util/src/test/scala/net/liftweb/util/CssSelectorSpec.scala
  11. +2 −0 core/util/src/test/scala/net/liftweb/util/Html5ParserSpec.scala
  12. +1 −0 core/util/src/test/scala/net/liftweb/util/HttpHelpersSpec.scala
  13. +1 −0 core/util/src/test/scala/net/liftweb/util/JsonCommandSpec.scala
  14. +1 −0 core/util/src/test/scala/net/liftweb/util/JsonParserSpec.scala
  15. +1 −0 core/util/src/test/scala/net/liftweb/util/ListHelpersSpec.scala
  16. +2 −0 core/util/src/test/scala/net/liftweb/util/MailerSpec.scala
  17. +2 −2 core/util/src/test/scala/net/liftweb/util/PCDataXmlParserSpec.scala
  18. +1 −0 core/util/src/test/scala/net/liftweb/util/ScheduleSpec.scala
  19. +1 −0 core/util/src/test/scala/net/liftweb/util/SecurityHelpersSpec.scala
  20. +1 −0 core/util/src/test/scala/net/liftweb/util/StringHelpersSpec.scala
  21. +2 −0 core/util/src/test/scala/net/liftweb/util/TimeHelpersSpec.scala
  22. +2 −0 core/util/src/test/scala/net/liftweb/util/ToHeadSpec.scala
  23. +2 −0 core/util/src/test/scala/net/liftweb/util/XmlParserSpec.scala
  24. +2 −0 persistence/couchdb/src/test/scala/net/liftweb/couchdb/CouchDatabaseSpec.scala
  25. +3 −0 persistence/couchdb/src/test/scala/net/liftweb/couchdb/CouchDocumentSpec.scala
  26. +2 −0 persistence/couchdb/src/test/scala/net/liftweb/couchdb/CouchQuerySpec.scala
  27. +4 −1 persistence/couchdb/src/test/scala/net/liftweb/couchdb/CouchRecordSpec.scala
  28. +1 −0 persistence/couchdb/src/test/scala/net/liftweb/couchdb/JsonRecordSpec.scala
  29. +0 −24 persistence/ldap/src/test/scala/LDAPTest.scala
  30. +3 −3 persistence/ldap/src/test/scala/net/liftweb/ldap/LdapSpec.scala
  31. +6 −7 persistence/mapper/src/test/scala/net/liftweb/mapper/DBProviders.scala
  32. +9 −8 persistence/mapper/src/test/scala/net/liftweb/mapper/DbSpec.scala
  33. +9 −9 persistence/mapper/src/test/scala/net/liftweb/mapper/ItemsListSpec.scala
  34. +5 −2 persistence/mapper/src/test/scala/net/liftweb/mapper/ManyToManySpecs.scala
  35. +6 −7 persistence/mapper/src/test/scala/net/liftweb/mapper/MappedDateSpec.scala
  36. +7 −7 persistence/mapper/src/test/scala/net/liftweb/mapper/MappedLongForeignKeySpec.scala
  37. +7 −3 persistence/mapper/src/test/scala/net/liftweb/mapper/MapperSpec.scala
  38. +1 −2 persistence/mongodb/src/test/scala/net/liftweb/mongodb/CustomSerializersSpecs.scala
  39. +4 −8 persistence/mongodb/src/test/scala/net/liftweb/mongodb/MongoDirectSpec.scala
  40. +8 −9 persistence/mongodb/src/test/scala/net/liftweb/mongodb/MongoDocumentExamplesSpec.scala
  41. +2 −9 persistence/mongodb/src/test/scala/net/liftweb/mongodb/MongoDocumentSpec.scala
  42. +1 −0 project/build/LiftFrameworkProject.scala
  43. +6 −4 web/testkit/src/test/scala/net/liftweb/http/testing/MockHttpRequestSpec.scala
  44. +15 −22 web/wizard/src/test/scala/net/liftweb/wizard/{WizardTest.scala → WizardSpec.scala}
@@ -18,6 +18,7 @@ package net.liftweb
package actor
import org.specs.Specification
+
import common._
@@ -17,13 +17,13 @@
package net.liftweb
package common
-import org.specs.Specification
-import Box._
import org.specs.{ScalaCheck, Specification}
-import org.scalacheck._
+import org.scalacheck.{Arbitrary, Gen, Prop}
import Gen._
import Prop.forAll
+import Box._
+
/**
* System under specification for Box.
@@ -298,7 +298,7 @@ object BoxSpec extends Specification("Box Specification") with ScalaCheck with B
case (Failure(m1, e1, l1), Failure(m2, e2, l2)) => (c1 == c2) == ((m1, e1, l1) == (m2, e2, l2))
case _ => c1 != c2
}
- Prop.forAll(equality) must pass
+ forAll(equality) must pass
}
"return false with comparing one Full and another object" in {
@@ -18,6 +18,7 @@ package net.liftweb
package common
import xml._
+
import org.specs.Specification
@@ -18,8 +18,10 @@ package net.liftweb
package util
import java.io.ByteArrayInputStream
+
import org.specs.Specification
import org.specs.util.DataTables
+
import common._
import BasicTypesHelpers._
@@ -18,7 +18,9 @@ package net.liftweb
package util
import xml._
+
import org.specs.Specification
+
import common._
import BindHelpers._
@@ -18,7 +18,9 @@ package net.liftweb
package util
import java.util.Locale
+
import xml.NodeSeq
+
import org.specs.Specification
@@ -18,6 +18,7 @@ package net.liftweb
package util
import org.specs.Specification
+
import common._
import ClassHelpers._
@@ -18,10 +18,11 @@ package net.liftweb
package util
import scala.util.parsing.combinator.Parsers
+
import org.specs.{ScalaCheck, Specification}
-import org.scalacheck.Arbitrary
-import org.scalacheck.Gen._
-import org.scalacheck.Prop._
+import org.scalacheck.{Arbitrary, Gen, Prop}
+import Gen._
+import Prop._
object CombParserHelpersSpec extends Specification("CombParserHelpers Specification") with ScalaCheck {
@@ -18,6 +18,7 @@ package net.liftweb
package util
import org.specs.Specification
+
import common._
import ControlHelpers._
@@ -18,6 +18,7 @@ package net.liftweb
package util
import org.specs.Specification
+
import common._
import BindHelpers._
@@ -18,8 +18,10 @@ package net.liftweb
package util
import xml.Elem
+
import org.specs.Specification
import org.specs.specification.PendingUntilFixed
+
import common._
import Helpers._
@@ -18,6 +18,7 @@ package net.liftweb
package util
import org.specs.Specification
+
import HttpHelpers._
@@ -18,6 +18,7 @@ package net.liftweb
package util
import org.specs.Specification
+
import json._
@@ -18,6 +18,7 @@ package net.liftweb
package util
import org.specs.Specification
+
import common._
@@ -18,6 +18,7 @@ package net.liftweb
package util
import org.specs.Specification
+
import common._
@@ -18,7 +18,9 @@ package net.liftweb
package util
import javax.mail.internet.{MimeMessage, MimeMultipart}
+
import org.specs.Specification
+
import common._
@@ -1,5 +1,5 @@
/*
- * Copyright 2010 WorldWide Conferencing, LLC
+ * Copyright 2010-2011 WorldWide Conferencing, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
package net.liftweb
package util
-import _root_.org.specs.Specification
+import org.specs.Specification
/**
@@ -19,6 +19,7 @@ package util
import org.specs.Specification
import org.specs.specification.PendingUntilFixed
+
import actor._
import Helpers._
@@ -19,6 +19,7 @@ package net.liftweb
package util
import org.specs.Specification
+
import SecurityHelpers._
@@ -19,6 +19,7 @@ package util
import org.specs.{ScalaCheck, Specification}
import org.scalacheck.Gen._
+
import StringHelpers._
@@ -18,10 +18,12 @@ package net.liftweb
package util
import java.util.{Calendar, Date}
+
import org.specs.{ScalaCheck, Specification}
import org.specs.util.Products._
import org.scalacheck.Gen._
import org.scalacheck.Prop._
+
import common._
import TimeHelpers._
@@ -18,7 +18,9 @@ package net.liftweb
package util
import xml.XML._
+
import org.specs.Specification
+
import common._
import ControlHelpers._
import HeadHelper._
@@ -18,7 +18,9 @@ package net.liftweb
package util
import java.io.ByteArrayInputStream
+
import xml.{Text, Unparsed}
+
import org.specs.Specification
@@ -15,7 +15,9 @@ package net.liftweb
package couchdb
import java.net.ConnectException
+
import dispatch.{Http, StatusCode}
+
import org.specs.Specification
@@ -15,8 +15,11 @@ package net.liftweb
package couchdb
import java.net.ConnectException
+
import dispatch.{Http, StatusCode}
+
import org.specs.Specification
+
import common._
import json._
import JsonDSL._
@@ -15,7 +15,9 @@ package net.liftweb
package couchdb
import java.net.ConnectException
+
import dispatch.{Http, StatusCode}
+
import common._
import json._
import JsonDSL._
@@ -15,13 +15,16 @@ package net.liftweb
package couchdb
import java.net.ConnectException
+
import dispatch.{Http, StatusCode}
+
import org.specs.Specification
+
import common._
import json._
import JsonDSL._
import record.field.{IntField, StringField}
-import DocumentHelpers.{jobjectToJObjectExtension, stripIdAndRev}
+import DocumentHelpers.stripIdAndRev
package couchtestrecords {
@@ -18,6 +18,7 @@ package net.liftweb
package couchdb
import org.specs.Specification
+
import common._
import json._
import JsonDSL._
@@ -1,24 +0,0 @@
-import junit.framework._;
-import Assert._;
-
-import net.liftweb.ldap.SimpleLDAPVendor
-
-object LDAPTest {
- def suite: Test = new TestSuite(classOf[LDAPTest])
-
- def main(args : Array[String]) = junit.textui.TestRunner.run(suite)
-}
-
-class LDAPTest extends TestCase("ldap") {
- def testParameters = {
- SimpleLDAPVendor.parameters = () => Map("ldap.url" -> "localhost")
-
- assertTrue(SimpleLDAPVendor.parameters().get("ldap.url") == Some("localhost"))
- }
-
- def testLoadParametersFile = {
- SimpleLDAPVendor.parameters = () => SimpleLDAPVendor.parametersFromFile("src/test/resources/ldap.properties")
-
- assertTrue(SimpleLDAPVendor.parameters().get("ldap.url") == Some("ldap://localhost"))
- }
-}
@@ -19,8 +19,6 @@ package ldap
import javax.naming.CommunicationException
-import org.specs.Specification
-
import org.apache.mina.util.AvailablePortFinder
import org.apache.directory.server.core.DefaultDirectoryService
import org.apache.directory.server.core.partition.impl.btree.jdbm.{JdbmIndex,JdbmPartition}
@@ -30,7 +28,9 @@ import org.apache.directory.server.xdbm.Index
import org.apache.directory.server.core.entry.ServerEntry
import org.apache.directory.shared.ldap.name.LdapDN
-import common.{Box, Full}
+import org.specs.Specification
+
+import common._
/**
@@ -17,13 +17,12 @@
package net.liftweb
package mapper
-import _root_.net.liftweb.common.{Box, Empty, Full, Failure}
-import _root_.net.liftweb.util.{Helpers, Log, Props}
-import Helpers._
-import _root_.scala.testing.SUnit
-import _root_.net.liftweb.mapper._
-import _root_.java.sql.{Connection, DriverManager}
-import _root_.java.io.File
+import java.io.File
+import java.sql.{Connection, DriverManager}
+
+import common._
+import util._
+
object DbProviders {
def asList = PostgreSqlProvider :: MySqlProvider :: DerbyProvider :: H2Provider :: H2MemoryProvider :: Nil
@@ -17,16 +17,17 @@
package net.liftweb
package mapper
-import _root_.org.specs._
-import _root_.org.specs.runner.JUnit3
-import _root_.org.specs.runner.ConsoleRunner
-import _root_.net.liftweb.common._
-import _root_.net.liftweb.util._
-import _root_.net.liftweb.http.{S,LiftSession,LiftRules}
+import org.specs.Specification
-import Helpers._
+import common._
+import util._
+import http.{S, LiftSession}
-object DbSpec extends Specification {
+
+/**
+ * Systems under specification for DB.
+ */
+object DbSpec extends Specification("DB Specification") {
val provider = DbProviders.H2MemoryProvider
val logF = Schemifier.infoF _
Oops, something went wrong.

0 comments on commit f2410f6

Please sign in to comment.