コード例 #1
0
        public void NormativesClassTest()
        {
            var t = new Normatives();

            Assert.AreEqual(24, t.Count);
            Assert.AreEqual(24, t.GetAllNormatives().Count);

            var set = new NewVipAvtoSet();
            set.LoadData();
            set.AddGroup(2007, "M1", 0, true);
            set.AddNormative(set.Groups[0].IdGroup, 0, 30);

            Assert.AreEqual(0, set.GetNormativeTag(t[0]));
            if (set.GetNormativesFromGroup(set.Groups[0].Title).Length == 0)
                Assert.Fail();

            Assert.AreEqual(NewVipAvtoSet.GetHash("admin"), set.GetUserPasswors("admin"));
            Assert.AreEqual("", set.GetUserPasswors("lolosha"));

            set.LockOperator(set.Operators[0].IdOperator);
            Assert.IsFalse(set.GroupWithGasEngine(set.Groups[1].Title));
            Assert.IsTrue(set.GroupWithGasEngine(set.Groups[2].Title));
        }