public static void GetQueueProvider_Throws_WhenQueueParameterIsNull()
    {
        var    storage = new EFCoreStorage(OptionsActionStub, new EFCoreStorageOptions());
        string queue   = null;

        Assert.Throws <ArgumentNullException>(nameof(queue),
                                              () => storage.GetQueueProvider(queue));
    }
    public static void GetQueueProvider_ReturnsDefaultProvider_WhenProviderIsNotRegistered()
    {
        var storage = new EFCoreStorage(OptionsActionStub, new EFCoreStorageOptions());
        var queue   = "queue";

        var result = storage.GetQueueProvider(queue);

        Assert.NotNull(result);
        Assert.Same(storage.DefaultQueueProvider, result);
    }
    public static void GetQueueProvider_ReturnsRegisteredProvider()
    {
        var storage    = new EFCoreStorage(OptionsActionStub, new EFCoreStorageOptions());
        var dictionary = storage.QueueProviders;
        var provider   = new Mock <IPersistentJobQueueProvider>().Object;
        var queue      = "queue";

        dictionary[queue] = provider;

        var result = storage.GetQueueProvider(queue);

        Assert.NotNull(result);
        Assert.Same(provider, result);
    }