using System.Globalization;
using System.Collections.Generic;
public static void Main()
var fromClassName = "AddOfferCommand";
var toClassName = "OfferContent";
var fromClassVariable = fromClassName.Substring(0, 1).ToLower() + fromClassName.Substring(1);
var toClassVariable = toClassName.Substring(0, 1).ToLower() + toClassName.Substring(1);
public class {toClassName}MappingFixture
private {fromClassName} _{fromClassVariable};
_{fromClassVariable} = new AutoFaker<{fromClassName}>()
var config = new MapperConfiguration(opts =>
opts.AddProfile<AutoMapperProfile>();
_mapper = config.CreateMapper();
Console.WriteLine(header);
foreach (var p in typeof(FromClass).GetProperties())
var propertyName = p.Name;
var compareText = p.PropertyType.IsValueType ? "Be" : "BeEquivalentTo";
public void {propertyName}_should_get_mapped()
var actual = _mapper.Map<{toClassName}>(_{fromClassVariable});
actual.{propertyName}.Should().{compareText}(_{fromClassVariable}.{propertyName},
$""{{nameof({toClassName}.{propertyName})}} should be mapped from {{nameof({fromClassName})}} to {{nameof({toClassName})}}"");
public int BaseDiscount { get; set; }
public int Brand { get; set; }
public int OfferType { get; set; }
public DateTime BookingStart { get; set; }
public DateTime BookingEnd { get; set; }
public DateTime ArrivalStart { get; set; }
public DateTime ArrivalEnd { get; set; }
public string OfferExtraCode { get; set; }
public string InvoiceDescription { get; set; }
public int MinimumNights { get; set; }
public int MaximumNights { get; set; }
public bool CombineAndSaveOffered { get; set; }
public IList<string> LocalizedOfferContents { get; set; }
public IList<string> OfferDetails { get; set; }
public IList<string> ExcludedDateRanges { get; set; }
public IList<int> LocaleIds { get; set; }