public void MappingSetStringStaticProvider(IMapping map) { var providers = map.GetFieldsWithProviders; var result = map.Set("Name", "John"); var provider = providers.FirstOrDefault(); Assert.Equal(map, result); Assert.Equal("Name", provider.Key); Assert.Equal(ProviderType.Static, provider.Value.Type); Assert.Equal(typeof(string), provider.Value.TType); Assert.Equal("John", provider.Value.Current); }
public void MappingSetIntStaticProvider(IMapping map) { var providers = map.GetFieldsWithProviders; var result = map.Set("Age", 30); var provider = providers.FirstOrDefault(); Assert.Equal(map, result); Assert.Equal("Age", provider.Key); Assert.Equal(ProviderType.Static, provider.Value.Type); Assert.Equal(typeof(int), provider.Value.TType); Assert.Equal(30, provider.Value.Current); }