Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tp #27

Merged
merged 2 commits into from
Jun 25, 2020
Merged

Tp #27

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CineTime.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
A7ADBEDB2492760A00D00702 /* RecoCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7ADBEDA2492760A00D00702 /* RecoCollectionView.swift */; };
A7ADBEDD2492770B00D00702 /* MoviePosterCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7ADBEDC2492770B00D00702 /* MoviePosterCell.swift */; };
A7ADBEDF24968E3100D00702 /* NewCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7ADBEDE24968E3100D00702 /* NewCollectionView.swift */; };
E632A72724A4CCA200D376C6 /* RouterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E632A72624A4CCA200D376C6 /* RouterTests.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -132,6 +133,7 @@
A7ADBEDA2492760A00D00702 /* RecoCollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecoCollectionView.swift; sourceTree = "<group>"; };
A7ADBEDC2492770B00D00702 /* MoviePosterCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoviePosterCell.swift; sourceTree = "<group>"; };
A7ADBEDE24968E3100D00702 /* NewCollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewCollectionView.swift; sourceTree = "<group>"; };
E632A72624A4CCA200D376C6 /* RouterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RouterTests.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -270,6 +272,7 @@
isa = PBXGroup;
children = (
77E0FC31248FB37900BB50A1 /* Info.plist */,
E632A72624A4CCA200D376C6 /* RouterTests.swift */,
818B71DE24A2318300D217EE /* MyListTests.swift */,
814D262D24A4375700580C0B /* RouteAPITests.swift */,
818B71DD24A2318200D217EE /* CineTimeTests-Bridging-Header.h */,
Expand Down Expand Up @@ -587,6 +590,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
77E0FC30248FB37900BB50A1 /* CineTimeTests.swift in Sources */,
E632A72724A4CCA200D376C6 /* RouterTests.swift in Sources */,
814D262E24A4375700580C0B /* RouteAPITests.swift in Sources */,
818B71DF24A2318300D217EE /* MyListTests.swift in Sources */,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ class SearchViewController: UICollectionViewController, UICollectionViewDelegate
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
return UIEdgeInsets(top: 16, left: 16, bottom: 16, right: 16)
}

override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let movie = listOfResults[indexPath.row]
let destination = DescriptionViewController()
destination.dataFilm = movie
navigationController?.pushViewController(destination, animated: true)
}

}


Expand Down
24 changes: 24 additions & 0 deletions CineTimeTests/RouterTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// ServiceTests.swift
// CineTimeTests
//
// Created by Brena Amorim on 25/06/20.
// Copyright © 2020 Beatriz Carlos. All rights reserved.
//

import XCTest
@testable import CineTime

class RouterTests: XCTestCase {
// func test_Router_urlForAll_toBeValid() {
// //given
// let url = URL(string: " https://api.themoviedb.org/3/search/movie?api_key=a1d23d9e0cc08e49e4703408659fe47c&language=pt-BR&query=Vingadores&page=1")
// let expect = expectation(description: "getting all results")
// Service.shared.searchByName(name: "Vingadores") { _ in
// XCTAssertEqual(url, )
// }
//
// wait(for: [expect], timeout: 5)
// }
//}

16 changes: 16 additions & 0 deletions CineTimeTests/SearchTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// SearchTests.swift
// CineTimeTests
//
// Created by Brena Amorim on 24/06/20.
// Copyright © 2020 Beatriz Carlos. All rights reserved.
//

import XCTest

@testable import CineTime

class SearchTests: XCTestCase {

func test_Search
}