Example #1
0
        public async Task AddAsyncShouldAddCorrectly()
        {
            var newGuidId = Guid.NewGuid().ToString();

            await this.CreatePartnerAsync(newGuidId);

            var name            = new NLipsum.Core.Sentence().ToString();
            var categoryId      = 1;
            var cityId          = 1;
            var DriverName      = new NLipsum.Core.Sentence().ToString();
            var DriverContact   = new NLipsum.Core.Word().ToString();
            var imageUrl        = new NLipsum.Core.Word().ToString();
            var docPaseUrl      = new NLipsum.Core.Word().ToString();
            var docCedulaUrl    = new NLipsum.Core.Word().ToString();
            var docTarjetonUrl  = new NLipsum.Core.Word().ToString();
            var docSoatUrl      = new NLipsum.Core.Word().ToString();
            var docLicenciaUrl  = new NLipsum.Core.Word().ToString();
            var docOperacionUrl = new NLipsum.Core.Word().ToString();
            var docSeguroUrl    = new NLipsum.Core.Word().ToString();
            var docTecnoUrl     = new NLipsum.Core.Word().ToString();
            var ownerId         = Guid.NewGuid().ToString();

            await this.Service.AddAsync(name, categoryId, cityId, DriverName, DriverContact, imageUrl, docPaseUrl, docCedulaUrl, docTarjetonUrl, docSoatUrl, docLicenciaUrl, docOperacionUrl, docSeguroUrl, docTecnoUrl, ownerId);

            var PartnersCount = await this.DbContext.Partners.CountAsync();

            Assert.Equal(2, PartnersCount);
        }
        public async Task AddAsyncShouldAddCorrectly()
        {
            await this.CreateCityAsync();

            var name = new NLipsum.Core.Word().ToString();

            await this.Service.AddAsync(name);

            var citiesCount = await this.DbContext.Cities.CountAsync();

            Assert.Equal(2, citiesCount);
        }
        public async Task AddAsyncShouldAddCorrectly()
        {
            await this.CreateCategoryAsync();

            var name        = new NLipsum.Core.Sentence().ToString();
            var description = new NLipsum.Core.Paragraph().ToString();
            var imageUrl    = new NLipsum.Core.Word().ToString();

            await this.Service.AddAsync(name, description, imageUrl);

            var categoriesCount = await this.DbContext.Categories.CountAsync();

            Assert.Equal(2, categoriesCount);
        }
        public async Task AddAsyncShouldAddCorrectly()
        {
            await this.CreateBlogPostAsync();

            var title    = new NLipsum.Core.Sentence().ToString();
            var content  = new NLipsum.Core.Paragraph().ToString();
            var author   = new NLipsum.Core.Word().ToString();
            var imageUrl = new NLipsum.Core.Word().ToString();

            await this.Service.AddAsync(title, content, author, imageUrl);

            var blogPostsCount = await this.DbContext.BlogPosts.CountAsync();

            Assert.Equal(2, blogPostsCount);
        }
Example #5
0
        public async Task AddAsyncShouldAddCorrectly()
        {
            var newGuidId = Guid.NewGuid().ToString();

            await this.CreateSalonAsync(newGuidId);

            var name       = new NLipsum.Core.Sentence().ToString();
            var categoryId = 1;
            var cityId     = 1;
            var address    = new NLipsum.Core.Sentence().ToString();
            var imageUrl   = new NLipsum.Core.Word().ToString();

            await this.Service.AddAsync(name, categoryId, cityId, address, imageUrl);

            var salonsCount = await this.DbContext.Salons.CountAsync();

            Assert.Equal(2, salonsCount);
        }