// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

namespace System.Data.Entity.ModelConfiguration.Conventions
{
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.ModelConfiguration.Configuration;
    using System.Data.Entity.ModelConfiguration.Configuration.Types;
    using Xunit;

    public sealed class ComplexTypeAttributeConventionTests
    {
        [Fact]
        public void Apply_should_inline_type()
        {
            var mockType = new MockType();
            var modelConfiguration = new ModelConfiguration();

            new ComplexTypeAttributeConvention()
                .Apply(new ConventionTypeConfiguration(mockType, modelConfiguration), new ComplexTypeAttribute());

            Assert.True(modelConfiguration.IsComplexType(mockType));
        }
    }
}
