Tuesday, June 13, 2017

Unit Testing with C#

It is refreshing, after all these years, to see the same frameworks around. Matured, they are now recommended as the best options for unit testing in the C# world.

There's a newcomer, though - AutoFixture. Time to add it to the arsenal.



In summary:

  • xUnit
  • Moq
  • AutoFixture
are the things you need for unit and integration testing. Visual Studio nowadays includes a decent test runner GUI. It only takes installing the runner package for xUnit to recognize the tests.



Source: The Holy Trinity of C# Unit Testing (link)

Sunday, June 4, 2017

Google Music Manager - "Could not identify your computer"

Here's a note in case I forget what the actual reason for this message was or how it was resolved.

After not using Google Music Manager for a while, I tried to log in to upload a couple of recordings to share. Unfortunately, I could not log in on the PC. It was giving me the "Could not identify your computer" error message after going through the 2-step authentication.

Reading online pointed out that, for whatever reason, Music Manager clings to a device's MAC address. This was a good pointer.

Checking the network device properties / configure / advanced, there was only one property available - Network Address. Fortunately, this is exactly the one I needed. It was set to Not Present, as it normally should. As I was connecting using USB tethering, I guess this value was never really set.

So I set the value manually to 1F-2E-3D-4C-5B-6A. This is a simple value that follows the specs. And, voila! It worked.

In the meantime, I also tried switching to a Wi-Fi connection but that did not work somehow. In the properties, there was no property for Network Address so I could not see what it was nor modify it.

Update 2017-11-25: Music Manager was unable to connect out of the blue. The settings were all the same. This time I had to connect to a Wi-Fi access point, reinstall Music Manager and it connected fine. Then I switched to USB tethered connection again and it worked.

Saturday, June 3, 2017

Public ClipArt Libraries

Here is a list of public clipart libraries:
  • Open Clipart (link), a large collection of public .SVG drawings
More link collections:
  • Free Vector Graphics (link) 1
  • Free Vector Graphics (link) 2

Thursday, June 1, 2017

Quickly test SQL connection

The quickest way to test an SQL connection is to create a new file with .UDL extension.

Then simply double-click on it to open and a connection properties window will open up, allowing to test a server connection.

Unfortunately, this will not help if you need to use integrated authentication but have to impersonate another user.

Thursday, February 2, 2017

Grid/Table Options for MVC

Here are a few nice-looking options I've tried recently, while looking for a working grid/table solution for an MVC application:
  • DataTables.Net (link)
  • MVCGrid.net (link)
  • Asp.Net MVC Grid (link), based on MVCContrib
All of these apparently support server-side paging and sorting.
 

Monday, January 9, 2017

Friday, November 25, 2016