csharp/aspnet/AspNetWebHooks/test/Microsoft.AspNet.WebHooks.Custom.AzureStorage.Test/WebHooks/AzureWebHookStoreTests.cs

AzureWebHookStoreTests.cs
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Web.Http;
using Microsoft.AspNet.WebHooks.Diagnostics;
using Microsoft.AspNet.WebHooks.Services;
using Moq;
using Xunit;

namespace Microsoft.AspNet.WebHooks
{
    [Collection("StoreCollection")]
    public clast AzureWebHookStoreTests : WebHookStoreTest
    {
        public AzureWebHookStoreTests()
            : base(CreateStore())
        {
        }

        [Fact]
        public void CreateStore_Succeeds()
        {
            // Arrange
            ILogger logger = new Mock().Object;

            // Act
            IWebHookStore actual = AzureWebHookStore.CreateStore(logger);

            // astert
            astert.IsType(actual);
        }

        private static IWebHookStore CreateStore()
        {
            HttpConfiguration config = new HttpConfiguration();
            config.InitializeCustomWebHooksAzureStorage();
            IWebHookStore store = CustomServices.GetStore();
            astert.IsType(store);
            return store;
        }
    }
}