Ejemplo n.º 1
0
        public void Should_Get_Artifacts_When_results_exist()
        {
            _communityDao.CountCommunities(Arg.Any <CommunityCriteria>()).ReturnsForAnyArgs(50);
            _communityDao.GetCommunities(Arg.Any <CommunityCriteria>())
            .ReturnsForAnyArgs(_fixture.CreateMany <Community>(50));

            var criteria = new CommunityCriteriaModel
            {
                Page     = 1,
                PageSize = 20
            };

            var results = _communityRepo.GetCommunities(criteria).Result;

            results.Results.Should().NotBeEmpty();
            results.Results.Count().Should().Be(20);
        }
Ejemplo n.º 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            PositionRepository repo2 = new PositionRepository();

            repo = new CommunityRepository();
            Location locTest = new Location();

            locTest.x  = 1.635;
            locTest.y  = 0;
            locTest.W1 = 27;
            locTest.W2 = 14;
            locTest.W3 = 7;
            repo2.CalculatePosition(locTest);
            communities = repo.GetCommunities();
            foreach (var community in communities)
            {
                CommunityCmbx.DataSource    = new BindingSource(communities, null);
                CommunityCmbx.DisplayMember = "Name";
                CommunityCmbx.ValueMember   = "ID";
                //CommunityCmbx.Items.Add(community.Name);
            }
        }