public void Can_remove_existing_Position()
        {
            var Position = new Position() { Id = "1B" };
            IPositionRepository repository = new PositionRepository();
            repository.Delete(Position);

            using (ISession session = _sessionFactory.OpenSession())
            {
                var fromDb = session.Get<Position>(Position.Id);
                Assert.IsNull(fromDb);
            }
        }
        public void Can_update_existing_Position()
        {
            IPositionRepository repository = new PositionRepository();
            var Position = new Position() { Id = "1B", Type = PositionType.P };
            repository.Save(Position);

            // use session to try to load the product
            using (ISession session = _sessionFactory.OpenSession())
            {
                var fromDb = session.Get<Position>(Position.Id);
                Assert.AreEqual(Position.Type, fromDb.Type);
            }
        }
        public void Can_add_new_Position()
        {
            var Position = new Position { Id = "3B", Name = "Third Base" };
            IPositionRepository repository = new PositionRepository();
            repository.Save(Position);

            // use session to try to load the product
            using (ISession session = _sessionFactory.OpenSession())
            {
                var fromDb = session.Get<Position>(Position.Id);
                // Test that the product was successfully inserted
                Assert.IsNotNull(fromDb);
                Assert.AreNotSame(Position, fromDb);
                Assert.AreEqual(Position.Name, fromDb.Name);
            }
        }