Ejemplo n.º 1
0
        private Artist PrepareArtist()
        {
            Artist artist = new Artist()
            {
                Name    = StringGeneratorUtil.GenerateRandomString(),
                Country = StringGeneratorUtil.GenerateRandomString()
            };

            return(artist);
        }
Ejemplo n.º 2
0
        private Product PrepareProduct()
        {
            var     artists = _artistRepository.Artists.ToList();
            var     artist  = artists.ElementAt(RandomNumberUtil.GenerateFromRange(0, artists.Count()));
            Product product = new Product()
            {
                Title            = StringGeneratorUtil.GenerateRandomString(),
                Genre            = StringGeneratorUtil.GenerateRandomString(),
                Price            = 10,
                AlbumDescription = StringGeneratorUtil.GenerateRandomString(),
                ArtistId         = artist.Id,
                AlbumDating      = DateTime.Now
            };

            return(product);
        }
Ejemplo n.º 3
0
        private Order PrepareOrder()
        {
            _shoppingCart.ClearCart();
            var products = _productRepository.Products.ToList();
            var product  = products.ElementAt(RandomNumberUtil.GenerateFromRange(0, products.Count()));

            _shoppingCart.AddToCart(product, 1);
            _shoppingCart.ShoppingCartItems = _shoppingCart.GetShoppingCartItems();
            Order order = new Order()
            {
                FirstName   = StringGeneratorUtil.GenerateRandomString(),
                LastName    = StringGeneratorUtil.GenerateRandomString(),
                AdressLine1 = StringGeneratorUtil.GenerateRandomString(),
                ZipCode     = "12345",
                City        = StringGeneratorUtil.GenerateRandomString(),
                Country     = StringGeneratorUtil.GenerateRandomString(),
                PhoneNumber = "123456789",
                Email       = "*****@*****.**"
            };

            return(order);
        }