public void can_getRecentSearchJobs2()
 {
     ISearchItemDto searchAtom = new SearchItem_Like_Dto(Relator.Unary.IS,Track.Property.Interpret, String.Empty);
     IList<ISearchItemDto> searchAtoms = new List<ISearchItemDto>(new ISearchItemDto[] { searchAtom });
     ISearchJobDto searchJob = new SearchJobDto(searchAtoms);
     HttpSessionStateTask.getRecentSearchJobs(context.Session).Add(searchJob);
     Assert.AreEqual(1, HttpSessionStateTask.getRecentSearchJobs(context.Session).Count);
 }
Ejemplo n.º 2
0
 private IList<ISearchJobDto> setupJobs()
 {
     ISearchItemDto dto1 = new SearchItem_Like_Dto(Relator.Unary.IS, Track.Property.Interpret, "a");
     ISearchItemDto dto2 = new SearchItem_Like_Dto(Relator.Unary.IS, Track.Property.Titel, "a");
     ISearchItemDto dto3 = new SearchItem_Between_Dto(Relator.Unary.IS, Track.Property.Year, "1999", "2000");
     ISearchItemDto dto4 = new SearchItem_Between_Dto(Relator.Unary.IS, Track.Property.Bpm, "100", "120");
     ISearchJobDto job1 = new SearchJobDto(new ISearchItemDto[] { dto1, dto3 });
     ISearchJobDto job2 = new SearchJobDto(new ISearchItemDto[] { dto2, dto4 });
     ISearchJobDto job3 = new SearchJobDto(new ISearchItemDto[] { dto1, dto4 });
     ISearchJobDto job4 = new SearchJobDto(new ISearchItemDto[] { dto2, dto3 });
     return new List<ISearchJobDto>(new ISearchJobDto[4] { job1, job2, job3, job4 });
 }
Ejemplo n.º 3
0
        public void can_do()
        {
            ISearchItemDto dto = new SearchItem_Like_Dto(Relator.Unary.IS, Track.Property.Interpret, "a");
            ISearchItemDto dto2 = new SearchItem_Like_Dto(Relator.Unary.IS, Track.Property.Titel, "a");
            ISearchItemDto between = new SearchItem_Between_Dto(Relator.Unary.IS, Track.Property.Year, "1999", "2000");
            ISearchItemDto between2 = new SearchItem_Between_Dto(Relator.Unary.IS, Track.Property.Bpm, "100", "120");
            ISearchJobDto job = new SearchJobDto(new ISearchItemDto[] { dto, dto2, between, between2 });

            SearchJobTask task = new SearchJobTask();
            ARelation aRelation = task.job2Relation(job);

            Assert.AreEqual(4, aRelation.Relata.Count);
        }
Ejemplo n.º 4
0
 private IList<ISearchJobDto> setupJobs()
 {
     ISearchItemDto dto1 = new SearchItem_Like_Dto(Relator.Unary.IS, Track.Property.Interpret, "a");
     ISearchItemDto dto2 = new SearchItem_Like_Dto(Relator.Unary.IS, Track.Property.Titel, "a");
     ISearchJobDto job1 = new SearchJobDto(new ISearchItemDto[] { dto1, dto2 });
     return new List<ISearchJobDto>(new ISearchJobDto[1] { job1 });
 }