Tag Archives: testing

Delaying (?) unit testing

It happens: even if you have clear functional requirements and good architecture from the beginning of a project, sometimes (and often) the code that you initially wrote to develop a specific feature (or an infrastructural aspect) will end up deeply … Continue reading

Posted in Development | Tagged , , | Leave a comment

Mocking “this”

Let’s assume we have a simple service that is also using an inner service, providing a few operations as follows: public interface IService {     string A();     string B();     string C(); } public class Service : IService {     private readonly IInnerService innerService;     public Service(IInnerService innerService)     {         this.innerService = innerService;     }     public string A()     {         return “A”;     }     public string B()     {         return b(); … Continue reading

Posted in .NET, C# | Tagged , , , | Leave a comment

Testing Swift deinit

As you probably know, Swift uses ARC for memory management (presumably to improve performance over classic garbage collection based systems). That means it is very important that you do use weak (or unowned) references whenever cycles could form. For example, when you implement … Continue reading

Posted in Swift | Tagged , , , , | Leave a comment