public void ToModelsCreatesModels()
        {
            HostsEntryDto dto = GetTestDto();

            HostsEntry[] models = HostsEntryConverter.ToModels(dto);
            Assert.Equal(dto.Host, models[0].Host);
            Assert.Equal(dto.IpAddresses[0], models[0].IpAddress.ToString());
        }
        public void ToDtoCreatesADto()
        {
            HostsEntry    model = GetTestModel();
            HostsEntryDto dto   = HostsEntryConverter.ToDto(new[] { model });

            Assert.Equal(model.Host, dto.Host);
            Assert.Equal(model.IpAddress, IPAddress.Parse(dto.IpAddresses[0]));
        }
        public void ToDtosCreatesDtos()
        {
            HostsEntry model = GetTestModel();

            HostsEntryDto[] dtos = HostsEntryConverter.ToDtos(new[] { model, model });
            Assert.Equal(model.Host, dtos[0].Host);
            Assert.Equal(model.IpAddress, IPAddress.Parse(dtos[0].IpAddresses[0]));
            Assert.Equal(model.IpAddress, IPAddress.Parse(dtos[0].IpAddresses[1]));
        }