load("@fbcode//quic:defs.bzl", "mvfst_cpp_library", "mvfst_cpp_test")

oncall("traffic_protocols")

mvfst_cpp_library(
    name = "mocks",
    headers = [
        "Mocks.h",
    ],
    exported_deps = [
        "//folly/portability:gmock",
        "//quic/dsr/frontend:packet_builder",
    ],
)

mvfst_cpp_test(
    name = "write_codec_test",
    srcs = [
        "WriteCodecTest.cpp",
    ],
    deps = [
        ":mocks",
        "//folly/portability:gtest",
        "//quic:constants",
        "//quic/common/test:test_utils",
        "//quic/dsr/frontend:write_codec",
        "//quic/dsr/test:test_common",
        "//quic/fizz/server/handshake:fizz_server_handshake",
        "//quic/handshake/test:mocks",
        "//quic/server/state:server",
    ],
)

mvfst_cpp_test(
    name = "packet_builder_test",
    srcs = [
        "PacketBuilderTest.cpp",
    ],
    deps = [
        "//folly/portability:gtest",
        "//quic/common/test:test_utils",
        "//quic/dsr:types",
        "//quic/dsr/frontend:packet_builder",
        "//quic/dsr/test:test_common",
        "//quic/fizz/server/handshake:fizz_server_handshake",
        "//quic/handshake/test:mocks",
        "//quic/server/state:server",
    ],
)

mvfst_cpp_test(
    name = "scheduler_test",
    srcs = [
        "SchedulerTest.cpp",
    ],
    deps = [
        ":mocks",
        "//folly/portability:gtest",
        "//quic/dsr/frontend:scheduler",
        "//quic/dsr/test:mocks",
        "//quic/dsr/test:test_common",
        "//quic/fizz/server/handshake:fizz_server_handshake",
        "//quic/server/state:server",
    ],
)

mvfst_cpp_test(
    name = "write_functions_test",
    srcs = [
        "WriteFunctionsTest.cpp",
    ],
    deps = [
        "//folly/portability:gtest",
        "//quic/dsr/frontend:write_functions",
        "//quic/dsr/test:test_common",
        "//quic/priority:http_priority_queue",
        "//quic/state/test:mocks",
    ],
)
