RSSAmplifier

Bart Fokker · Dec 23, 2018

Mocking system time in tests

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

Introduction Recently I was working on my personal project and I encountered a situation where I was calling time.Now() to get the current system time. I was working on a function to calculate someone's age from a birthday, I needed this function to display it in my app. I did not want another field in my database with someone's age, since in my opinion this calculation from the birthday is pretty…

Read on bartfokker.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.