本文整理汇总了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 {
}
}
示例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)
}
}
}
示例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")
}
}
示例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)
}
}
}
示例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)
}
}
}
示例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)
}
}
}
示例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!")
}
}
}
)
}
}