Пример #1
0
 CanGetSalt()
 {
     using (var context = new BasicContext()) {
         var service = context.Resolve <IHashService>();
         Assert.AreEqual("SALT", service.NewSalt());
     }
 }
Пример #2
0
        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);
            }
        }