当前位置: 首页>>代码示例>>Scala>>正文


Scala Ignore类代码示例

本文整理汇总了Scala中org.scalatest.Ignore的典型用法代码示例。如果您正苦于以下问题:Scala Ignore类的具体用法?Scala Ignore怎么用?Scala Ignore使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Ignore类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Scala代码示例。

示例1: WebServerTest

//设置package包名称以及导入依赖的类
package wow.api

import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._
import akka.http.scaladsl.model.StatusCodes
import akka.http.scaladsl.testkit.ScalatestRouteTest
import org.scalatest.{Ignore, Matchers, WordSpec}
import spray.json.DefaultJsonProtocol._
import spray.json.RootJsonFormat
import wow.auth.data.AccountAPI.AccountReq
import wow.utils.Reflection


@Ignore
class WebServerTest extends WordSpec with Matchers with ScalatestRouteTest {
  Reflection.eagerLoadClasses()

  implicit val userFormat: RootJsonFormat[AccountReq] = jsonFormat2(AccountReq.apply)

  "The service" should {
    "return a creation success code when an account is create" in {
      Post("/account/create", AccountReq("myName", "myPass")) ~> WebServer.route ~> check {
        status shouldEqual StatusCodes.Created
      }
    }
    "return a success code when an account is deleted" in {
      Post("/account/delete", "myName") ~> WebServer.route ~> check {
        status shouldEqual StatusCodes.OK
      }
    }
    "return a success code when a password is reinitialized" in {
      Put("/account/reinitialize", AccountReq("myName", "myPass")) ~> WebServer.route ~> check {
        status shouldEqual StatusCodes.OK
      }
    }
  }
} 
开发者ID:SKNZ,项目名称:SpinaciCore,代码行数:37,代码来源:WebServerTest.scala

示例2: BuilderSpec

//设置package包名称以及导入依赖的类
package org.apache.spark.sql.crossdata

import java.io.File

import com.stratio.crossdata.test.BaseXDTest
import com.typesafe.config.{Config, ConfigFactory}
import org.junit.runner.RunWith
import org.scalatest.Ignore
import org.scalatest.junit.JUnitRunner

@RunWith(classOf[JUnitRunner])
@Ignore
class BuilderSpec extends BaseXDTest {

  val builder = new XDSession.Builder()

  val configFile: File = new File("src/test/resources/core-reference-spec.conf")
  val configuration: Config = ConfigFactory.parseFile(configFile)

  "BuilderEnhancer" should "set catalog & spark configuration properly in options from Config" in {
    builder.config(configuration)
    ()
  }

  it should "set catalog & spark configuration properly in options from Config File" in {
    builder.config(configFile)
    ()
  }

  it should "not set options if file is not readable" in {
    configFile.setReadable(false)
    builder.config(configFile)
    ()
  }

  it should "not set options if file doesn't exist" in {
    builder.config(new File("/path/to/non/existing/file"))
    ()
  }
} 
开发者ID:nagyistge,项目名称:crossdata-spark2,代码行数:41,代码来源:BuilderSpec.scala

示例3: KeyChainRouteTest

//设置package包名称以及导入依赖的类
package com.flipkart.connekt.receptors.tests.routes.commons

import akka.http.scaladsl.model._
import com.flipkart.connekt.commons.entities.AppUser
import com.flipkart.connekt.commons.utils.StringUtils
import com.flipkart.connekt.receptors.routes.common.KeyChainRoute
import com.flipkart.connekt.receptors.tests.routes.BaseRouteTest
import org.scalatest.Ignore

//TODO: Fix this test, multiplepart/form-data not working
@Ignore
class KeyChainRouteTest extends BaseRouteTest {

  implicit val uu = new AppUser(userId = "connekt-genesis",
    apiKey = "connekt-genesis",
    groups = "revbnt",
    contact = ""
  )
  val appName = StringUtils.generateRandomStr(6)
  val os = "windows"

  val storageRoute = new KeyChainRoute().route



  "StorageRoute PUT test" should "return Ok for successful  " in {
    val payload = "abc"
    val entity = FormData(("clientId", StringUtils.generateRandomStr(6)), ("secret", StringUtils.generateRandomStr(6)))

    Post(s"/v1/keychain/$appName/$os", entity).addHeader(header) ~>
      storageRoute ~>
      check {
        status shouldEqual StatusCodes.OK
      }
  }

  "StorageRoute GET test " should "return data" in {
    Get(s"/v1/keychain/$appName/$os").addHeader(header) ~>
      storageRoute ~>
      check {
        println("response = " + responseAs[String])
        status shouldEqual StatusCodes.OK
      }
  }


} 
开发者ID:ayush03agarwal,项目名称:connekt,代码行数:48,代码来源:KeyChainRouteTest.scala

示例4: BigFootServiceTest

//设置package包名称以及导入依赖的类
package com.flipkart.connekt.commons.tests.services

import java.util.UUID

import com.flipkart.connekt.commons.services.BigfootService
import com.flipkart.connekt.commons.tests.CommonsBaseTest
import fkint.mp.connekt.DeviceDetails
import org.joda.time.format.DateTimeFormat
import org.scalatest.Ignore

@Ignore
class BigFootServiceTest extends CommonsBaseTest {

  val deviceId = "UT-" + UUID.randomUUID().toString
  val userId = "ACC-" + UUID.randomUUID().toString
  val token = "TOKEN-" + UUID.randomUUID().toString

  "BigFoot Service " should " return success " in {
    val deviceDetails = DeviceDetails(deviceId, userId, token, "osName", "osVersion",
      "appName", "appVersion", "brand", "model", "state",
      DateTimeFormat.forPattern("YYYY-MM-dd HH:mm:ss").print(System.currentTimeMillis()))
    BigfootService.ingestEntity(deviceId, deviceDetails, "fkint/mp/connekt/DeviceDetails").get shouldEqual true
  }

} 
开发者ID:ayush03agarwal,项目名称:connekt,代码行数:26,代码来源:BigFootServiceTest.scala

示例5: BtDoggDHTLoggerTest

//设置package包名称以及导入依赖的类
package com.realizationtime.btdogg.dhtmanager

import lbms.plugins.mldht.kad.DHT.LogLevel
import org.scalatest.{FlatSpec, Ignore, Matchers}

@Ignore
class BtDoggDHTLoggerTest extends FlatSpec with Matchers {
  val log = new BtDoggDHTLogger

  "BtDoggDHTLogger" should "log fatals as errors to console and file" in {
    log.log("FATALS SHOULD BE SEEN AS ERRORS IN CONSOLE AND FILE", LogLevel.Fatal)
  }

  it should "log errors or info to file only" in {
    log.log("ERRORS SHOULD PRINTED TO FILE ONLY", LogLevel.Error)
    log.log("INFOS SHOULD PRINTED TO FILE ONLY", LogLevel.Info)
  }
} 
开发者ID:bwrega,项目名称:btdogg,代码行数:19,代码来源:BtDoggDHTLoggerTest.scala

示例6: StudentRegistrySpec

//设置package包名称以及导入依赖的类
package jjabuk.book.lending.akka.actors

import akka.actor.ActorSystem
import akka.testkit.{TestKit, TestProbe}
import jjabuk.book.lending.akka.protocols.StudentRegistryProtocol.{RegisterStudentCard, StudentCardRegistered}
import org.scalatest.{BeforeAndAfterAll, FlatSpecLike, Ignore, Matchers}

@Ignore
class StudentRegistrySpec(_system: ActorSystem)
  extends TestKit(_system)
    with Matchers
    with FlatSpecLike
    with BeforeAndAfterAll {

  def this() = this(ActorSystem("StudentRegistrySpec"))

  override def afterAll: Unit = {
    shutdown(system)
  }

  it should "register a new student card" in {
    val probe = TestProbe()

    val registry = system.actorOf(StudentRegistry.props(), StudentRegistry.StudentRegistryActorName)

    val surname = "doe"
    registry.tell(RegisterStudentCard(surname), probe.ref)
    val response = probe.expectMsgType[StudentCardRegistered]

    response.surname should ===(surname)
    response.uuid shouldNot be (null)
  }


} 
开发者ID:jjabuk,项目名称:book-lending-akka,代码行数:36,代码来源:StudentRegistrySpec.scala

示例7: BookCatalogueSpec

//设置package包名称以及导入依赖的类
package jjabuk.book.lending.akka.actors

import akka.actor.ActorSystem
import akka.testkit.{TestKit, TestProbe}
import jjabuk.book.lending.akka.protocols.CatalogueProtocol.{AddBook, BookAdded}
import org.scalatest.{BeforeAndAfterAll, FlatSpecLike, Ignore, Matchers}

@Ignore
class BookCatalogueSpec(_system: ActorSystem)
  extends TestKit(_system)
    with Matchers
    with FlatSpecLike
    with BeforeAndAfterAll {

  def this() = this(ActorSystem("BookCatalogueSpec"))

  override def afterAll: Unit = {
    shutdown(system)
  }

  it should "add a new book" in {
    val probe = TestProbe()

    val catalogue = system.actorOf(BookCatalogue.props(), BookCatalogue.BookCatalogueActorName)

    val isbn = "sample-isbn"
    catalogue.tell(AddBook(isbn), probe.ref)
    val response = probe.expectMsgType[BookAdded]

    response.isbn should ===(isbn)
  }

} 
开发者ID:jjabuk,项目名称:book-lending-akka,代码行数:34,代码来源:BookCatalogueSpec.scala


注:本文中的org.scalatest.Ignore类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。