public FilterStreamQueryBuilder FilterByLocations(Box box)
 {
     if (box == null) throw new ArgumentNullException("box");
     var locations = new Locations(new[] {box});
     _filterQuery.Locations = _filterQuery.Locations?.Concat(locations) ?? locations;
     return this;
 }
        public void FilterByLocationsBox_AnonymousData_CorrectQuery(Box box)
        {
            var query = new Query(new HttpUtils());
            var sut = new FilterStreamQueryBuilder(query);

            sut.FilterByLocations(box);

            query.Locations.ShouldBeEquivalentTo(new Locations(new[] { box }));
        }
        public void FilterByLocationsBox_AnonymousDataNotEmptyQuery_CorrectQuery(Box box,
            [Frozen(Matching.ImplementedInterfaces)]Query query,
            FilterStreamQueryBuilder sut)
        {
            var oldValue = query.Locations;

            sut.FilterByLocations(box);

            query.Locations.ShouldBeEquivalentTo(oldValue.Concat(new Locations(new[] { box })));
        }
Пример #4
0
 public void ToString_AnonymousData_CorrectString(Box sut)
 {
     sut.ToString().Should().Be(sut.BottomLeftPoint + "," + sut.TopRightPoint);
 }