module RocketTest

using Test, Documenter, Rocket

doctest(Rocket)

@testset "Rocket" begin

    include("./test_teardown.jl")
    include("./teardown/test_void_teardown.jl")

    include("./test_actor.jl")
    include("./actor/test_test_actor.jl")
    include("./actor/test_void_actor.jl")
    include("./actor/test_lambda_actor.jl")
    include("./actor/test_logger_actor.jl")
    include("./actor/test_keep_actor.jl")
    include("./actor/test_buffer_actor.jl")
    include("./actor/test_sync_actor.jl")
    include("./actor/test_function_actor.jl")

    include("./test_subscribable.jl")
    include("./observable/test_observable_function.jl")
    include("./observable/test_observable_single.jl")
    include("./observable/test_observable_array.jl")
    include("./observable/test_observable_iterable.jl")
    include("./observable/test_observable_faulted.jl")
    include("./observable/test_observable_never.jl")
    include("./observable/test_observable_completed.jl")
    include("./observable/test_observable_timer.jl")
    include("./observable/test_observable_interval.jl")
    include("./observable/test_observable_proxy.jl")
    include("./observable/test_observable_combine_latest.jl")
    include("./observable/test_observable_combine_updates.jl")
    include("./observable/test_observable_collect_latest.jl")
    include("./observable/test_observable_race.jl")
    include("./observable/test_observable_merged.jl")
    include("./observable/test_observable_concat.jl")
    include("./observable/test_observable_generate.jl")
    include("./observable/test_observable_defer.jl")
    include("./observable/test_observable_zipped.jl")

    include("./test_subject.jl")
    include("./subjects/test_subject.jl")
    include("./subjects/test_subject_behavior.jl")
    include("./subjects/test_subject_replay.jl")
    include("./subjects/test_subject_pending.jl")

    include("./test_operator.jl")
    include("./operators/test_operator_async.jl")
    include("./operators/test_operator_map.jl")
    include("./operators/test_operator_map_to.jl")
    include("./operators/test_operator_scan.jl")
    include("./operators/test_operator_enumerate.jl")
    include("./operators/test_operator_uppercase.jl")
    include("./operators/test_operator_lowercase.jl")
    include("./operators/test_operator_to_array.jl")
    include("./operators/test_operator_filter.jl")
    include("./operators/test_operator_find.jl")
    include("./operators/test_operator_find_index.jl")
    include("./operators/test_operator_some.jl")
    include("./operators/test_operator_take.jl")
    include("./operators/test_operator_take_until.jl")
    include("./operators/test_operator_first.jl")
    include("./operators/test_operator_last.jl")
    include("./operators/test_operator_count.jl")
    include("./operators/test_operator_max.jl")
    include("./operators/test_operator_min.jl")
    include("./operators/test_operator_reduce.jl")
    include("./operators/test_operator_sum.jl")
    include("./operators/test_operator_catch_error.jl")
    include("./operators/test_operator_rerun.jl")
    include("./operators/test_operator_tap.jl")
    include("./operators/test_operator_tap_on_subscribe.jl")
    include("./operators/test_operator_tap_on_complete.jl")
    include("./operators/test_operator_delay.jl")
    include("./operators/test_operator_safe.jl")
    include("./operators/test_operator_noop.jl")
    include("./operators/test_operator_multicast.jl")
    include("./operators/test_operator_ref_count.jl")
    include("./operators/test_operator_default_if_empty.jl")
    include("./operators/test_operator_error_if_empty.jl")
    include("./operators/test_operator_skip_next.jl")
    include("./operators/test_operator_skip_error.jl")
    include("./operators/test_operator_skip_complete.jl")
    include("./operators/test_operator_tuple_with.jl")
    include("./operators/test_operator_switch_map.jl")
    include("./operators/test_operator_switch_map_to.jl")
    include("./operators/test_operator_merge_map.jl")
    include("./operators/test_operator_concat_map.jl")
    include("./operators/test_operator_concat_map_to.jl")
    include("./operators/test_operator_exhaust_map.jl")
    include("./operators/test_operator_discontinue.jl")
    include("./operators/test_operator_with_latest.jl")
    include("./operators/test_operator_ignore.jl")
    include("./operators/test_operator_start_with.jl")
    include("./operators/test_operator_accumulated.jl")
    include("./operators/test_operator_pairwise.jl")

    @testset "Detect ambiguities" begin
        @test length(Test.detect_ambiguities(Rocket)) == 0
    end
end

end
