<commit_before>using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using Xunit;
using Should;
using System.Linq;

namespace AutoMapper.UnitTests
{
	namespace ArraysAndLists
	{
		public class When_mapping_to_a_concrete_non_generic_ienumerable : AutoMapperSpecBase
		{
			private Destination _destination;

			public class Source
			{
				public int[] Values { get; set; }
				public List<int> Values2 { get; set; }
			}

			public class Destination
			{
				public IEnumerable Values { get; set; }
				public IEnumerable Values2 { get; set; }
			}

		    protected override MapperConfiguration Configuration => new MapperConfiguration(cfg =>
		    {
		        cfg.CreateMap<Source, Destination>();
		    });

			protected override void Because_of()
			{<commit_msg>passing test; closes #1040<commit_after>using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using Xunit;
using Should;
using System.Linq;

namespace AutoMapper.UnitTests
{
	namespace ArraysAndLists
	{
        public class When_mapping_to_an_existing_array_typed_as_IEnumerable : AutoMapperSpecBase
        {
            private Destination _destination = new Destination();

            public class Source
            {
                public int[] IntCollection { get; set; } = new int[0];
            }

            public class Destination
            {
                public IEnumerable<int> IntCollection { get; set; } = new[] { 1, 2, 3, 4, 5 };
            }

            protected override MapperConfiguration Configuration => new MapperConfiguration(cfg =>
            {
                cfg.CreateMap<Source, Destination>();
            });

            protected override void Because_of()
            {
                _destination = Mapper.Map(new Source(), _destination);
            }

            [Fact]
            public void Should_create_destination_array_the_same_size_as_the_source()
            {
                _destination.IntCollection.Count().ShouldEqual(0);
            }
        }

        public class When_mapping_to_a_concrete_non_generic_ienumerable : AutoMapperSpecBase
		{
			private Destination _destination;

			public class Source
			{
				public int[] Values { get; set; }
				public List<int> Values2 { get; set; }
			}

			public class Destination
			{
				public IEnumerable Values { get; set; }
				public IEnumerable Values2 { get; set; }
			}

		    protected override MapperConfiguration Configuration => new MapperConfiguration(cfg =>
		    {
		        cfg.CreateMap<Source, Destination>();
		    });

			protected override void Because_of()
			{
{'fraction_non_alphanumeric': 0.07858187134502924, 'fraction_numerical': 0.005482456140350877, 'mean_word_length': 2.6013157894736842, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1055978', 'n_tokens_mistral': 825, 'n_tokens_neox': 710, 'n_words': 187}