Exemplo n.º 1
0
        public static Order Order(int?counter, bool populateAllFields = false)
        {
            var rtValue = new Order();

            rtValue.CreatorId       = string.Format("CreatorId{0}", counter);
            rtValue.Project         = string.Format("Project{0}", counter);
            rtValue.Creator         = new User(); //Meh? test later
            rtValue.ShareIdentifier = SpecificGuid.GetGuid(counter ?? 99);

            if (populateAllFields)
            {
                rtValue.LabId            = string.Format("LabId{0}", counter);
                rtValue.ClientId         = string.Format("ClientId{0}", counter);
                rtValue.AdditionalEmails = string.Format("AdditionalEmails{0}", counter);
                var orderDetails = CreateValidEntities.OrderDetails(counter);
                rtValue.SaveDetails(orderDetails);
                rtValue.Created = DateTime.Now;
                rtValue.Updated = DateTime.Now;
            }


            rtValue.Id = counter ?? 99;

            return(rtValue);
        }
Exemplo n.º 2
0
        public static OrderDetails OrderDetails(int?counter, bool populateAllFields = false)
        {
            var rtValue = new OrderDetails();

            rtValue.Payment             = new Payment();
            rtValue.OtherPaymentInfo    = CreateValidEntities.OtherPaymentInfo(counter);
            rtValue.ClientInfo          = new ClientInfo();
            rtValue.ClientInfo.ClientId = $"ClientId{counter}";

            return(rtValue);
        }