Hi everyone, it has been couple of months since I post my last posts. Today, I am going to share how we can code using Test Driven Development with The Composable Architecture, but I am going to share it in a video format. Test Driven Development is a process for creating a software by following … Continue reading Exploring Test Driven Development with TCA (The Composable Architecture)
Blog
Test Double : Spy
In the previous article, we've already talk about Test Double in general. In this article, we will talk about one of test double, called Spy. Testing a component can be helped with another collaborator component with predefined behavior and collecting information. This is called spying. 💡 Spies are stubs that also record some information based on how they were … Continue reading Test Double : Spy
Unit Testing Tips for Your UI
Photo by NordWood Themes on Unsplash Today, we are going to learn extra tips to test your ViewController. It is always good to have extra test since it can increase your code validity. Testing your viewController can helps you be more extra aware of what is actually going on with the ViewController. There are some tips that I … Continue reading Unit Testing Tips for Your UI
Test Double : Stub
In the last article, we've already talk about Test Double in general. In this article, we will talk about on of test double, called stub. Testing a component can be helped with another collaborator component with predefined behavior. This is called stubbing. 💡 Stubs provide canned answers to calls made during the test, usually not responding at … Continue reading Test Double : Stub
Introduction to Test Double : What and Why We Need It?
When it comes to unit testing, testing a component is a crucial way to validate our component is working properly or not. By definition, a component is an implementation detail, it can be a class, or struct, or similar to that. Let's say we have a use case component. This use case is responsible to … Continue reading Introduction to Test Double : What and Why We Need It?
Cleaning AppDelegate or SceneDelegate Using ViewControllerFactory
Factory Design Pattern Illustration Overview AppDelegate or SceneDelegate is the main file that we as iOS developers know to configure, inject, or instantiate a global instance or frameworks. This place become essential, especially because it is actually the starting point of our app. Because it knows so many things, like configuring the frameworks, handling push … Continue reading Cleaning AppDelegate or SceneDelegate Using ViewControllerFactory
Implementing Builder Pattern to create Navigation Stack for UIViewController on iOS
Photo by helloimnik on Unsplash Introduction A Builder pattern is one of Design Pattern that belongs to the creational Design Pattern. The pattern exist to solve issue on creating a complex object. This pattern can helps developer to create an object in a simple and elegant way. To use the pattern, we need to create … Continue reading Implementing Builder Pattern to create Navigation Stack for UIViewController on iOS
Compose Your UseCases to Create New Functionality using Composite Reuse Principle
On the previous article, we already learn about how to create a UseCase. In this article, we are going to learn how we can composes use case and create new one that has different functionality, using Composite Reuse Principle. Let's visit the previous article example. The previous example, we have a LoadTransactionsUseCase protocol to get a general picture … Continue reading Compose Your UseCases to Create New Functionality using Composite Reuse Principle
Get Rid of `nil` Values using Dictionary.compactMapValues { $0 }
What is compactMapValues { $0 } ? compactMapValues {} can be really helps when we are dealing with optional values inside a dictionary. Readability is also important, especially amongs the developers. compactMapValues is one of the great language feature of Swift. "Returns a new dictionary containing only the key-value pairs that have non-nil values as the … Continue reading Get Rid of `nil` Values using Dictionary.compactMapValues { $0 }
Converting Use Case Specs into Code (Part 2)
💡Your Code tell the what the app can do Photo by Oskar Yildiz on Unsplash Last article, we already learn how to create a use case specs. In this article, we will learn how to convert a use case specs to the code. I will bring the previous use case specs below : Load Transactions … Continue reading Converting Use Case Specs into Code (Part 2)