Category Archives: Comps

Migrating from TFVC to Git

Leave a Comment

Filed under Comps

Powershell, Pester and Octopus

Notes from creating Powershell scripts with Pester Unit testing and deploying via Octopus deploy

“Invoke-Pester” will run the pester test files. The test files need to be named something.tests.ps1 to be discovered by the Pester test runner.
read more

Leave a Comment

Filed under Comps

Web Scraping – How to scrape Instragram

Targeting Instagram

I’ve blogged about web scraping before mainly with Raspberry Pi and Python (utilising BeautifulSoup).
Finding a free weekend I decided to revisit scraping and looked at Instagram.

read more

Leave a Comment

Filed under Comps

Moq – Mocking the same method call with multiple results

The Scenario

I have a loop in production code that has evolved into processing batches of records. I need to modify an existing unit test to accommodate mocking the same method call each time through the loop returning different results on each loop (as it would in production).

read more

Leave a Comment

Filed under Comps

Accessing an internal class from an external assembly

I was working with a customer’s code base recently and I noticed a separate Unit test project was referencing an internal class in a different assembly. Initially, I expected a code smell and perhaps some kind of wrapper that was exposing an internal class some how. After doing a bit of digging and examining dependencies further with Resharper I drew a blank. How was this possible?

read more

Leave a Comment

Filed under Comps