Exemplo n.º 1
0
        public void CanCreatePreCombinations()
        {
            IOutfitEngineService oes = OutfitEngineProcessorTest.CreateOutfitEngineService();

            oes.CreateOutfits(154);
            oes.CreateOutfits(154);
        }
Exemplo n.º 2
0
        public void CanCreateBigClosetCombination(string values, int flavor1, int flavor2)
        {
            IClosetRepository        cr  = new ClosetRepository();
            IFashionFlavorRepository fr  = new FashionFlavorRepository();
            IBasicUserRepository     bur = new BasicUserRepository();

            IOutfitEngineService service = CreateOutfitEngineService();

            IList <int> lst = new List <int>();

            foreach (string val in values.Split(','))
            {
                lst.Add(Convert.ToInt32(val));
            }

            cr.DbContext.BeginTransaction();
            Closet c = cr.Get(2);

            foreach (int i in lst)
            {
                c.AddGarment(new MasterGarment(i));
            }
            cr.SaveOrUpdate(c);

            IList <UserFlavor> lstFlavors = new List <UserFlavor>();

            lstFlavors.Add(new UserFlavor(fr.Get(flavor1), 1));
            if (flavor2 != 0)
            {
                lstFlavors.Add(new UserFlavor(fr.Get(flavor2), 1));
            }

            c.User.SetFlavors(lstFlavors);

            bur.SaveOrUpdate(c.User);
            cr.DbContext.CommitTransaction();

            service.CreateOutfits(2);

            c = cr.Get(2);
            Assert.IsTrue(c.Outfits.Count > 0);
        }
Exemplo n.º 3
0
        public void CanCombine()
        {
            IOutfitEngineService service = CreateOutfitEngineService();

            service.CreateOutfits(1);
        }