Example #1
0
        public void AnimationRepository()
        {
            string json = null;

            animationRepository = new JsonAnimationRepository("path",
                                                              (generatedJson, fileName) => json = generatedJson,
                                                              fileName => json,
                                                              () => new[] { "path" });

            AnimationStripSettings settings       = new AnimationStripSettings(10, 10, 0, 0, "test", 20d, true, null, 1, 10);
            AnimationStripSettings loadedSettings = default(AnimationStripSettings);

            animationRepository.ExecuteAsync(rep => rep.Save(settings))
            .Then(() =>
                  animationRepository.LoadAll())
            .Then(jsonSettings =>
                  loadedSettings = jsonSettings.First());

            Assert.AreEqual(settings.Name, loadedSettings.Name);
        }
 public AnimationService(IAnimationRepository animationRepository)
 {
     _animationRepository = animationRepository;
 }
 public PlaylistsController()
 {
     playlistService = new PlaylistRepository();
     animationService = new AnimationRepository();
     slideService = new SlideRepository();
 }