예제 #1
0
        public void OnRandomFormationClick()
        {
            if (itemToShow != null)
            {
                List <ObjectInfo> objectInformation = FormationUtility.GetRandomFormationObjectsInformation(containerWidth, containerHeight, itemCount);

                RenderObjects(objectInformation);
            }
        }
예제 #2
0
        public void HundredItemsOverlappingTest()
        {
            int containerWidth  = 100;
            int containerHeight = 100;
            int itemCount       = 100;

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

            TestHelper.OverLappingTest(objectsInfoList);
        }
예제 #3
0
        public void HundredItemsTest()
        {
            int containerWidth  = 100;
            int containerHeight = 100;
            int itemCount       = 100;

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

            Assert.AreEqual(objectsInfoList.Count, itemCount);
        }
예제 #4
0
        public void TenItemsContainingTest()
        {
            int containerWidth  = 100;
            int containerHeight = 100;
            int itemCount       = 10;

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

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

            TestHelper.CheckIfAllObjectsInsideContainer(containerBounds, objectsInfoList);
        }