Пример #1
0
        public void HasVoiceActorAssigned_NoneAssigned_ReturnsFalse()
        {
            var list  = new CharacterGroupList();
            var group = new CharacterGroup(m_project);

            list.CharacterGroups.Add(group);

            Assert.IsFalse(list.HasVoiceActorAssigned(1));
        }
Пример #2
0
        public void HasVoiceActorAssigned_RequestedActorAssigned_ReturnsTrue()
        {
            var list  = new CharacterGroupList();
            var group = new CharacterGroup(m_project);

            group.AssignVoiceActor(1);
            list.CharacterGroups.Add(group);

            Assert.IsTrue(list.HasVoiceActorAssigned(1));
        }
Пример #3
0
        public void RemoveVoiceActor_ActorAssignedToMoreThanOneGroup_RemovesAllAssignmentsForSpecifiedActorOnly()
        {
            // Note: this tests something that is actually illegal: there should only ever be one group assigned
            // to a particular actor.
            var list   = new CharacterGroupList();
            var group1 = new CharacterGroup(m_project);
            var group2 = new CharacterGroup(m_project);
            var group3 = new CharacterGroup(m_project);

            group1.AssignVoiceActor(1);
            list.CharacterGroups.Add(group1);
            group2.AssignVoiceActor(1);
            list.CharacterGroups.Add(group2);
            group3.AssignVoiceActor(2);
            list.CharacterGroups.Add(group3);

            list.RemoveVoiceActor(1);

            Assert.IsFalse(list.HasVoiceActorAssigned(1));
            Assert.IsTrue(list.HasVoiceActorAssigned(2));
        }