示例#1
0
        public void SetAuthDataTestNull()
        {
            _repo = new RepositoryUserAuth
            {
                AuthData = null
            };

            UserAuthData actual = null;

            foreach (var item in _repo.GetType().GetRuntimeFields())
            {
                if (item.Name.Equals("_authData"))
                {
                    actual = item.GetValue(_repo) as Lazy <UserAuthData>;
                    break;
                }
            }

            Assert.IsNull(actual);
        }
示例#2
0
        public void SetAuthDataTest()
        {
            var model = new UserAuthData(new DataModelAuth("111", "email", "*****@*****.**", "*****@*****.**", null, "2017-11-14T09:30:26.893Z", "image",
                                                           null, "2017-11-17T08:43:17.669Z", "Jon", "Snow", null, "EN", false, 1510651826, 1510908197, 0, null));

            _repo = new RepositoryUserAuth
            {
                AuthData = model
            };

            UserAuthData actual = null;

            foreach (var item in _repo.GetType().GetRuntimeFields())
            {
                if (item.Name.Equals("_authData"))
                {
                    actual = item.GetValue(_repo) as Lazy <UserAuthData>;
                    break;
                }
            }

            Assert.AreEqual(model, actual);
        }