Sha256: a7e535e0e9efe760b22fdcebaf092a340ef9d08ffcf87fba9a1a921dddcbb253

Contents?: true

Size: 784 Bytes

Versions: 4

Compression:

Stored size: 784 Bytes

Contents

require 'spec_helper'

require 'killbill/jnotification'

describe Killbill::Plugin::JNotification do

  before(:all) do
    logger = ::Logger.new(STDOUT)
    @jnotification =  Killbill::Plugin::JNotification.new("Killbill::Plugin::NotificationTest", { "logger" => logger })
  end


  it "should_test_on_event_ok" do

    object_type = Java::com.ning.billing.ObjectType::INVOICE
    event_type = Java::com.ning.billing.beatrix.bus.api.ExtBusEventType::INVOICE_CREATION
    uuid = java.util.UUID.random_uuid

    event = Java::com.ning.billing.mock.api.MockExtBusEvent.new(event_type, object_type, uuid, uuid, uuid)
    @jnotification.on_event(event)
    @jnotification.on_event(event)
    @jnotification.on_event(event)
    @jnotification.delegate_plugin.counter.should == 3
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
killbill-1.0.19 spec/killbill/jnotification_spec.rb
killbill-1.0.18 spec/killbill/jnotification_spec.rb
killbill-1.0.17 spec/killbill/jnotification_spec.rb
killbill-1.0.16 spec/killbill/jnotification_spec.rb