AutoMapper.UnitTests.Mappers.NameValueCollectionMapperTests.Map.ReturnsEmptyCollectionWhenSourceCollectionIsEmpty C# (CSharp) Méthode

ReturnsEmptyCollectionWhenSourceCollectionIsEmpty() private méthode

private ReturnsEmptyCollectionWhenSourceCollectionIsEmpty ( ) : void
Résultat void
            public void ReturnsEmptyCollectionWhenSourceCollectionIsEmpty()
            {
                var config = new MapperConfiguration(_ => { });
                var mapper = new Mapper(config);
                var sourceValue = new NameValueCollection();
                var rc = new ResolutionContext(sourceValue, null, new TypePair(typeof(NameValueCollection), typeof(NameValueCollection)), new MappingOperationOptions(config.ServiceCtor), mapper);
                var nvcm = new NameValueCollectionMapper();

                var result = nvcm.Map(rc) as NameValueCollection;

                result.ShouldBeEmpty(); 
            }