예제 #1
0
        public void AddClipUsesAssistant()
        {
            using (ITimeline timeline = new DefaultTimeline())
            {
                var assistant = new MockMediaFileAssistant(true);
                timeline.InstallAssistant(assistant);

                Assert.AreEqual(0, assistant.ExecutionCount);

                ITrack track = timeline.AddAudioGroup().AddTrack();
                track.AddAudio("1sec.wav");

                Assert.AreEqual(1, assistant.ExecutionCount);
            }
        }
예제 #2
0
        public void AddClipIgnoresUnrequiredAssistant()
        {
            using (ITimeline timeline = new DefaultTimeline())
            {
                var assistant = new MockMediaFileAssistant(false);
                timeline.InstallAssistant(assistant);

                Assert.AreEqual(0, assistant.ExecutionCount);

                ITrack track = timeline.AddAudioGroup().AddTrack();
                track.AddAudio("1sec.wav");

                Assert.AreEqual(0, assistant.ExecutionCount);
            }
        }
예제 #3
0
        public void AddClipIgnoresUnrequiredAssistant()
        {
            using (ITimeline timeline = new DefaultTimeline())
            {
                MockMediaFileAssistant assistant = new MockMediaFileAssistant(false);
                timeline.InstallAssistant(assistant);

                Assert.AreEqual(0, assistant.ExecutionCount);

                ITrack track = timeline.AddAudioGroup().AddTrack();
                track.AddAudio("1sec.wav");

                Assert.AreEqual(0, assistant.ExecutionCount);
            }
        }