Coder Social home page Coder Social logo

vishalkhexafold / unittesting-mvvm-kotlin-koin-coroutines-sample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from niharika2810/unittesting-mvvm-kotlin-koin-coroutines-sample

0.0 0.0 0.0 577 KB

This repository covers sample unit testing for Login and list screens using MVVM,Kotlin,Coroutines and Koin.

Home Page: https://thedroidlady.com/2019-07-10-unit-testing-in-mvvm-kotlin-databinding

Java 6.03% Kotlin 93.97%

unittesting-mvvm-kotlin-koin-coroutines-sample's Introduction

UnitTesting-MVVM-Kotlin-Koin-Coroutines-Sample

Use : [email protected] and password for sample Login in App.

This repository covers sample unit testing for Login and listing screens using MVVM,Kotlin,Coroutines and Koin.

MVVM stands for Model, View, ViewModel.

Model: This holds the data of the application. It cannot directly talk to the View. Generally, it’s recommended to expose the data to the ViewModel through Observables. View: It represents the UI of the application devoid of any Application Logic. It observes the ViewModel. ViewModel: It acts as a link between the Model and the View. It’s responsible for transforming the data from the Model. It provides data streams to the View. It also uses hooks or callbacks to update the View. It’ll ask for the data from the Model.

A Coroutine is a concurrency design pattern that you can use on Android to simplify code that executes asynchronously. Coroutines were added to Kotlin in version 1.3 and are based on established concepts from other languages.

On Android, coroutines help to manage long-running tasks that might otherwise block the main thread and cause your app to become unresponsive. This topic describes how you can use Kotlin coroutines to address these problems, enabling you to write cleaner and more concise app code.

Koin is a lightweight dependency injection framework, that uses Kotlin’s DSLs to lazily resolve your dependency graph at runtime.

Unit Testing Frameworks used -
Junit
Mockito
PowerMock

Learn about usage of mock-maker-inline

You can check this article for all the issues you might face while you start writing Unit Tests -

https://medium.com/1mgofficial/unit-testing-in-mvvm-kotlin-databinding-ba3d4ea08f0e

Follow me on Medium for more reading.

Happy Coding!!

unittesting-mvvm-kotlin-koin-coroutines-sample's People

Contributors

niharika2810 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.