All Projects → Karumi → KataTODOApiClientKotlin

Karumi / KataTODOApiClientKotlin

Licence: Apache-2.0 license
TODO API Client Kata for Kotlin Developers. The main goal is to practice integration testing using MockWebServer

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to KataTODOApiClientKotlin

Movieapp
🎬 MovieApp is a Flutter application built to demonstrate the use of modern development tools with best practices implementation like Modularization, BLoC, Dependency Injection, Dynamic Theme, Cache, Shimmer, Testing, Flavor, CI/CD, etc.
Stars: ✭ 117 (+98.31%)
Mutual labels:  integration-testing, retrofit
KataContactsKotlin
KataContacts written in Kotlin. The main goal is to practice Clean Architecture Development
Stars: ✭ 47 (-20.34%)
Mutual labels:  training, kata
KataSuperHeroesIOS
Super heroes kata for iOS Developers. The main goal is to practice UI Testing.
Stars: ✭ 69 (+16.95%)
Mutual labels:  training, kata
formations
Supports de cours des formations OpenStack et conteneurs de la société alter way
Stars: ✭ 43 (-27.12%)
Mutual labels:  training
nntrainer
NNtrainer is Software Framework for Training Neural Network Models on Devices.
Stars: ✭ 92 (+55.93%)
Mutual labels:  training
TeamCityApp
TeamCity in your pocket (Android application)
Stars: ✭ 48 (-18.64%)
Mutual labels:  retrofit
admin-training
Galaxy Admin Training
Stars: ✭ 55 (-6.78%)
Mutual labels:  training
AvengersChat
💙 Android sample Avengers chat application using Stream Chat SDK based on MVVM (ViewModel, Coroutines, Room, Hilt, Repository) architecture.
Stars: ✭ 350 (+493.22%)
Mutual labels:  retrofit
springboot-junit5-mockito2
Show case for how to use junit 5 and mockito 2 for unit testing and integration test in spring boot 2
Stars: ✭ 18 (-69.49%)
Mutual labels:  integration-testing
kata
TDD, Refactoring kata in many languages
Stars: ✭ 14 (-76.27%)
Mutual labels:  kata
ecosystem-ci
Automate issue discovery for your projects against Lightning nightly and releases.
Stars: ✭ 41 (-30.51%)
Mutual labels:  integration-testing
refactoringtopatterns
A place to practice Refactoring To Patterns that Kerievsky wrote about in his book
Stars: ✭ 46 (-22.03%)
Mutual labels:  kata
carte-uso
Cartea "Utilizarea sistemelor de operare"
Stars: ✭ 18 (-69.49%)
Mutual labels:  training
ngx-testbedder
CLI tool for writing the test bed for Angular integration test
Stars: ✭ 13 (-77.97%)
Mutual labels:  integration-testing
xenvman
Environment manager for testing containers and microservices
Stars: ✭ 12 (-79.66%)
Mutual labels:  integration-testing
kedro-training
Find documentation and a template project for delivering Kedro training.
Stars: ✭ 26 (-55.93%)
Mutual labels:  training
MVPHulk
Android MVP 快速集成方案 (支持AndroidX)
Stars: ✭ 19 (-67.8%)
Mutual labels:  retrofit
chuck
Lightweight proxy for REST API mocking and run integration test on mobile devices
Stars: ✭ 17 (-71.19%)
Mutual labels:  integration-testing
BooksApp
Book selling application with MVVM (Model, View, ViewModel), LiveData, DataBinding, Retrofit, Room Database, Navigation Component(NavGraph, BottomNav), ViewPager2 in TabLayout, SearchView, Vertical Adapter(BestSellers) and Horizontal Adapter(All Books) with ConcatAdapter for Main Screen, Firebase Auth, SearchView in Adapter, Picasso, Lottie, Ani…
Stars: ✭ 53 (-10.17%)
Mutual labels:  retrofit
npmtooling
This is the repository for my course, Tooling with NPM Scripts on LinkedIn Learning and Lynda.com.
Stars: ✭ 13 (-77.97%)
Mutual labels:  training

Karumi logo KataTODOApiClient for Kotlin Build Status

  • We are here to practice integration testsing using HTTP stubbing.
  • We are going to use MockWebServer to simulate a HTTP server.
  • We are going to use JUnit to perform assertions.
  • We are going to practice pair programming.

Getting started

This repository contains an API client to interact with a remote service we can use to implement a TODO application.

This API Client is based on one class with name TodoApiClient containing some methods to interact with the API. Using this class we can get all the tasks we have created before, get a task using the task id, add a new task, update a task or delete an already created task.

The API client has been implemented using a networking framework named Retrofit. Review the project documentation if needed.

Tasks

Your task as a Kotlin Developer is to write all the integration tests needed to check if the API Client is working as expected.

This repository is ready to build the application, pass the checkstyle and your tests in Travis-CI environments.

Our recommendation for this exercise is:

  • Before starting

    1. Fork this repository.
    2. Checkout kata-todo-api-client branch.
    3. Execute the repository playground and make yourself familiar with the code.
    4. Execute TodoApiClientTest and watch the only test it contains pass.
  • To help you get started, these are some tests already written at TodoApiClientTest class. Review it carefully before to start writing your own tests. Here you have the description of some tests you can write to start working on this Kata:

    1. Test that the Accept and ContentType headers are sent.
    2. Test that the list of TaskDto instances obtained invoking the getter method of the property allTasks contains the expected values.
    3. Test that the request is sent to the correct path using the correct HTTP method.
    4. Test that adding a task the body sent to the server is the correct one.

Considerations

  • If you get stuck, master branch contains all the tests already solved.

  • You will find some utilities to help you test the APIClient easily in: MockWebServerTest and the test resources directory.

Extra Tasks

If you've covered all the application functionality using integration tests you can continue with some extra tasks:

  • Replace some integration tests we have created with unit tests. A starting point could be the DefaultHeadersInterceptor class.
  • Create your own API client to consume one of the services described in this web: http://jsonplaceholder.typicode.com/

Documentation

There are some links which can be useful to finish these tasks:

Contributors

Thank you all for your work!


Igor Ganapolsky

License

Copyright 2017 Karumi

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].