public void GetItemIdReturnsGivenEntityProductId()
        {
            const int expectedItemId         = 29;
            var       productOrderItemEntity = new ProductOrderItemEntity(0, expectedItemId);

            long itemId = _productOrderItemTraits.GetItemId(productOrderItemEntity);

            Assert.AreEqual(expectedItemId, itemId, "GetItemId returned incorrect ID.");
        }
Esempio n. 2
0
 private static OrderItem Map(this ProductOrderItemEntity entity)
 {
     return(new OrderItem
     {
         Id = entity.id,
         ProductId = entity.productId,
         Price = entity.price,
         Currency = Currency.GetCurrency(entity.currency),
     });
 }