public void WatchlistCreateCommandHandler_Handle()
        {
            var user = FakeObjects.TestUserWithId();

            Watchlist newValue = null;

            var command = new WatchlistCreateCommand()
            {
                UserId = user.Id,
                Name = FakeValues.Name,
                JsonQuerystring = FakeValues.QuerystringJson
            };

            using (var session = _store.OpenSession())
            {
                session.Store(user);

                var commandHandler = new WatchlistCreateCommandHandler(session);

                commandHandler.Handle(command);

                session.SaveChanges();

                newValue = session.Query<Watchlist>().FirstOrDefault();
            }

            Assert.IsNotNull(newValue);
            Assert.AreEqual(command.Name, newValue.Name);
            Assert.AreEqual(command.JsonQuerystring, newValue.QuerystringJson);
        }
        public void WatchlistCreateCommandHandler_Handle()
        {
            var user = FakeObjects.TestUserWithId();

            Watchlist newValue = null;

            var command = new WatchlistCreateCommand()
            {
                UserId          = user.Id,
                Name            = FakeValues.Name,
                JsonQuerystring = FakeValues.QuerystringJson
            };

            using (var session = _store.OpenSession())
            {
                session.Store(user);

                var commandHandler = new WatchlistCreateCommandHandler(session);

                commandHandler.Handle(command);

                session.SaveChanges();

                newValue = session.Query <Watchlist>().FirstOrDefault();
            }

            Assert.IsNotNull(newValue);
            Assert.AreEqual(command.Name, newValue.Name);
            Assert.AreEqual(command.JsonQuerystring, newValue.QuerystringJson);
        }