예제 #1
0
 private bool CompareProperties(WarrantyOrder expected, WarrantyOrder actual)
 {
     return
         (
         expected.InvoiceId == actual.InvoiceId &&
         expected.CustomerId == actual.CustomerId &&
         expected.ProductId == actual.ProductId &&
         expected.CreationTime == actual.CreationTime &&
         expected.Status == actual.Status
         );
 }
예제 #2
0
        private WarrantyOrder GenerateInput(bool generateId = false, int?id = null)
        {
            var input = new WarrantyOrder
            {
                InvoiceId    = 1,
                CustomerId   = 1,
                ProductId    = 1,
                CreationTime = DateTime.Now,
                Status       = (int)WarrantyOrderStatus.WaitForSent,
            };

            if (generateId)
            {
                input.Id = 111_111_111;
            }
            if (id != null)
            {
                input.Id = (int)id;
            }
            return(input);
        }