Virtual Warfighter

We have been working on a product of our own for the past months, a game for the OpenVR platform (HTC Vive, etc). The game will release this Friday, please check it out here!


Also I might once in a while write game/VR related blogs here, but its still mainly a blog about enterprise business code bases.


Mini test suite for async CQS backend

Our backend consists of a WebApi backend sporting an async CQS API (Not involving Event sourcing). I wanted a fluent syntax setup for our scenario tests, here is an actual example from the resulting code. (Code removed that are customer specific)

public class When_doing_a_complete_booking : BusinessTest
	private Booking _result;
	private DateTime _date;

	public void Context()
		Guid bookingKey = Guid.Empty;
		_date = DateTime.Now.AddDays(5);

		_result = Given(db => /* Setup here */)
			.When(() => new SearchQuery{ Date = _date, ...})
			.And(result =>
				bookingKey = result.First().BookingKey;
				return new ReserveCommand { BookingKey = bookingKey, ... };
			.And(() => new ConfirmCommand
				BookingKey = bookingKey, 
			.Then(db => db.Set<Booking>().FirstOrDefaultAsync(b => b.BookingKey == bookingKey));

	public void It_should_book_correctly ()