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. Disclaimer Any code herein is purely experimental and just looking at what could be achieved….

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…

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…

Moq Vs Rhino Mocks

Just some rough notes I made coming from a Moq framework and converting to Rhino Mocks: Asserting a method call ISomethingRepository mockedSomethingRepository = MockRepository.GenerateMock(); var person = new Person { name = “Bob” }; // Act var something = new Something(mockedSomethingReporsitory); // Assert mockedSomethingRepository.AssertWasCalled(x…

Git: Setup Beyond Compare as Difftool and Mergetool

Change config file Depending on your Git setup (mines Git for Windows). You’ll need to locate your .gitconfig file (mine’s %userpath%/.gitconfig and make the necessary changes below. Note that the “prompt = false” stops the Y/N prompt for each difftool file compare in the…