Ejemplo n.º 1
0
        public void AllInHr_Conf()
        {
            var hrs = o
                      .Scope(SearchScope.HealthRecord)
                      .All()
                      .AddChild(x => x
                                .WithConf()
                                .SetAll(w[22])
                                .SetNot(w[1].AsConfidencable(Confidence.Absent)))
                      .Search(session);

            // нет 22
            Assert.AreEqual(5, hrs.Count());
            Assert.IsTrue(hrs.IsSuperSetOf(
                              hr[40],
                              hr[70],
                              hr[72],
                              hr[73],
                              hr[74]));
        }
Ejemplo n.º 2
0
        public void AllInHr_AllAnySame_Case1()
        {
            // к записи подходит: 22 и (22 или 1) = 22
            var hrs = o
                      .Scope(SearchScope.HealthRecord)
                      .All()
                      .SetAll(w[22])
                      .SetAny(w[22], w[1])
                      .Search(session);

            Assert.AreEqual(6, hrs.Count());
            Assert.IsTrue(hrs.Contains(hr[22]));
            Assert.IsTrue(hrs.Contains(hr[70]));
            Assert.IsTrue(hrs.Contains(hr[72]));
            Assert.IsTrue(hrs.Contains(hr[73]));
            Assert.IsTrue(hrs.Contains(hr[74]));
            Assert.IsTrue(hrs.Contains(hr[40]));
        }