请选择 进入手机版 | 继续访问电脑版
  • 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Scala Ignore类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: es

//设置package包名称以及导入依赖的类
package fr.sysf.sample

import org.junit.runner.RunWith
import org.junit.{Ignore, Test}
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment
import org.springframework.boot.test.web.client.TestRestTemplate
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner


@RunWith(classOf[SpringJUnit4ClassRunner])
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, classes = Array(classOf[ApplicationConfig]))
class ApiRestTest {

  @Autowired
  private val restTemplate: TestRestTemplate = null


  // todo: to complete
  @Ignore
  @Test
  def should_put_customer_when_it_does_not_exits {

  }
} 
开发者ID:fpeyron,项目名称:sample-scala-mongo-rest,代码行数:27,代码来源:ApiRestTest.scala


示例2: ScapsServiceIntegrationTest

//设置package包名称以及导入依赖的类
package scaps.eclipse.core.services

import java.io.ByteArrayInputStream

import org.eclipse.core.resources.IResource
import org.eclipse.core.runtime.jobs.IJobChangeListener
import org.eclipse.ui.internal.WorkingSet
import org.junit.Assert._
import org.junit.Test
import org.mockito.Matchers._
import org.mockito.Mockito._
import org.scalaide.core.IScalaProject
import org.scalaide.core.testsetup.TestProjectSetup
import org.junit.Ignore

class ScapsServiceIntegrationTest extends TestProjectSetup("simple-structure-builder") {

  val scapsIndexService = ScapsService.createIndexService
  val scapsSearchService = ScapsService.createSearchService

  @Test
  @Ignore
  def testIndexProject {
    addSourceFile(project)("Calculator.scala", """
      class Home {
        def plus(num1: Int, num2: Int): Int = num1 + num2
      }""")
    val workingSet = new WorkingSet("testing", "testing", Array(project.javaProject))

    // SUT
    val job = scapsIndexService(workingSet)
    job.addJobChangeListener(new IJobChangeListener {
      def aboutToRun(x$1: org.eclipse.core.runtime.jobs.IJobChangeEvent): Unit = {}
      def awake(x$1: org.eclipse.core.runtime.jobs.IJobChangeEvent): Unit = {}
      def done(x$1: org.eclipse.core.runtime.jobs.IJobChangeEvent): Unit = {
        val result = scapsSearchService("Home")
        assertTrue(result.isRight)
      }
      def running(x$1: org.eclipse.core.runtime.jobs.IJobChangeEvent): Unit = {}
      def scheduled(x$1: org.eclipse.core.runtime.jobs.IJobChangeEvent): Unit = {}
      def sleeping(x$1: org.eclipse.core.runtime.jobs.IJobChangeEvent): Unit = {}
    })
  }

  def addSourceFile(project: IScalaProject)(name: String, contents: String) = {
    val folder = project.underlying.getFolder("src")
    if (!folder.exists())
      folder.create(IResource.NONE, true, null)
    val file = folder.getFile(name)
    if (!file.exists()) {
      val source = new ByteArrayInputStream(contents.getBytes())
      file.create(source, IResource.FORCE, null)
    }
  }

} 
开发者ID:scala-search,项目名称:scala-ide-scaps,代码行数:57,代码来源:ScapsServiceIntegrationTest.scala


示例3: ExampleIntegrationTest

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

import org.eclipse.core.resources.ResourcesPlugin
import org.eclipse.jdt.core.IPackageFragmentRoot
import org.eclipse.jdt.core.JavaCore
import org.eclipse.jdt.internal.core.PackageFragment
import org.junit.Before
import org.junit.Test
import org.junit.Ignore
import org.scalaide.core.testsetup.TestProjectSetup

class ExampleIntegrationTest extends TestProjectSetup("simple-structure-builder") {

  @Before
  def setup {
    println("iuu setup test")
  }

  @Test
  @Ignore
  def test1 {
    val javaProj = project.javaProject

    val srcDirs = javaProj.getAllPackageFragmentRoots.filter(_.getKind == IPackageFragmentRoot.K_SOURCE).head.getChildren.last
    val p: PackageFragment = srcDirs.asInstanceOf[PackageFragment]

    val srcs = p.getCompilationUnits.head.getResource

    println("done")
  }

} 
开发者ID:scala-search,项目名称:scala-ide-scaps,代码行数:33,代码来源:ExampleIntegrationTest.scala


示例4: ServerClientIntegrationSuite

//设置package包名称以及导入依赖的类
package com.twitter.finagle.redis.integration

import com.twitter.finagle.redis.RedisClientTest
import com.twitter.finagle.redis.tags.{ClientTest, RedisTest}
import com.twitter.util.Await
import com.twitter.finagle.redis.util.BufToString
import com.twitter.io.Buf
import org.junit.Ignore
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner

@Ignore
@RunWith(classOf[JUnitRunner])
final class ServerClientIntegrationSuite extends RedisClientTest {

  test("Correctly perform the FLUSHALL command", RedisTest, ClientTest) {
    withRedisClient { client =>
      Await.result(client.select(15))
      Await.result(client.set(bufFoo, bufBar))
      Await.result(client.select(1))
      Await.result(client.flushAll())
      Await.result(client.select(15))

      assert(Await.result(client.get(bufFoo)) == None)
    }
  }

  test("Correctly perform the FLUSHDB command", RedisTest, ClientTest) {
    withRedisClient { client =>
      Await.result(client.set(bufFoo, bufBar))
      Await.result(client.flushDB())
      assert(Await.result(client.get(bufFoo)) == None)
    }
  }

  test("Correctly perform the INFO command", RedisTest, ClientTest) {
    withRedisClient { client =>
      val info = BufToString(Await.result(client.info()).get)
      assert(info.contains("# Server") == true)
      assert(info.contains("redis_version:") == true)
      assert(info.contains("# Clients") == true)

      val cpuCB = Buf.Utf8("cpu")
      val cpu = BufToString(Await.result(client.info(cpuCB)).get)
      assert(cpu.contains("# CPU") == true)
      assert(cpu.contains("used_cpu_sys:") == true)
      assert(cpu.contains("redis_version:") == false)
    }
  }
} 
开发者ID:wenkeyang,项目名称:finagle,代码行数:51,代码来源:ServerClientIntegrationSuite.scala


示例5: ConnectionClientIntegrationSuite

//设置package包名称以及导入依赖的类
package com.twitter.finagle.redis.integration

import com.twitter.finagle.redis._
import com.twitter.finagle.redis.tags.{RedisTest, ClientTest}
import com.twitter.util.{Await, Return}
import org.junit.Ignore
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner

@Ignore
@RunWith(classOf[JUnitRunner])
final class ConnectionClientIntegrationSuite extends RedisClientTest {

  test("Correctly perform the SELECT command", RedisTest, ClientTest) {
    withRedisClient { client =>
      assert(Await.result(client.select(1).liftToTry) == Return.Unit)
    }
  }

  test("Correctly perform the QUIT command", RedisTest, ClientTest) {
    withRedisClient { client =>
      assert(Await.result(client.quit().liftToTry) == Return.Unit)
    }
  }

  test("Correctly perform the PING command without arguments", RedisTest, ClientTest) {
    withRedisClient { client =>
      assert(Await.result(client.ping().liftToTry) == Return.Unit)
    }
  }
} 
开发者ID:wenkeyang,项目名称:finagle,代码行数:32,代码来源:ConnectionClientIntegrationSuite.scala


示例6: HyperLogLogClientIntegrationSuite

//设置package包名称以及导入依赖的类
package com.twitter.finagle.redis.integration

import com.twitter.finagle.redis.RedisClientTest
import com.twitter.finagle.redis.tags.{ClientTest, RedisTest}
import com.twitter.util.{Await, Future, Return}
import org.junit.Ignore
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner

@Ignore
@RunWith(classOf[JUnitRunner])
final class HyperLogLogClientIntegrationSuite extends RedisClientTest {

  test("Correctly perform the PFADD command", RedisTest, ClientTest) {
    withRedisClient { client =>
      assert(Await.result(client.pfAdd(bufFoo, List(bufBar))).booleanValue)
    }
  }

  test("Correctly perform the PFCOUNT command", RedisTest, ClientTest) {
    withRedisClient { client =>
      val pfCountResult = client.pfAdd(bufFoo, List(bufBar, bufBaz)).flatMap(_ => client.pfCount(List(bufFoo)))
      assert(Await.result(pfCountResult) == 2)
    }
  }

  test("Correctly perform the PFMERGE command", RedisTest, ClientTest) {
    withRedisClient { client =>
      val addHll = List((bufFoo, List(bufBar, bufBaz)), (bufBar, List(bufFoo, bufBaz))) map (client.pfAdd _).tupled
      val pfMergeResult = Future.collect(addHll).flatMap(_ => client.pfMerge(bufBaz, List(bufFoo, bufBar)))
      assert(Await.result(pfMergeResult.liftToTry) == Return.Unit)
    }
  }
} 
开发者ID:wenkeyang,项目名称:finagle,代码行数:35,代码来源:HyperLogLogClientIntegrationSuite.scala


示例7: OnlineFileDeliveryTest

//设置package包名称以及导入依赖的类
package com.gaiam.gcsis.ftp

import com.gaiam.gcsis.util.FS._
import java.io._
import java.net.URL
import org.junit.{Ignore, Test}



class OnlineFileDeliveryTest {
    def createDelivery = new FtpFileDelivery(new URL("ftp://mockftp:[email protected]"));

    @Test
    @Ignore
    def testWrite {
        createDelivery.deliver(
            "../../tmp",
            new FileGenerator {
                val fileName = "test-out.txt"
                def write(os: OutputStream): Unit = {
                    using(new PrintWriter(os)) {
                        _.println("Hello World!")
                    } 
                }
            }
        )
    }
} 
开发者ID:GaiamTV,项目名称:gcsi-scala-util,代码行数:29,代码来源:OnlineFtpFileDeliveryTest.scala



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Scala OffsetAndMetadata类代码示例发布时间:2022-05-23
下一篇:
Scala Enumeratee类代码示例发布时间:2022-05-23
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap