Exemple #1
0
        public void ItemRangeConstructor()
        {
            tlog.Debug(tag, $"ItemRangeConstructor START");

            var testingTarget = new ItemRange(0, 300);

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <ItemRange>(testingTarget, "Should be an Instance of ItemRange!");

            testingTarget.Dispose();

            tlog.Debug(tag, $"ItemRangeConstructor END (OK)");
        }
Exemple #2
0
        public void ItemRangeConstructorWithItemRange()
        {
            tlog.Debug(tag, $"ItemRangeConstructorWithItemRange START");

            using (ItemRange copy = new ItemRange(0, 300))
            {
                var testingTarget = new ItemRange(copy);
                Assert.IsNotNull(testingTarget, "Should be not null!");
                Assert.IsInstanceOf <ItemRange>(testingTarget, "Should be an Instance of ItemRange!");

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"ItemRangeConstructorWithItemRange END (OK)");
        }
Exemple #3
0
        public void ItemRangeWithin()
        {
            tlog.Debug(tag, $"ItemRangeWithin START");

            var testingTarget = new ItemRange(0, 300);

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <ItemRange>(testingTarget, "Should be an Instance of ItemRange!");

            var result = testingTarget.Within(50);

            Assert.IsTrue(result);

            testingTarget.Dispose();
            tlog.Debug(tag, $"ItemRangeWithin END (OK)");
        }
Exemple #4
0
        public void ItemRangeEnd()
        {
            tlog.Debug(tag, $"ItemRangeEnd START");

            var testingTarget = new ItemRange(0, 300);

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <ItemRange>(testingTarget, "Should be an Instance of ItemRange!");

            Assert.AreEqual(300, testingTarget.end, "Should be equal!");
            testingTarget.end = 500;
            Assert.AreEqual(500, testingTarget.end, "Should be equal!");

            testingTarget.Dispose();

            tlog.Debug(tag, $"ItemRangeEnd END (OK)");
        }
Exemple #5
0
        public void ItemRangeBegin()
        {
            tlog.Debug(tag, $"ItemRangeBegin START");

            var testingTarget = new ItemRange(0, 300);

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <ItemRange>(testingTarget, "Should be an Instance of ItemRange!");

            Assert.AreEqual(0, testingTarget.begin, "Should be equal!");
            testingTarget.begin = 100;
            Assert.AreEqual(100, testingTarget.begin, "Should be equal!");

            testingTarget.Dispose();

            tlog.Debug(tag, $"ItemRangeBegin END (OK)");
        }
Exemple #6
0
        public void ItemRangeIntersection()
        {
            tlog.Debug(tag, $"ItemRangeIntersection START");

            var testingTarget = new ItemRange(0, 300);

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <ItemRange>(testingTarget, "Should be an Instance of ItemRange!");

            using (ItemRange second = new ItemRange(300, 500))
            {
                var result = testingTarget.Intersection(second);
                Assert.IsNotNull(result, "Should be not null!");
                Assert.IsInstanceOf <ItemRange>(result, "Should be an Instance of ItemRange!");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"ItemRangeIntersection END (OK)");
        }