Exemple #1
0
        public async Task TestForValidAddContent()
        {
            //Arrange
            List <Content> contentlist = new List <Content>();
            Content        contentOne  = new Content()
            {
                Id = random.Next(15, 10000), Image = "rose.png", Video = "Rose"
            };
            Content contentTwo = new Content()
            {
                Id = random.Next(15, 10000), Image = "Jasmine.png", Video = "Jasmine"
            };

            contentlist.Add(contentOne);
            contentlist.Add(contentTwo);
            User user = new User {
                Id = 11, FirstName = "John", LastName = "HS", UserName = "******", Email = "*****@*****.**", Password = "******", ProfilePicture = "https://unsplash.com/photos/p7mo8-CG5Gs"
            };

            //Action
            var isAdded = await _services.AddContent(contentlist, user.Id);

            //Assert
            Assert.True(isAdded);
        }