Esempio n. 1
0
        public void OnHorizontalLineFormationClick()
        {
            if (itemToShow != null)
            {
                List <ObjectInfo> objectsInformation = FormationUtility.GetHorizontalLineFormationObjectsInformation(containerWidth, containerHeight, itemCount);

                RenderObjects(objectsInformation);
            }
        }
Esempio n. 2
0
        public void HorizontalLineFormationOverlappingTest()
        {
            int containerWidth  = 300;
            int containerHeight = 100;
            int itemCount       = 10;

            List <ObjectInfo> objectsInfoList = FormationUtility.GetHorizontalLineFormationObjectsInformation(containerWidth, containerHeight, itemCount);

            TestHelper.OverLappingTest(objectsInfoList);
        }
Esempio n. 3
0
        public void HundredItemContainingTest()
        {
            int containerWidth  = 100;
            int containerHeight = 100;
            int itemCount       = 1;

            Rect containerBounds = new Rect(0, 0, containerWidth, containerHeight);

            List <ObjectInfo> objectsInfoList = FormationUtility.GetHorizontalLineFormationObjectsInformation(containerWidth, containerHeight, itemCount);

            TestHelper.CheckIfAllObjectsInsideContainer(containerBounds, objectsInfoList);
        }
Esempio n. 4
0
        public void HorizontalLineFormationTest()
        {
            int containerWidth  = 300;
            int containerHeight = 100;
            int itemCount       = 10;

            List <ObjectInfo> objectsInfoList = FormationUtility.GetHorizontalLineFormationObjectsInformation(containerWidth, containerHeight, itemCount);

            Assert.AreEqual(objectsInfoList.Count, itemCount);

            foreach (ObjectInfo objectInfo in objectsInfoList)
            {
                Assert.AreEqual(-35, objectInfo.Position.y);
            }
        }