Exemplo n.º 1
0
        public void GroupTest()
        {
            var set = new NewVipAvtoSet();

            if (!set.GroupExist(2006, "M1", 1, true))
                set.AddGroup(2006, "M1", 1, true);

            if (set.GroupExist(2006, "M1", 1, true))
                set.AddGroup(2024, "M1", 1, true);

            Assert.AreEqual(2, set.Groups.Count);

            string title = set.GetGroupTitle(set.Groups[0].IdGroup);

            Assert.AreEqual("M1 До 2006 Дизельный", title);

            int id = set.Groups[0].IdGroup;
            Assert.AreEqual(id, set.GetGroupId(title));
        }