Exemplo n.º 1
0
        public void AssertThat_NumRef_FindsNothing_WhenNumberIsTooHigh()
        {
            NumRef i = new NumRef(13, RefFilter.All, false, false);

            var matches = i.Match(_floors, null);

            Assert.AreEqual(0, matches.Count());
        }
Exemplo n.º 2
0
        public void AssertThat_NumRef_FindsBasement()
        {
            NumRef i = new NumRef(-2, RefFilter.All, false, false);

            var matches = i.Match(_floors, null);

            Assert.AreEqual(1, matches.Count());
            Assert.AreEqual(_floors[14], matches.Single());
        }
Exemplo n.º 3
0
        public void AssertThat_NumRef_FindsSpecifiedNumber()
        {
            NumRef i = new NumRef(10, RefFilter.All, false, false);

            var matches = i.Match(_floors, null);

            Assert.AreEqual(1, matches.Count());
            Assert.AreEqual(_floors[2], matches.Single());  //NumRef 10 == Floor 2 because we're counting *up* from the ground floor
        }