This document discusses the observeOn and subscribeOn operators in RxJava. ObserveOn sets the Scheduler on which observers will observe the Observable. SubscribeOn sets the Scheduler on which the Observable will emit items. Several examples are provided to illustrate the difference between the two operators and how they affect the threading of Observable execution. Links to additional documentation resources on RxJava operators are also included.
This document discusses the observeOn and subscribeOn operators in RxJava. ObserveOn sets the Scheduler on which observers will observe the Observable. SubscribeOn sets the Scheduler on which the Observable will emit items. Several examples are provided to illustrate the difference between the two operators and how they affect the threading of Observable execution. Links to additional documentation resources on RxJava operators are also included.
This document discusses using mocks in Swift unit tests to make tests fast, isolated, and repeatable. It provides an example of injecting a mock NSNotificationCenter dependency into a view controller to test that a notification is posted when a button is pressed. It also shows how to simplify the mock by defining a NotificationCenter protocol and creating a simple MockNotificationCenter class that implements it. The conclusion advocates using mocks, fakes, stubs, and protocols to write clean, isolated unit tests in Swift.
The document discusses test-driven development (TDD) with Swift. It outlines the rules of TDD, which state that code can only be written to pass a failing unit test and no more production code than needed. The red-green-refactor process is also summarized, where a failing test is written, then code to pass it, then refactoring. Benefits of unit testing like fast feedback, catching edge cases, and preventing regressions are listed. Advantages of TDD like automatic testability, modularity, coverage and living documentation are provided. Some drawbacks like initial slower speed and learning curve are also noted.
This document discusses using Kotlin for test suites and provides examples of writing unit tests in Kotlin compared to Java. It shows how Kotlin allows for cleaner, more readable tests through features like lambdas, extension functions, and DSL capabilities. Specifically, it provides an example of refactoring a test for a task presenter to initialize views into a clearer specification using the given-when-then syntax supported by testing frameworks like Spek for Kotlin. The refactored test checks that when a task with no response is assigned to the current user, the response button is enabled upon initializing the presenter's views.
Make testing easier and more productive by applying test-driven development strategies to the world of iOS and Objective-C. Join us to learn about the tools that are available, and hear strategies for writing more testable code and robust tests. You'll be ready to take the next step and integrate these strategies into your daily workflow.
The document discusses the benefits of community contribution, including giving back to one's community, interacting with product teams and experts around the globe, and potentially getting recognized with opportunities like visiting Microsoft headquarters. It notes that contributing to the community can help one get involved with community meetups and initiatives like an influencers app, even if one feels busy, and provides contact information for the author to assist others.
DevNext - Web Programming Concepts Using Asp NetAdil Mughal
This document provides an overview of web programming concepts using ASP.NET. It discusses HTTP requests and the difference between static and dynamic web pages. It also covers ASP.NET page lifecycles, client-side vs server-side processing, and state management using view state. The document includes demonstrations of ASP.NET web applications and key concepts.
The document summarizes a presentation given to emerging .NET developers on new features in Windows 7 and how to program for them. It introduces the speakers and their backgrounds in Microsoft technologies. It provides an overview of key Windows 7 features like the taskbar, jump lists, libraries and touch capabilities. It also summarizes the Windows 7 API and how to use the TaskbarManager and JumpList objects to program taskbar and jump list functionality in applications.
This document summarizes a presentation about new features in Visual Studio 2010 Ultimate. The presentation covers improvements to the start page and new project dialog, the IDE, code focused development features, ASP.NET improvements, debugging tools, deployment capabilities, CLR updates, and extensibility options. The presentation was given by Adil Ahmed Mughal, a Microsoft MVP, at the UltimateLoadFest event.
Code Sharing Between Windows Phone/Store AppsAdil Mughal
This is slide deck from session on Code Sharing between Windows Phone and Windows Store apps. Complete code has been published at https://github.com/adilmughal/DemoMvvm-Sharing-WP-WS
What’s the best testing framework on Android? Espresso or Robotium? Robolectric or a plain JUnit test?
The reason why many developers don’t write tests is not due to the testing libraries but because of the low testability of the Android code.
In this talk we’ll see, thanks to a practical example, how to use Dependency Injection (using Dagger) and the Model View Presenter pattern to write a testable Android application.
The document discusses a CodeLab on Android Wear. It includes an agenda for the CodeLab that covers creating a new project, adding libraries, layouts for smartwatches, communication with smartphones, and multi-fragment layouts. It provides code examples for creating WatchViewStubs, communicating between the mobile and wear modules using Teleport, and implementing a GridViewPager with fragments. The CodeLab aims to demonstrate building a simple survey app with Android Wear, including syncing data and updating the UI in response to changes.
Testable Android Apps using data binding and MVVMFabio Collini
The document discusses testing Android apps using data binding and MVVM. It covers setting up the MVVM architecture with a Note taking app example. It discusses using the Model-View-ViewModel pattern with data binding in Android. It also discusses how to write JVM unit tests for the ViewModel and mock dependencies by using stubs and spies.
Lightening Talk I gave at Inaka in April 2014.
I was in charge of investigating test-driven development for our iOS mobile team. Since I realized it was such a big concept, after having gathered enough information and having played with it enough, I decided to introduce my fellows on the topic by presenting it in a formal talk with slides. The aim was teaching them a different way of developing, which, for us, at that moment, was completely new and controversial.
Web Development using ASP.NET MVC at HECAdil Mughal
The document discusses web development using Visual Studio 2012 and ASP.NET MVC. It begins with an overview of what attendees should already know, such as object-oriented programming and basic web development. It then covers web fundamentals like HTTP transactions and static vs. dynamic pages. The document demonstrates building a sample application with ASP.NET MVC in Visual Studio 2012, explaining controllers, models, and views. It concludes with a question and answer section.
This document provides an introduction to Retrofit and RxJava. It discusses:
1. How Retrofit turns REST APIs into Java interfaces and handles JSON conversion.
2. What RxJava is and how it allows for composing asynchronous and event-based programs using observable sequences.
3. Examples of making HTTP requests with Retrofit, including defining services, making synchronous and asynchronous requests, and using callbacks and RxJava.
4. Key RxJava concepts like Observables, operators like map, flatMap, and zip, and threading.
Android Data Binding in action using MVVM pattern - droidconUKFabio Collini
The document discusses Android Data Binding and the Model-View-ViewModel (MVVM) pattern. It covers the basics of data binding, using custom attributes with data binding, creating reusable UI components with data binding, implementing two-way data binding, and using data binding with RxJava and the MVVM pattern. The speaker presents code examples for setting up data binding in layout XML files and Java code, and binding data to views while ensuring automatic updates when the data changes.
Data Binding in Action using MVVM patternFabio Collini
The Data Binding framework was one of Google’s announcements at I/O 2015, it’s a big change in the code organization of an Android app. Some developers are sceptical about this framework but, if used in the “right way”, it’s very powerful and it allows to remove a lot of redundant boilerplate code from activities and fragments.
In this talk we’ll start from the Data Binding basic concepts and then we’ll see how to use it to improve the architecture of a typical Android application applying the Model View ViewModel pattern. Using this pattern you need to write less code to create an app that can be easily tested using JVM and instrumentation tests.
This document provides an introduction to an English language learning workshop using iPads. The workshop aims to expose participants to educational technology like iPads and apps, have them use the apps to learn English in a fun way, and work together in groups to create blogs documenting their learning outcomes. Participants are asked to think about how they currently learn English and how iPads could be used, and to share their own experiences. Being a 21st century learner involves being a digital citizen and using tools like Gmail and blogs.
Daftar keinginan tersebut mencakup aspirasi karir seperti memiliki perusahaan sendiri, bekerja di perusahaan ternama, menjadi dosen, dan pelatih sepak bola. Juga keinginan pribadi seperti menjadi orang kaya, memiliki rumah dan istri cantik, serta sosial seperti membangun masjid, yayasan pendidikan, dan relawan bencana alam.
This document discusses using mocks in Swift unit tests to make tests fast, isolated, and repeatable. It provides an example of injecting a mock NSNotificationCenter dependency into a view controller to test that a notification is posted when a button is pressed. It also shows how to simplify the mock by defining a NotificationCenter protocol and creating a simple MockNotificationCenter class that implements it. The conclusion advocates using mocks, fakes, stubs, and protocols to write clean, isolated unit tests in Swift.
The document discusses test-driven development (TDD) with Swift. It outlines the rules of TDD, which state that code can only be written to pass a failing unit test and no more production code than needed. The red-green-refactor process is also summarized, where a failing test is written, then code to pass it, then refactoring. Benefits of unit testing like fast feedback, catching edge cases, and preventing regressions are listed. Advantages of TDD like automatic testability, modularity, coverage and living documentation are provided. Some drawbacks like initial slower speed and learning curve are also noted.
This document discusses using Kotlin for test suites and provides examples of writing unit tests in Kotlin compared to Java. It shows how Kotlin allows for cleaner, more readable tests through features like lambdas, extension functions, and DSL capabilities. Specifically, it provides an example of refactoring a test for a task presenter to initialize views into a clearer specification using the given-when-then syntax supported by testing frameworks like Spek for Kotlin. The refactored test checks that when a task with no response is assigned to the current user, the response button is enabled upon initializing the presenter's views.
Make testing easier and more productive by applying test-driven development strategies to the world of iOS and Objective-C. Join us to learn about the tools that are available, and hear strategies for writing more testable code and robust tests. You'll be ready to take the next step and integrate these strategies into your daily workflow.
The document discusses the benefits of community contribution, including giving back to one's community, interacting with product teams and experts around the globe, and potentially getting recognized with opportunities like visiting Microsoft headquarters. It notes that contributing to the community can help one get involved with community meetups and initiatives like an influencers app, even if one feels busy, and provides contact information for the author to assist others.
DevNext - Web Programming Concepts Using Asp NetAdil Mughal
This document provides an overview of web programming concepts using ASP.NET. It discusses HTTP requests and the difference between static and dynamic web pages. It also covers ASP.NET page lifecycles, client-side vs server-side processing, and state management using view state. The document includes demonstrations of ASP.NET web applications and key concepts.
The document summarizes a presentation given to emerging .NET developers on new features in Windows 7 and how to program for them. It introduces the speakers and their backgrounds in Microsoft technologies. It provides an overview of key Windows 7 features like the taskbar, jump lists, libraries and touch capabilities. It also summarizes the Windows 7 API and how to use the TaskbarManager and JumpList objects to program taskbar and jump list functionality in applications.
This document summarizes a presentation about new features in Visual Studio 2010 Ultimate. The presentation covers improvements to the start page and new project dialog, the IDE, code focused development features, ASP.NET improvements, debugging tools, deployment capabilities, CLR updates, and extensibility options. The presentation was given by Adil Ahmed Mughal, a Microsoft MVP, at the UltimateLoadFest event.
Code Sharing Between Windows Phone/Store AppsAdil Mughal
This is slide deck from session on Code Sharing between Windows Phone and Windows Store apps. Complete code has been published at https://github.com/adilmughal/DemoMvvm-Sharing-WP-WS
What’s the best testing framework on Android? Espresso or Robotium? Robolectric or a plain JUnit test?
The reason why many developers don’t write tests is not due to the testing libraries but because of the low testability of the Android code.
In this talk we’ll see, thanks to a practical example, how to use Dependency Injection (using Dagger) and the Model View Presenter pattern to write a testable Android application.
The document discusses a CodeLab on Android Wear. It includes an agenda for the CodeLab that covers creating a new project, adding libraries, layouts for smartwatches, communication with smartphones, and multi-fragment layouts. It provides code examples for creating WatchViewStubs, communicating between the mobile and wear modules using Teleport, and implementing a GridViewPager with fragments. The CodeLab aims to demonstrate building a simple survey app with Android Wear, including syncing data and updating the UI in response to changes.
Testable Android Apps using data binding and MVVMFabio Collini
The document discusses testing Android apps using data binding and MVVM. It covers setting up the MVVM architecture with a Note taking app example. It discusses using the Model-View-ViewModel pattern with data binding in Android. It also discusses how to write JVM unit tests for the ViewModel and mock dependencies by using stubs and spies.
Lightening Talk I gave at Inaka in April 2014.
I was in charge of investigating test-driven development for our iOS mobile team. Since I realized it was such a big concept, after having gathered enough information and having played with it enough, I decided to introduce my fellows on the topic by presenting it in a formal talk with slides. The aim was teaching them a different way of developing, which, for us, at that moment, was completely new and controversial.
Web Development using ASP.NET MVC at HECAdil Mughal
The document discusses web development using Visual Studio 2012 and ASP.NET MVC. It begins with an overview of what attendees should already know, such as object-oriented programming and basic web development. It then covers web fundamentals like HTTP transactions and static vs. dynamic pages. The document demonstrates building a sample application with ASP.NET MVC in Visual Studio 2012, explaining controllers, models, and views. It concludes with a question and answer section.
This document provides an introduction to Retrofit and RxJava. It discusses:
1. How Retrofit turns REST APIs into Java interfaces and handles JSON conversion.
2. What RxJava is and how it allows for composing asynchronous and event-based programs using observable sequences.
3. Examples of making HTTP requests with Retrofit, including defining services, making synchronous and asynchronous requests, and using callbacks and RxJava.
4. Key RxJava concepts like Observables, operators like map, flatMap, and zip, and threading.
Android Data Binding in action using MVVM pattern - droidconUKFabio Collini
The document discusses Android Data Binding and the Model-View-ViewModel (MVVM) pattern. It covers the basics of data binding, using custom attributes with data binding, creating reusable UI components with data binding, implementing two-way data binding, and using data binding with RxJava and the MVVM pattern. The speaker presents code examples for setting up data binding in layout XML files and Java code, and binding data to views while ensuring automatic updates when the data changes.
Data Binding in Action using MVVM patternFabio Collini
The Data Binding framework was one of Google’s announcements at I/O 2015, it’s a big change in the code organization of an Android app. Some developers are sceptical about this framework but, if used in the “right way”, it’s very powerful and it allows to remove a lot of redundant boilerplate code from activities and fragments.
In this talk we’ll start from the Data Binding basic concepts and then we’ll see how to use it to improve the architecture of a typical Android application applying the Model View ViewModel pattern. Using this pattern you need to write less code to create an app that can be easily tested using JVM and instrumentation tests.
This document provides an introduction to an English language learning workshop using iPads. The workshop aims to expose participants to educational technology like iPads and apps, have them use the apps to learn English in a fun way, and work together in groups to create blogs documenting their learning outcomes. Participants are asked to think about how they currently learn English and how iPads could be used, and to share their own experiences. Being a 21st century learner involves being a digital citizen and using tools like Gmail and blogs.
Daftar keinginan tersebut mencakup aspirasi karir seperti memiliki perusahaan sendiri, bekerja di perusahaan ternama, menjadi dosen, dan pelatih sepak bola. Juga keinginan pribadi seperti menjadi orang kaya, memiliki rumah dan istri cantik, serta sosial seperti membangun masjid, yayasan pendidikan, dan relawan bencana alam.
4. 모방하다
• Mock Object 는 검사하고자 하는 코드와 맞물려 동작하는 객체들을 대신하여
동작하기 위해 만들어진 객체이다. 검사하고자 하는 코드는 Mock Object 의 메
서드를 부를 수 있고, 이 때 Mock Object는 미리 정의된 결과 값을 전달한다.
MockObject는 자신에게 전달된 인자를 검사할 수 있으며, 이를 테스트 코드로
전달할 수도 있다.