Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanRada committed Dec 17, 2013
1 parent 905245b commit 0c0e767
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/support/complex_types/fluffy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class Fluffy < WashOut::Type
map :universe => {
:name => :string,
:age => :int
}
end
4 changes: 4 additions & 0 deletions spec/support/complex_types/fluffy_container.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class FluffyContainer < WashOut::Type
type_name 'fluffy_con'
map :fluffy => Fluffy
end
9 changes: 9 additions & 0 deletions spec/support/complex_types/project_type.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class ProjectType < WashOut::Type
map :project => {
:name => :string,
:description => :string,
:users => [{:mail => :string }],
# 'dada' => [Project]
}
end

7 changes: 7 additions & 0 deletions spec/support/exceptions/another_exception.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class AnotherException < SOAPError

attribute :ex3_name, String
attribute :ex3_id, Integer

end

15 changes: 15 additions & 0 deletions spec/support/exceptions/base_exception.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Dir["#{File.dirname(__FILE__)}/**/*.rb"].each { |f| require f }
class BaseException < AnotherException

attribute :custom_attribute, String
attribute :other_custom_attribute, Integer
attribute :errors,Array[Integer]
attribute :custom, Array[ExModel]
attribute :custom2, ExModel
attribute :errors_2, Array[Custom2]
attribute :error, Custom2
attribute :module, NameModel
attribute :geo, ValueObjectModel

end

7 changes: 7 additions & 0 deletions spec/support/exceptions/custom2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class Custom2 < WashOut::SOAPError

attribute :ex2_name, String
attribute :ex2_id, Integer

end

8 changes: 8 additions & 0 deletions spec/support/exceptions/ex_model.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class ExModel
include Virtus.model

attribute :name, String
attribute :id, Integer

end

5 changes: 5 additions & 0 deletions spec/support/exceptions/name_mod.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module NameMod
include Virtus.module

attribute :name, String
end
5 changes: 5 additions & 0 deletions spec/support/exceptions/name_model.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require_relative "./name_mod"

class NameModel
include NameMod
end
8 changes: 8 additions & 0 deletions spec/support/exceptions/value_object_model.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class ValueObjectModel
include Virtus.value_object

values do
attribute :latitude, Float
attribute :longitude, Float
end
end

0 comments on commit 0c0e767

Please sign in to comment.