public static SomePersonalDataMessage Build() { var rnd = ExternalRandomGenerator.Instance.NextRandomInteger; var primaryAddr = AddressMessage.Build(); var data = new SomePersonalDataMessage { ID = Guid.NewGuid(), LegalName = HumanName.Build(), RegistrationName = HumanName.Build(), RegistrationDate = DateTime.Now.AddDays(-23), Residence = primaryAddr, Shipping = primaryAddr, Billing = primaryAddr, StageAccessCode = new byte[32], SpeakerAccessCode = new byte[32], YearsInSchool = (0 != (rnd & (1 << 29))) ? 10 : (int?)null, EducationGrade = (0 != (rnd & (1 << 28))) ? 230 : (int?)null, AssetsAtHand = 567000m, TotalDebt = 2345m, CreditScale = 0.02323d }; return(data); }
public MsgBatching(TestingSystem context, IConfigSectionNode conf) : base(context, conf) { if (m_MsgCount < 1) { m_MsgCount = 1; } m_Data = new List <object>(m_MsgCount); for (var i = 0; i < m_MsgCount; i++) { m_Data.Add(m_MsgType == MsgBatchingType.Personal ? SomePersonalDataMessage.Build() : m_MsgType == MsgBatchingType.RPC ? RPCMessage.Build() : m_MsgType == MsgBatchingType.Trading ? (object)TradingRec.Build() : EDI_X12_835Data.Make() ); } }
public static SomePersonalDataMessage Build() { var rnd = ExternalRandomGenerator.Instance.NextRandomInteger; var primaryAddr = AddressMessage.Build(); var data = new SomePersonalDataMessage { ID = Guid.NewGuid(), LegalName = HumanName.Build(), RegistrationName = HumanName.Build(), RegistrationDate = DateTime.Now.AddDays(-23), Residence = primaryAddr, Shipping = primaryAddr, Billing = primaryAddr, StageAccessCode = new byte[32], SpeakerAccessCode = new byte[32], YearsInSchool = (0!=(rnd & (1<<29))) ? 10 : (int?)null, EducationGrade = (0!=(rnd & (1<<28))) ? 230 : (int?)null, AssetsAtHand = 567000m, TotalDebt = 2345m, CreditScale = 0.02323d }; return data; }