Software Development
Mock Static Methods in Temporal Workflow Tests
Mar 9, 2024 · 4 min read
If you've delved into Temporal for workflow management, you've likely encountered the challenge of mocking calls from your workflows to static methods in tests. The distributed nature of Temporal's architecture complicates the control over static method behavior during testing. In this article, we'll explore a workaround that taps into Temporal's context propagation concept to address this issue.
Delving into Temporal Java Workflow Testing Environment
Feb 10, 2024 · 3 min read
After some experience and experimentation with Temporal's Java SDK, some interesting observations showed up that were not mentioned in the official documentation of the tool (as of the date of writing this article). In this blog, I'll delve into some of these observations that were strictly targeting the testing environment they provide in Java for testing the behavior of the workflows.
Consumer-Driven Contract Tests with PACT
Jul 15, 2023 · 10 min read
Contract Tests can be considered a major block in the development lifecycle when working on a distributed system architecture. Such type of testing can be driven by either the consumer or the provider. Today, we're going to discover the consumer-driven contract testing using PACT.
Contract Testing: Yay or Nay?
Jul 12, 2023 · 4 min read
Tests are an essential part of the development lifecycle. They ensure good code quality and meet the business value behind the unit under test. Since different types of tests target different objectives, there comes a need for a fast "offline" test that targets the communication principles amongst different parties, hence contract tests.
Pattern Matching Using RegEx
Jul 6, 2022 · less than a minute read
Regular Expressions are a very powerful tool. When done right, they can be used to extract information from texts in a clean way. In this article, we will see an example done in Java to extract information from an article's URL.
Storing Dynamic Objects in MongoDB with C#
May 29, 2022 · 2 min read
The main purpose of using a NoSQL DB vendor such as MongoDB is to take advantage from the flexibility it provides at the level of the structure of the stored data. However, when used with C#, storing a field whose structure is dynamic and differs from object to another is a bit difficult.
How Dependency Injection Makes You Write Better Unit Tests
May 28, 2022 · 4 min read
The purpose of writing unit tests is to test a unit in isolation. However, sometimes isolation may not be accessible when the unit we are testing logically depends on other external units. Here comes Dependency Injection (DI) alongside other concepts to serve the mentioned purpose.
Your Way to Maven
May 27, 2022 · less than a minute read
In this article, I'll be listing all the important notes and maven scripts that you'll probably need while developing in Java. It is more of an FAQ page.
You Should Be Using Inversion of Control Already!
May 25, 2022 · 4 min read
Inversion of Control (IoC) is one of the hot topics when speaking of best practicies in programming. It helps decouple your applications from each other and reach a better separation of concerns.
C# Features I'd Like to See in Java
May 13, 2022 · 7 min read
Java and C# look alike to some extent, however, in the recent few years, the two languages have diverged at different paces and directions. So, the old opinion about the difficulty to tell code from the two languages apart doesn't hold anymore, or at least to me. C# has been growing and shaping up at a faster and more focused pace, and in this article, I'll go over C# features that Java would be better by having.