// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using Xunit;
namespace Microsoft.AspNet.Mvc.ModelBinding
{
///
/// Test the class.
///
public class CachedDataAnnotationsMetadataAttributesTest
{
[Fact]
public void Constructor_SetsDefaultValuesForAllProperties()
{
// Arrange
var attributes = Enumerable.Empty();
// Act
var cache = new CachedDataAnnotationsMetadataAttributes(attributes);
// Assert
Assert.Null(cache.DataType);
Assert.Null(cache.Display);
Assert.Null(cache.DisplayColumn);
Assert.Null(cache.DisplayFormat);
Assert.Null(cache.Editable);
Assert.Null(cache.HiddenInput);
Assert.Null(cache.Required);
Assert.Null(cache.ScaffoldColumn);
Assert.Null(cache.UIHint);
Assert.Null(cache.BinderMetadata);
Assert.Null(cache.BinderModelNameProvider);
Assert.Empty(cache.PropertyBindingPredicateProviders);
}
public static TheoryData