< Back
 

# Packages

-  package root
  Definition Classes
    root
-  package uk
  Definition Classes
    root
-  package gov
  Definition Classes
    uk
-  package hmrc
  Definition Classes
    gov
-  package mongo
  Definition Classes
    hmrc
-  package test
  Definition Classes
    mongo
- CleanMongoCollectionSupport
- DefaultPlayMongoRepositorySupport
- IndexedMongoQueriesSupport
- MongoSupport
- PlayMongoRepositorySupport

t

uk.gov.hmrc.mongo.test

# DefaultPlayMongoRepositorySupport 

###

#### trait DefaultPlayMongoRepositorySupport[A] extends PlayMongoRepositorySupport[A] with CleanMongoCollectionSupport with IndexedMongoQueriesSupport

Provides all the typical mongo testing support.

See PlayMongoRepositorySupport for setting up.

In addition it will ensure the database is cleaned, and setup (with indexes and schemas) before each test.

Self Type
  DefaultPlayMongoRepositorySupport[A] with TestSuite

Linear Supertypes
IndexedMongoQueriesSupport, BeforeAndAfterAll, CleanMongoCollectionSupport, BeforeAndAfterEach, SuiteMixin, PlayMongoRepositorySupport[A], MongoSupport, ScalaFutures, Futures, PatienceConfiguration, AbstractPatienceConfiguration, ScaledTimeSpans, AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. DefaultPlayMongoRepositorySupport
2. IndexedMongoQueriesSupport
3. BeforeAndAfterAll
4. CleanMongoCollectionSupport
5. BeforeAndAfterEach
6. SuiteMixin
7. PlayMongoRepositorySupport
8. MongoSupport
9. ScalaFutures
10. Futures
11. PatienceConfiguration
12. AbstractPatienceConfiguration
13. ScaledTimeSpans
14. AnyRef
15. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Type Members

1.  trait FutureConcept[T] extends AnyRef
   Definition Classes
     Futures
2.  final case class PatienceConfig extends Product with Serializable
   Definition Classes
     AbstractPatienceConfiguration

### Abstract Value Members

1.  abstract def expectedTestCount(filter: Filter): Int
   Definition Classes
     SuiteMixin
2.  abstract def nestedSuites: IndexedSeq[Suite]
   Definition Classes
     SuiteMixin
3.  abstract def repository: PlayMongoRepository[A]
   Attributes
     protected
   Definition Classes
     PlayMongoRepositorySupport
4.  abstract def rerunner: Option[String]
   Definition Classes
     SuiteMixin
5.  abstract def runNestedSuites(args: Args): Status
   Attributes
     protected
   Definition Classes
     SuiteMixin
6.  abstract def runTests(testName: Option[String], args: Args): Status
   Attributes
     protected
   Definition Classes
     SuiteMixin
7.  abstract def suiteId: String
   Definition Classes
     SuiteMixin
8.  abstract def suiteName: String
   Definition Classes
     SuiteMixin
9.  abstract def tags: Map[String, Set[String]]
   Definition Classes
     SuiteMixin
10.  abstract def testDataFor(testName: String, theConfigMap: ConfigMap): TestData
    Definition Classes
      SuiteMixin
11.  abstract def testNames: Set[String]
    Definition Classes
      SuiteMixin
12.  abstract val styleName: String
    Definition Classes
      SuiteMixin
    Annotations
      @deprecated
    Deprecated

      (Since version 3.1.0) The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest with no replacement.

### Concrete Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  def afterAll(): Unit
   Attributes
     protected
   Definition Classes
     IndexedMongoQueriesSupport → BeforeAndAfterAll
5.  def afterEach(): Unit
   Attributes
     protected
   Definition Classes
     CleanMongoCollectionSupport → BeforeAndAfterEach
6.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
7.  def beforeAll(): Unit
   Attributes
     protected
   Definition Classes
     IndexedMongoQueriesSupport → BeforeAndAfterAll
8.  def beforeEach(): Unit
   Attributes
     protected
   Definition Classes
     CleanMongoCollectionSupport → BeforeAndAfterEach
9.  def clone(): AnyRef
   Attributes
     protected[lang]
   Definition Classes
     AnyRef
   Annotations
     @throws( ... ) @native()
10.  lazy val collectionName: String
    Attributes
      protected
    Definition Classes
      PlayMongoRepositorySupport
11.  implicit def convertScalaFuture[T](scalaFuture: Future[T]): (DefaultPlayMongoRepositorySupport.this)#FutureConcept[T]
    Definition Classes
      ScalaFutures
12.  def count(): Future[Long]
    Attributes
      protected
    Definition Classes
      PlayMongoRepositorySupport
13.  def createCollection(): Unit
    Attributes
      protected
    Definition Classes
      PlayMongoRepositorySupport
14.  def databaseName: String
    Attributes
      protected
    Definition Classes
      MongoSupport
15.  def deleteAll(): Future[DeleteResult]
    Attributes
      protected
    Definition Classes
      PlayMongoRepositorySupport
16.  def dropCollection(): Unit
    Attributes
      protected
    Definition Classes
      PlayMongoRepositorySupport
17.  def dropDatabase(): Unit
    Attributes
      protected
    Definition Classes
      MongoSupport
18.  def ensureIndexes(): Seq[String]
    Attributes
      protected
    Definition Classes
      PlayMongoRepositorySupport
19.  def ensureSchemas(): Unit
    Attributes
      protected
    Definition Classes
      PlayMongoRepositorySupport
20.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
21.  def equals(arg0: Any): Boolean
    Definition Classes
      AnyRef → Any
22.  def finalize(): Unit
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
23.  def find(filter: Bson)(implicit ev: ClassTag[A]): Future[Seq[A]]
    Attributes
      protected
    Definition Classes
      PlayMongoRepositorySupport
24.  def findAll()(implicit ev: ClassTag[A]): Future[Seq[A]]
    Attributes
      protected
    Definition Classes
      PlayMongoRepositorySupport
25.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
26.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
27.  lazy val indexes: Seq[IndexModel]
    Attributes
      protected
    Definition Classes
      PlayMongoRepositorySupport
28.  def insert(a: A): Future[InsertOneResult]
    Attributes
      protected
    Definition Classes
      PlayMongoRepositorySupport
29.  def interval(value: Span): Interval
    Definition Classes
      PatienceConfiguration
30.  val invokeBeforeAllAndAfterAllEvenIfNoTestsAreExpected: Boolean
    Definition Classes
      BeforeAndAfterAll
31.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
32.  lazy val mongoClient: MongoClient
    Attributes
      protected
    Definition Classes
      MongoSupport
33.  lazy val mongoComponent: MongoComponent
    Attributes
      protected
    Definition Classes
      MongoSupport
34.  lazy val mongoDatabase: MongoDatabase
    Attributes
      protected
    Definition Classes
      MongoSupport
35.  def mongoUri: String
    Attributes
      protected
    Definition Classes
      MongoSupport
36.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
37.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
38.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
39.  lazy val optSchema: Option[BsonDocument]
    Attributes
      protected
    Definition Classes
      PlayMongoRepositorySupport
40.  implicit val patienceConfig: (DefaultPlayMongoRepositorySupport.this)#PatienceConfig
    Definition Classes
      DefaultPlayMongoRepositorySupport → PatienceConfiguration → AbstractPatienceConfiguration
41.  def prepareDatabase(): Unit
    Attributes
      protected
    Definition Classes
      PlayMongoRepositorySupport → MongoSupport
42.  def run(testName: Option[String], args: Args): Status
    Definition Classes
      BeforeAndAfterAll → SuiteMixin
43.  def runTest(testName: String, args: Args): Status
    Attributes
      protected
    Definition Classes
      BeforeAndAfterEach → SuiteMixin
44.  final def scaled(span: Span): Span
    Definition Classes
      ScaledTimeSpans
45.  def spanScaleFactor: Double
    Definition Classes
      ScaledTimeSpans
46.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
47.  def timeout(value: Span): Timeout
    Definition Classes
      PatienceConfiguration
48.  def toString(): String
    Definition Classes
      AnyRef → Any
49.  def updateIndexPreference(requireIndexedQuery: Boolean): Future[Boolean]

    Note, this changes the notablescan option, which is a global server config.

    Note, this changes the notablescan option, which is a global server config. If tests set this to different values, ensure they are not run in parallel.

    Attributes
      protected
    Definition Classes
      MongoSupport
50.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
51.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
52.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... ) @native()
53.  final def whenReady[T, U](future: (DefaultPlayMongoRepositorySupport.this)#FutureConcept[T])(fun: (T) ⇒ U)(implicit config: (DefaultPlayMongoRepositorySupport.this)#PatienceConfig, pos: Position): U
    Definition Classes
      Futures
54.  final def whenReady[T, U](future: (DefaultPlayMongoRepositorySupport.this)#FutureConcept[T], interval: Interval)(fun: (T) ⇒ U)(implicit config: (DefaultPlayMongoRepositorySupport.this)#PatienceConfig, pos: Position): U
    Definition Classes
      Futures
55.  final def whenReady[T, U](future: (DefaultPlayMongoRepositorySupport.this)#FutureConcept[T], timeout: Timeout)(fun: (T) ⇒ U)(implicit config: (DefaultPlayMongoRepositorySupport.this)#PatienceConfig, pos: Position): U
    Definition Classes
      Futures
56.  final def whenReady[T, U](future: (DefaultPlayMongoRepositorySupport.this)#FutureConcept[T], timeout: Timeout, interval: Interval)(fun: (T) ⇒ U)(implicit config: (DefaultPlayMongoRepositorySupport.this)#PatienceConfig, pos: Position): U
    Definition Classes
      Futures

### Inherited from IndexedMongoQueriesSupport

### Inherited from BeforeAndAfterAll

### Inherited from CleanMongoCollectionSupport

### Inherited from BeforeAndAfterEach

### Inherited from SuiteMixin

### Inherited from PlayMongoRepositorySupport[A]

### Inherited from MongoSupport

### Inherited from ScalaFutures

### Inherited from Futures

### Inherited from PatienceConfiguration

### Inherited from AbstractPatienceConfiguration

### Inherited from ScaledTimeSpans

### Inherited from AnyRef

### Inherited from Any

### Ungrouped