Skip to content

Commit

Permalink
Add copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Verein committed Jul 8, 2016
1 parent b43c03e commit 19e1d05
Show file tree
Hide file tree
Showing 47 changed files with 751 additions and 231 deletions.
@@ -1,3 +1,19 @@
/*
* Copyright (C) 2016 Alexey Verein
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.antonioleiva.bandhookkotlin.ui.screens.album

import android.content.Intent
Expand All @@ -17,10 +33,6 @@ import com.squareup.picasso.RequestCreator
import org.mockito.ArgumentCaptor
import org.mockito.Mockito.*

/**
* @author tpom6oh@gmail.com
* * 06/07/16.
*/
class AlbumActivityTest : ActivityInstrumentationTestCase2<AlbumActivity>(AlbumActivity::class.java) {

lateinit var presenter: AlbumPresenter
Expand Down
@@ -1,3 +1,19 @@
/*
* Copyright (C) 2016 Alexey Verein
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.antonioleiva.bandhookkotlin.ui.screens.detail

import android.content.Intent
Expand All @@ -16,10 +32,6 @@ import com.squareup.picasso.RequestCreator
import org.mockito.ArgumentCaptor
import org.mockito.Mockito.*

/**
* @author tpom6oh@gmail.com
* * 02/07/16.
*/
class ArtistActivityTest : ActivityInstrumentationTestCase2<ArtistActivity>(ArtistActivity::class.java) {

lateinit var presenter: ArtistPresenter
Expand Down
@@ -1,3 +1,19 @@
/*
* Copyright (C) 2016 Alexey Verein
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.antonioleiva.bandhookkotlin.ui.screens.detail

import android.test.AndroidTestCase
Expand All @@ -8,10 +24,6 @@ import android.view.ViewGroup
import android.widget.TextView
import org.mockito.Mockito.*

/**
* @author tpom6oh@gmail.com
* * 03/07/16.
*/
class BiographyFragmentTest : AndroidTestCase() {

lateinit var layoutInflater: LayoutInflater
Expand Down
@@ -1,16 +1,26 @@
/*
* Copyright (C) 2016 Alexey Verein
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.antonioleiva.bandhookkotlin.data

import com.antonioleiva.bandhookkotlin.data.lastfm.LastFmService
import com.antonioleiva.bandhookkotlin.data.mapper.AlbumMapper
import com.antonioleiva.bandhookkotlin.domain.entity.Album
import com.antonioleiva.bandhookkotlin.repository.dataset.AlbumDataSet

/**
* @author tpom6oh@gmail.com
*
* 03/07/16.
*/

class CloudAlbumDataSet(val lastFmService: LastFmService) : AlbumDataSet {

override fun requestAlbum(mbid: String): Album? {
Expand Down
@@ -1,16 +1,26 @@
/*
* Copyright (C) 2016 Alexey Verein
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.antonioleiva.bandhookkotlin.data.mapper

import com.antonioleiva.bandhookkotlin.data.lastfm.model.LastFmAlbum
import com.antonioleiva.bandhookkotlin.data.lastfm.model.LastFmAlbumDetail
import com.antonioleiva.bandhookkotlin.domain.entity.Album
import com.antonioleiva.bandhookkotlin.domain.entity.Artist

/**
* @author tpom6oh@gmail.com
*
* 03/07/16.
*/

class AlbumMapper(val artistMapper: ArtistMapper = ArtistMapper(), val imageMapper: ImageMapper = ImageMapper(),
val trackMapper: TrackMapper = TrackMapper()) {

Expand Down
@@ -1,14 +1,24 @@
/*
* Copyright (C) 2016 Alexey Verein
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.antonioleiva.bandhookkotlin.data.mapper

import com.antonioleiva.bandhookkotlin.data.lastfm.model.LastFmImage
import com.antonioleiva.bandhookkotlin.data.lastfm.model.LastFmImageType

/**
* @author tpom6oh@gmail.com
*
* 03/07/16.
*/

class ImageMapper {
fun getMainImageUrl(images: List<LastFmImage>?): String? {
if (images == null || images.isEmpty()) {
Expand Down
@@ -1,14 +1,24 @@
/*
* Copyright (C) 2016 Alexey Verein
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.antonioleiva.bandhookkotlin.data.mapper

import com.antonioleiva.bandhookkotlin.data.lastfm.model.LastFmTrack
import com.antonioleiva.bandhookkotlin.domain.entity.Track

/**
* @author tpom6oh@gmail.com
*
* 05/07/16.
*/

class TrackMapper() {

fun transform(tracks: List<LastFmTrack>?) : List<Track> {
Expand Down
@@ -1,16 +1,26 @@
/*
* Copyright (C) 2016 Alexey Verein
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.antonioleiva.bandhookkotlin.domain.interactor

import com.antonioleiva.bandhookkotlin.domain.interactor.base.Event
import com.antonioleiva.bandhookkotlin.domain.interactor.base.Interactor
import com.antonioleiva.bandhookkotlin.domain.interactor.event.AlbumEvent
import com.antonioleiva.bandhookkotlin.domain.repository.AlbumRepository

/**
* @author tpom6oh@gmail.com
*
* 03/07/16.
*/

class GetAlbumDetailInteractor(val albumRepository: AlbumRepository) : Interactor {

var albumId: String? = null
Expand Down
@@ -1,16 +1,26 @@
/*
* Copyright (C) 2016 Alexey Verein
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.antonioleiva.bandhookkotlin.domain.interactor

import com.antonioleiva.bandhookkotlin.domain.interactor.base.Event
import com.antonioleiva.bandhookkotlin.domain.interactor.base.Interactor
import com.antonioleiva.bandhookkotlin.domain.interactor.event.TopAlbumsEvent
import com.antonioleiva.bandhookkotlin.domain.repository.AlbumRepository

/**
* @author tpom6oh@gmail.com
*
* 03/07/16.
*/

class GetTopAlbumsInteractor(val albumRepository: AlbumRepository) : Interactor {

var artistId: String? = null
Expand Down
@@ -1,12 +1,22 @@
/*
* Copyright (C) 2016 Alexey Verein
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.antonioleiva.bandhookkotlin.domain.interactor.event

import com.antonioleiva.bandhookkotlin.domain.entity.Album
import com.antonioleiva.bandhookkotlin.domain.interactor.base.Event

/**
* @author tpom6oh@gmail.com
*
* 03/07/16.
*/

data class AlbumEvent(val album: Album?) : Event
@@ -1,12 +1,22 @@
/*
* Copyright (C) 2016 Alexey Verein
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.antonioleiva.bandhookkotlin.domain.interactor.event

import com.antonioleiva.bandhookkotlin.domain.entity.Album
import com.antonioleiva.bandhookkotlin.domain.interactor.base.Event

/**
* @author tpom6oh@gmail.com
*
* 03/07/16.
*/

data class TopAlbumsEvent(val topAlbums: List<Album>) : Event
@@ -1,12 +1,23 @@
/*
* Copyright (C) 2016 Alexey Verein
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.antonioleiva.bandhookkotlin.domain.repository

import com.antonioleiva.bandhookkotlin.domain.entity.Album

/**
* @author tpom6oh@gmail.com
*
* 03/07/16.
*/
interface AlbumRepository {
fun getTopAlbums(artistId: String?, artistName: String?): List<Album>
fun getAlbum(id: String): Album?
Expand Down

0 comments on commit 19e1d05

Please sign in to comment.