Exemplo n.º 1
0
        public void DeleteAdmin_Return_True_If_Success()
        {
            var   admin  = InitFakeEntity.GetFakeAdmin();
            Admin admin2 = UsingDbContext(ctx => ctx.Admin.Add(admin));

            _iAdminAppSerice.DeleteAdmin(admin2.UserId);
            var temp = UsingDbContext(ctx => ctx.Admin.FirstOrDefault(x => x.UserId == admin2.UserId));

            temp.IsDelete.ShouldBe(true);
            Assert.True(temp.Id > 0);
        }