Javier Cicchelli c150b88ddc [Framework] Feed List improvements (#19)
This PR contains the work done to improve the overall implementation of the `FeedListViewModel` view model in the `Feed` framework by utilising unit tests.

Reviewed-on: #19
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2024-03-22 14:44:52 +00:00

66 lines
1.9 KiB
Swift

//
// Array+ReviewDTOs.swift
// ReviewsFeed
//
// Created by Javier Cicchelli on 22/03/2024.
// Copyright © 2024 Röck+Cöde. All rights reserved.
//
import Foundation
import ReviewsFeedKit
extension Array where Element == ReviewsFeedKit.Review {
// MARK: Constants
static let none: [ReviewsFeedKit.Review] = []
static let sample: [ReviewsFeedKit.Review] = [
.init(
id: 1,
author: "Some author name #1 here",
title: "Some review title #1 goes here...",
content: "Some long, long, explanatory review comment #1 goes here...",
rating: 3,
version: "v1.0.0",
updated: .init()
),
.init(
id: 2,
author: "Some author name #2 here",
title: "Some review title #2 goes here...",
content: "Some long, long, explanatory review comment #2 goes here...",
rating: 5,
version: "v1.0.0",
updated: .init()
),
.init(
id: 3,
author: "Some author name #3 here",
title: "Some review title #3 goes here...",
content: "Some long, long, explanatory review comment #3 goes here...",
rating: 1,
version: "v1.0.0",
updated: .init()
),
.init(
id: 4,
author: "Some author name #4 here",
title: "Some review title #4 goes here...",
content: "Some long, long, explanatory review comment #4 goes here...",
rating: 4,
version: "v1.0.0",
updated: .init()
),
.init(
id: 5,
author: "Some author name #5 here",
title: "Some review title #5 goes here...",
content: "Some long, long, explanatory review comment #5 goes here...",
rating: 2,
version: "v1.0.0",
updated: .init()
),
]
}