Sha256: 41b2af05589825293a5cc311c249312b5582df40d116676bbc136d434d240be2

Contents?: true

Size: 1.26 KB

Versions: 1

Compression:

Stored size: 1.26 KB

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

XSD_FILE = File.expand_path(File.dirname(__FILE__) + '/../../fixtures/wildfire-1.3.xsd')

describe "Buildr::JaxbXjc" do
  describe "compiled with specified xsd" do
    before do
      @foo = define "foo" do
        project.version = "2.1.3"
        compile.from compile_jaxb(XSD_FILE, "-quiet", :package => "org.foo.api")
        package :jar
      end
      task('compile').invoke
    end

    it "produce .java files in the correct location" do
      File.should be_exist(@foo._("target/generated/jaxb/org/foo/api/Agency.java"))
      File.should be_exist(@foo._("target/generated/jaxb/org/foo/api/LatLongCoordinate.java"))
      File.should be_exist(@foo._("target/generated/jaxb/org/foo/api/ObjectFactory.java"))
      File.should be_exist(@foo._("target/generated/jaxb/org/foo/api/Wildfire.java"))
    end

    it "produce .class files in the correct location" do
      File.should be_exist(@foo._("target/classes/org/foo/api/Agency.class"))
      File.should be_exist(@foo._("target/classes/org/foo/api/LatLongCoordinate.class"))
      File.should be_exist(@foo._("target/classes/org/foo/api/ObjectFactory.class"))
      File.should be_exist(@foo._("target/classes/org/foo/api/Wildfire.class"))
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
buildr-jaxb-xjc-0.0.1 spec/buildr/jaxb_xjc/jaxb_xjc_spec.rb