public void TestInsert()
        {
            PrEntity         prEntity         = new PrEntity(3, "http://test");
            RepositoryEntity repositoryEntity = new RepositoryEntity("test", "test", new[] { prEntity });
            UserEntity       userEntity       = new UserEntity(_testGuid, new List <RepositoryEntity> {
                repositoryEntity
            });

            var insertedEntity = _context.InsertOrMergeEntityAsync(userEntity).Result;
        }
        public void TestInsert()
        {
            PrEntity         prEntity         = new PrEntity(Constants.PR_ID, Constants.URL);
            RepositoryEntity repositoryEntity = new RepositoryEntity(Constants.TEST_OWNER, Constants.TEST_REPO_NAME, new List <PrEntity> {
                prEntity
            });
            UserEntity userEntity = new UserEntity(Constants.USERNAME, new List <RepositoryEntity> {
                repositoryEntity
            });

            var insertedEntity = _context.InsertOrMergeEntityAsync(userEntity).Result;
        }
Exemple #3
0
        public void Setup()
        {
            _username = "******";
            _prEntity = new PrEntity(3, "http://test");
            RepositoryEntity repository = new RepositoryEntity("test", "test", new List <PrEntity> {
                _prEntity
            });

            _userEntity = new UserEntity(_username, new List <RepositoryEntity> {
                repository
            });

            _user = (User)_userEntity;

            _tableContext = new Mock <ITableContext>(MockBehavior.Strict);
            _sut          = new UserRepository(_tableContext.Object);
        }