Sha256: bc7de14e46ce53d033f5f7bfcdc156084d90dc0b9d6e69f9d7fa496e80c996ff

Contents?: true

Size: 739 Bytes

Versions: 2

Compression:

Stored size: 739 Bytes

Contents

module JmeterPerf
  class DSL
    def md5_hex_assertion(params = {}, &)
      node = JmeterPerf::MD5HexAssertion.new(params)
      attach_node(node, &)
    end
  end

  class MD5HexAssertion
    attr_accessor :doc
    include Helper

    def initialize(params = {})
      testname = params.is_a?(Array) ? "MD5HexAssertion" : (params[:name] || "MD5HexAssertion")
      @doc = Nokogiri::XML(<<~EOS.strip_heredoc)
        <MD5HexAssertion guiclass="MD5HexAssertionGUI" testclass="MD5HexAssertion" testname="#{testname}" enabled="true">
          <stringProp name="MD5HexAssertion.size"/>
        </MD5HexAssertion>
      EOS
      update params
      update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jmeter_perf-0.0.6 lib/jmeter_perf/dsl/md5_hex_assertion.rb
jmeter_perf-0.0.2 lib/jmeter_perf/dsl/md5_hex_assertion.rb