Ejemplo n.º 1
0
        public void MappingPhoneProvider(IMapping map)
        {
            var providers = map.GetFieldsWithProviders;
            var result    = map.Phone("Phone", "(0-xxx) xx");
            var provider  = providers.FirstOrDefault();

            Assert.Equal(map, result);
            Assert.Equal("Phone", provider.Key);
            Assert.Equal(ProviderType.Phone, provider.Value.Type);
            Assert.Equal(typeof(string), provider.Value.TType);
            Assert.Equal("(0-xxx) xx", ((PhoneProvider)provider.Value).Format);
        }