Testing out JmonkeyEngine to make a game in Scala with Akka Actors within a pure FP layer
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
package wow.doge.mygame
import org.scalatest.funsuite.AnyFunSuite import com.jme3.scene.Spatial import com.jme3.collision.{Collidable, CollisionResults} import com.jme3.bounding.BoundingVolume import com.jme3.scene.Spatial.DFSMode import com.jme3.scene.SceneGraphVisitor import java.util.Queue import wow.doge.mygame.utils.wrappers.jme.CollisionShapeFactory import monix.execution.Scheduler.Implicits.global import cats.syntax.eq._
class CollisionShapeFactoryTest extends AnyFunSuite { test("Test for WrongArgumentError") { val res = CollisionShapeFactory .createMeshShape(new TestSpatial) .attempt .runSyncUnsafe()
assert(res.isLeft)
assert( res.left.get eqv CollisionShapeFactory.WrongArgumentError( "The spatial must either be a Node or a Geometry!" ) ) } }
class TestSpatial extends Spatial {
override def collideWith(x$1: Collidable, x$2: CollisionResults): Int = ???
override def updateModelBound(): Unit = ???
override def setModelBound(x$1: BoundingVolume): Unit = ???
override def getVertexCount(): Int = ???
override def getTriangleCount(): Int = ???
override def depthFirstTraversal(x$1: SceneGraphVisitor, x$2: DFSMode): Unit = ???
override protected def breadthFirstTraversal( x$1: SceneGraphVisitor, x$2: Queue[Spatial] ): Unit = ???
}
|