Esempio n. 1
0
        public void test_restore_character_active()
        {
            CharacterDomain domain   = new CharacterDomain();
            Character       chr      = new Character("Somebody");
            Guid            chr_guid = domain.add_character(chr);

            domain.restore_character(chr_guid);
        }
Esempio n. 2
0
        public void test_restore_character()
        {
            CharacterDomain domain   = new CharacterDomain();
            Character       chr      = new Character("Somebody");
            Guid            chr_guid = domain.add_character(chr);

            domain.remove_character(chr_guid);
            domain.restore_character(chr_guid);
            Assert.AreEqual(domain.characters.Count, 1);
            Assert.IsTrue(domain.characters.ContainsKey(chr_guid));
            Assert.AreEqual(domain.characters[chr_guid], chr);
            Assert.AreEqual(domain.active_characters.Count, 1);
            Assert.IsTrue(domain.active_characters.Contains(chr_guid));
        }
Esempio n. 3
0
        public void test_restore_character_no_such_guid()
        {
            CharacterDomain domain = new CharacterDomain();

            domain.restore_character(Guid.NewGuid());
        }