public void OnRandomFormationClick() { if (itemToShow != null) { List <ObjectInfo> objectInformation = FormationUtility.GetRandomFormationObjectsInformation(containerWidth, containerHeight, itemCount); RenderObjects(objectInformation); } }
public void HundredItemsOverlappingTest() { int containerWidth = 100; int containerHeight = 100; int itemCount = 100; List <ObjectInfo> objectsInfoList = FormationUtility.GetRandomFormationObjectsInformation(containerWidth, containerHeight, itemCount); TestHelper.OverLappingTest(objectsInfoList); }
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); }
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); }