CanGetSalt() { using (var context = new BasicContext()) { var service = context.Resolve <IHashService>(); Assert.AreEqual("SALT", service.NewSalt()); } }
CanCreateGame() { using (var context = new BasicContext()) { const string name = "Tetris"; var url = new Url("www.tetris.com"); var command = context.Resolve <GameCommand>(); AssertX.IsEmpty(context.Entities.Games); var result = command.AddGame(name, url); AssertX.IsNotEmpty(context.Entities.Games); Assert.AreEqual(name, result.Name); Assert.AreEqual(url.Value, result.URL); } }