Skip to content

connected-tlip/Kata-Databinding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android Data-Binding

(Alternatively: Developing View Logic Using TDD)

Due to its proximity to the UI, view logic is typically difficult to test without resorting to UI tests or headless-rendering-based libraries like Robolectric.

This Kata is an introduction of the usage of the Android Data-Binding Library. Using 2-way data-binding, we will learn how you can test view logic with only JUnit, and develop your view logic using TDD.

Problem Description

This project contains a simple single-screen app. Using TDD, we will develop the logic for that screen.

activity_main.xml is a databinding-enabled XML layout, driven by the MainViewLogic class.

We will be writing tests for MainViewLogic.

Implement each story described in the comments of MainViewLogicTest. Start by coming up with the test, then make your test pass by implementing the corresponding function in MainViewLogic. Finally, modify the XML to make use of the fields in MainViewLogic.

Third Party Libraries

We will use Mockito for mocking.

Not 3rd party anymore, but we make extensive use of the Android Data-Binding Library.

About

Coding Kata: Using Android Databinding to test view logic

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages