Exemplo n.º 1
0
        public async Task AddTest()
        {
            Users users = new Users()
            {
                deviceid         = "deneme_cihaz",
                isbanned         = false,
                lastactivitydate = DateTime.Now,
                location         = new Location()
                {
                    city = "Elazig", country = "Turkey", lat = "23.021", lon = "31.12"
                },
                phone        = "+905318121351",
                registerdate = DateTime.Now.AddDays(31)
            };
            Users result = await _firedal.CreateAsync(users, users.id);

            if (result == null)
            {
                throw new Exception("Ekleme işlemi hatalı");
            }
        }
Exemplo n.º 2
0
        public async Task CreateTest()
        {
            Post post = new Post();
            Guid id   = Guid.NewGuid();

            post.content = new Content()
            {
                dislike  = 20,
                hashtag  = "#GündemÖzel",
                like     = 30,
                location = new Location()
                {
                    city    = "Konya",
                    country = "Turkey",
                    lat     = "34.12",
                    lon     = "12.31"
                },
                text = "Bimde mükemmel bi indirim var akıllara ziyan !",
                time = DateTime.Now.AddDays(21)
            };
            post.comments = new List <Comment>();
            post.comments.Add(new Comment()
            {
                text   = "Yav he he !",
                time   = DateTime.Now.AddDays(20),
                userid = Guid.NewGuid()
            });
            post.userid = Guid.NewGuid();
            post.id     = id;
            var result = await _repo.CreateAsync(post, id);

            if (result == null)
            {
                Assert.Fail("Ekleme işleminde hata oluştu");
            }
        }
Exemplo n.º 3
0
 public override async Task <Post> Create(Post model, Guid guid)
 {
     return(await _repo.CreateAsync(model, guid));
 }
Exemplo n.º 4
0
 public override async Task <Users> Create(Users model, Guid guid)
 {
     return(await _firedal.CreateAsync(model, guid));
 }