Skip to content

Commit

Permalink
Add integration test for FbxConv task
Browse files Browse the repository at this point in the history
  • Loading branch information
leruaa committed Dec 8, 2015
1 parent 3772a4f commit f0999af
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ build/
gradle.properties
fbx-conv.iml
src/test/resources/**/*.png
src/test/resources/**/*.g3d*
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.eowise.blender.test.integration.fbxConv

import org.gradle.testkit.runner.GradleRunner
import spock.lang.Specification

/**
* Created by aurel on 08/12/15.
*/
class FbxConvTest extends Specification {

def "convert FBX to G3DJ"() {
when:
GradleRunner.create()
.withProjectDir(new File(""))
.withArguments("testFbxConv", "--stacktrace", "--rerun-tasks")
.build();

then:
new File("cube.g3dj").exists()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import spock.lang.Specification
class RenderImageTest extends Specification {

void "render an image"() {

when:
GradleRunner.create()
.withProjectDir(new File(""))
Expand Down
10 changes: 8 additions & 2 deletions src/test/resources/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ buildscript {

task testRenderImage(type: com.eowise.blender.render.RenderImage) {
scene "Scene"
from file("cube.blend")
into file("cube.png")
from "cube.blend"
into "cube.png"
}

task testFbxConv(type: com.eowise.blender.fbxconv.FbxConv) {
convert files("cube.fbx")
into "./"
g3dj()
}
Binary file added src/test/resources/cube.fbx
Binary file not shown.

0 comments on commit f0999af

Please sign in to comment.