상속: IWarcraftSession
 public void CanGetByName()
 {
     using (var session = new WarcraftSession())
     {
         Assert.IsNotNull(session.Characters.GetByName("test"));
     }
 }
 public void CanGetAll()
 {
     using (var session = new WarcraftSession())
     {
         Assert.IsTrue(session.Characters.GetAll().Count == 1);
     }
 }
        public void CanGetByEmailAndPassword()
        {
            using (var session = new WarcraftSession())
            {
                var account = session.Accounts.GetByEmailAndPassword("*****@*****.**", "test");

                Assert.IsNotNull(account);
            }
        }
        public void CanInsert()
        {
            using (var session = new WarcraftSession())
            {
                var account = session.Accounts.Insert(new Account
                {
                    Email = "*****@*****.**",
                    Password = "******"
                });

                Assert.IsNotNull(account);
                Assert.IsTrue(session.SaveChanges());
            }
        }
        public void CannotInsertBloodElfWarrior()
        {
            using (var session = new WarcraftSession())
            {
                var character = session.Characters.Insert(new Character
                {
                    Name = "test2",
                    Race = CharacterRace.BloodElf,
                    Class = CharacterClass.Warrior,
                    Faction = CharacterFaction.Horde,
                    Account = session.Accounts.GetByEmail("*****@*****.**")
                });

                Assert.IsNotNull(character);
                Assert.IsFalse(session.SaveChanges());
            }
        }
        public void CanInsert()
        {
            using (var session = new WarcraftSession())
            {
                var character = session.Characters.Insert(new Character
                {
                    Name = "test",
                    Race = CharacterRace.Human,
                    Class = CharacterClass.Warrior,
                    Faction = CharacterFaction.Alliance,
                    Account = session.Accounts.GetByEmail("*****@*****.**")
                });

                Assert.IsNotNull(character);
                Assert.IsTrue(session.SaveChanges());
            }
        }
        public void CannotInsertDeathKnight()
        {
            using (var session = new WarcraftSession())
            {
                var character = session.Characters.Insert(new Character
                {
                    Name = "test2",
                    Race = CharacterRace.Gnome,
                    Class = CharacterClass.DeathKnight,
                    Faction = CharacterFaction.Alliance,
                    Account = session.Accounts.GetByEmail("*****@*****.**")
                });

                Assert.IsNotNull(character);
                Assert.IsFalse(session.SaveChanges());
            }
        }