class Cucumber::Messages::Attachment
def self.from_h(hash)
def self.from_h(hash) return nil if hash.nil? self.new( body: hash[:body], content_encoding: hash[:contentEncoding], file_name: hash[:fileName], media_type: hash[:mediaType], source: Source.from_h(hash[:source]), test_case_started_id: hash[:testCaseStartedId], test_step_id: hash[:testStepId], url: hash[:url], ) end
def initialize(
def initialize( body: '', content_encoding: AttachmentContentEncoding::IDENTITY, file_name: nil, media_type: '', source: nil, test_case_started_id: nil, test_step_id: nil, url: nil ) @body = body @content_encoding = content_encoding @file_name = file_name @media_type = media_type @source = source @test_case_started_id = test_case_started_id @test_step_id = test_step_id @url = url end