Beispiel #1
0
        public void DataSelectorTest3()
        {
            MobileLab4 mobile   = new MobileLab4();
            Message    message1 = new Message("Petya", DateTime.Now);
            Message    message2 = new Message("Masha", DateTime.Now);

            mobile.Storage.Add(message1);
            mobile.Storage.Add(message2);

            List <Message> current = MessageBoxLab4.DataSelector(
                mobile, "Masha", new DateTime(2018, 1, 1), new DateTime(2018, 1, 2), "text", "OR").ToList();

            Assert.IsTrue(mobile.Storage.Messages.ToString().Equals(current.ToString()));
        }
Beispiel #2
0
        public void DataSelectorTest2()
        {
            MobileLab4 mobile   = new MobileLab4();
            Message    message1 = new Message("Petya", DateTime.Now);
            Message    message2 = new Message("Masha", DateTime.Now);

            mobile.Storage.Add(message1);
            mobile.Storage.Add(message2);

            List <Message> current = MessageBoxLab4.DataSelector(
                mobile, "Masha", new DateTime(2018, 1, 1), new DateTime(2018, 1, 2), "text", "AND").ToList();

            Assert.IsTrue(current.Count == 0);
        }