public void FromEntity_Should_Return_An_EmptyObject_When_Given_An_EmptyEntity() { CustomerCart sut = new CustomerCart(); // Act var mut = sut.FromEntity(null); // //mut.ShouldBe(new CartDto(), $"Should be given an empty [{nameof(CartDto)}]"); }
public CartDto GetCustomerCart(string userId) { // transformation in services // business logic // etc var entity = _cartsRepository.GetSingleCart(userId); return(_customerCart.FromEntity(entity)); }