Exemple #1
0
        public void GetDataPins_Entries_Ok()
        {
            MsQuiresPart part = GetPart(3);

            List <DataPin> pins = part.GetDataPins(null).ToList();

            Assert.Equal(5, pins.Count);
            TestHelper.AssertValidDataPinNames(pins);

            DataPin pin = pins.Find(p => p.Name == "tot-count");

            Assert.NotNull(pin);
            TestHelper.AssertPinIds(part, pin);
            Assert.Equal("3", pin.Value);

            pin = pins.Find(p => p.Name == "sheet-count");
            Assert.NotNull(pin);
            TestHelper.AssertPinIds(part, pin);
            Assert.Equal("4", pin.Value);

            // t1 t2 t3
            for (int n = 1; n <= 3; n++)
            {
                pin = pins.Find(p => p.Name == "type" && p.Value == "t" + n);
                Assert.NotNull(pin);
                TestHelper.AssertPinIds(part, pin);
            }
        }
Exemple #2
0
        public void GetDataPins_NoEntries_Ok()
        {
            MsQuiresPart part = GetPart(0);

            List <DataPin> pins = part.GetDataPins(null).ToList();

            TestHelper.AssertValidDataPinNames(pins);

            Assert.Single(pins);
            DataPin pin = pins[0];

            Assert.Equal("tot-count", pin.Name);
            TestHelper.AssertPinIds(part, pin);
            Assert.Equal("0", pin.Value);
        }