Skip to content

Commit 36eb792

Browse files
author
Christian Elies
committed
test(): implemented remote image service factory test
1 parent c87faf3 commit 36eb792

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

Sources/RemoteImage/private/Models/RemoteImageState.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import Foundation
1010

11-
enum RemoteImageState {
11+
enum RemoteImageState: Hashable {
1212
case error(_ error: NSError)
1313
case image(_ image: PlatformSpecificImageType)
1414
case loading
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// RemoteImageServiceFactoryTests.swift
3+
// RemoteImageTests
4+
//
5+
// Created by Christian Elies on 15.12.19.
6+
//
7+
8+
@testable import RemoteImage
9+
import XCTest
10+
11+
final class RemoteImageServiceFactoryTests: XCTestCase {
12+
func testMakeRemoteImageService() {
13+
let service = RemoteImageServiceFactory.makeRemoteImageService()
14+
XCTAssertEqual(service.state, .loading)
15+
}
16+
}

0 commit comments

Comments
 (0)