Ejemplo n.º 1
0
 public DefaultLocalizationValidationAttributeAdapter(ForEvolveMvcDefaultLocalizationAdapterOptions options)
 {
     if (options == null)
     {
         throw new ArgumentNullException(nameof(options));
     }
     SupportedAttributes = options.SupportedAttributes;
 }
Ejemplo n.º 2
0
            public void Should_guard_against_null_options()
            {
                // Arrange
                ForEvolveMvcDefaultLocalizationAdapterOptions options = null;

                // Act & Assert
                Assert.Throws <ArgumentNullException>(() => new DefaultLocalizationValidationAttributeAdapter(options));
            }
Ejemplo n.º 3
0
            public void Should_set_SupportedAttributes()
            {
                // Arrange
                var supportedAttributes = new string[] { "asdf", "sdfg" };
                var options             = new ForEvolveMvcDefaultLocalizationAdapterOptions(supportedAttributes);

                // Act
                var adapter = new DefaultLocalizationValidationAttributeAdapter(options);

                // Assert
                Assert.Equal(adapter.SupportedAttributes, supportedAttributes);
            }
Ejemplo n.º 4
0
 public DefaultLocalizationValidationAttributeAdapterTest()
 {
     Options          = new ForEvolveMvcDefaultLocalizationAdapterOptions();
     AdapterUnderTest = new DefaultLocalizationValidationAttributeAdapter(Options);
 }