123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using CZFW.Core.Security;
- using CZFW.Framework.Interface;
- using CZFW.Framework.Model.Entity;
- using System;
- using System.Collections.Generic;
- using System.Text;
- using Xunit;
- namespace CZKJ.GBRS2.Test
- {
- public class UserTset:TestBase
- {
- CZFW.Framework.Interface.IUserInfo _logic;
- public UserTset()
- {
- _logic = GetService<IUserInfo>();
- }
- void AddEntity()
- {
- UserInfoEntity entity = new UserInfoEntity()
- {
- UserName = "admin",
- Password = DesEncrypt.Encrypt("admin", "MD5"),
- Name = "崔",
- State = 1,
- Mobile = "10086",
- IsSysAdmin = true,
- Error = 0,
- LockTime = 0,
- StartTime = null
- };
- var res= _logic.EditEntity(entity);
- Assert.True(res.Success);
- }
- [Fact]
- void GetMd5()
- {
- string token = DesEncrypt.Encrypt("Data Source = 114.55.54.52; user id = root; password = CZKJczkj2017; Initial Catalog = gbrs2", "MD5");
- Assert.True(token != null);
- }
-
- }
- }
|