예제 #1
0
        private static IVideoColorService IVideoColorService()
        {
            var service = new VideoColorService();

            IoC.Resolve <IServiceBus>().Register <IVideoColorService>(service);
            return(service);
        }
예제 #2
0
        public void NoCollisionTest()
        {
            var v1 = new Video {
                ProjectId = 1, VideoId = 1
            };
            var v2 = new Video {
                ProjectId = 1, VideoId = 2
            };

            var persistanceService = new ColorsPersistanceService
            {
                VideoColors = new Dictionary <Tuple <int, int>, string>
                {
                    { Tuple.Create(1, 1), "#8000B0F0" }
                }
            };
            var colorsService = new VideoColorService(persistanceService);

            var b1 = colorsService.GetColor(v1);
            var b2 = colorsService.GetColor(v2);

            Assert.AreNotEqual(((SolidColorBrush)b1).Color, ((SolidColorBrush)b2).Color);
        }