SQLite in ASP.NET Core WITHOUT Entity Framework

Try and search for ASP.NET Core and SQLite and you’ll get a dozen guides to using it with Entity Framework. First of all, we’ll need an ASP.NET Core website and install the Nuget packages Microsoft.Data.Sqlite and System.Data.Sqlite. I prefer to use Dapper for my database access (hence not wanting to use Entity Framework), so go …

New Year, New Host, New Blog

I mentioned at the start of the year, I’m hoping to get back into blogging a bit more this year. I had a pretty good run of posting once a fortnight, but it fell away as my commute got shorter and less convenient for typing. I’ve moved my blog to Digital Ocean. The reason is …

Radio Stars

Podcasts are fantastic. I don’t like media that isn’t on demand, like traditional television and radio. I don’t know why I let theatre off, maybe because it’s more of a conscious decision to consume theatre. That doesn’t mean that I don’t like the content (although most of it is garbage) – I love DVDs and …

Learning Unit Testing XI – Difficult Terrain Is Difficult

As the title clearly states, difficult terrain is going to be hard. It will involve a replacement of the ‘get distance’ code that takes into account that strict distances are not the same as movement distances – the idea that four inches of distance may cost five, six or more inches of movement (which is …

Learning Unit Testing X – Finishing Hiding

Last time, I got the tests for Charging out of the way, and got through a raft of simple checks for Hiding. This time, a few of the more complicated checks. First off, a model can move around while hiding as long as it remains out of sight. I’m not sure how to be checking …

Learning Unit Testing IX – Moving On With Movement

Having gotten those knotty problems with world management, distances, directions, etc all out of the way I can finally move off of page 10. So what’s next? Page 11! Hooray! It begins with a description of a charge move. A charge works like a run, at double-move rate, with the model (hopefully) ending up in …

Learning Unit Testing VIII – Emergent Design

I’ve been bracing myself for this moment since I started the project – I’m coming to believe that I’ve been heading in a slightly wrong direction. Part of TDD is the idea of ‘emergent design’, and letting the correct design emerge from the process of writing minimal code to pass tests. At the same time, …

Learning Unit Testing VII – Running and Redesigning

I can see this page 10 being a pretty big thorn in my side. After stating fairly clearly models can move up to their move rate under the ‘Moving’ heading, it then says A running fighter can move at double speed: 8″ rather than 4″, for example. This is going to have a fairly large …

Learning Unit Testing VI – Code Coverage

Before I get into finally finishing off that blasted page 10, I thought I’d go through a code coverage run to see how I was doing. Test Driven Development, see, everything should be covered by a test. 7.41% of the code is not covered by tests! I must be doing this wrong… Phew, that was …

Learning Unit Testing V – Refactoring Mistakes

I implied in the last post that I had made a mistake when I moved the MoveModel code into the Model class from the MovementManager class. Now, tests on the MovementManager class are actually testing functionality in the Model class. I also discovered that I am not properly testing the ‘GetDistanceFrom’ method with known data …