Sha256: 5cd154c8e054fe98934be57407e4f2ecb701f66b0cd601222d453804e44aa40e

Contents?: true

Size: 1.2 KB

Versions: 2

Compression:

Stored size: 1.2 KB

Contents

#encoding:utf-8
require 'spec_helper'

class SOAPError < WashOut::Dispatcher::SOAPError
  
end

describe WashoutBuilder::Document::ExceptionModel do

  let(:subject) { SOAPError}
  
  
  
  it "gets the strcuture" do
    subject.get_virtus_model_structure.should eq({"code"=>{:primitive=>"integer", :member_type=>nil}, "message"=>{:primitive=>"string", :member_type=>nil}, "backtrace"=>{:primitive=>"string", :member_type=>nil}})
  end
  
  it "gets the member type for arrays" do
    subject.get_virtus_member_type_primitive({:primitive=>"Array", :member_type=>"SomeInexistentClass"}).should eq("SomeInexistentClass")
  end
  
  it "gets the member type for clasified types" do
    subject.get_virtus_member_type_primitive({:primitive=>"SomeInexistentClass", :member_type=>nil}).should eq("SomeInexistentClass")
  end
    
  it "returns nil because is not a classified object" do
    subject.get_virtus_member_type_primitive({:primitive=>"integer", :member_type=>nil}).should eq(nil)
  end
  
    
  it "gets the strcuture" do
    subject.remove_fault_type_inheritable_elements(["code"]).should eq({ "message"=>{:primitive=>"string", :member_type=>nil}, "backtrace"=>{:primitive=>"string", :member_type=>nil}})
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
washout_builder-0.13.1 spec/lib/washout_builder/document/exception_model_spec.rb
washout_builder-0.13.0 spec/lib/washout_builder/document/exception_model_spec.rb