// Path: mobile/src/main/java/com/fuzz/emptyhusk/InstrumentationAwareActivity.java
// public class InstrumentationAwareActivity extends AppCompatActivity {
// 
//     public MainViewBinding binding;
//     public PickerDelegate pickerDelegate;
// 
//     public ViewGroup inflationFrame;
// 
//     @Override
//     protected void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_main);
// 
//         binding = new MainViewBinding(findViewById(R.id.root));
//         pickerDelegate = new PickerDelegate(binding);
// 
//         setSupportActionBar(binding.toolbar);
// 
//         inflationFrame = (ViewGroup) getLayoutInflater().inflate(R.layout.test_frame, binding.root, false);
//     }
// 
//     public <T extends View> T inflateLayout(@LayoutRes int layoutId, Class<T> clazz) {
//         View inflated = getLayoutInflater().inflate(layoutId, inflationFrame, false);
//         return clazz.cast(inflated);
//     }
// }
// 
// Path: mobile/src/main/java/com/fuzz/emptyhusk/MainViewBinding.java
// public class MainViewBinding {
//     public final Toolbar toolbar;
//     public final ViewPager mainViewPager;
//     public final FloatingActionButton fab;
// 
//     public final NumberPicker spacing;
//     public final NumberPicker width;
//     public final NumberPicker height;
//     public final GridLayout gridLayout;
// 
//     public final CutoutViewIndicator cvi;
//     public final CompoundButton unifiedButton;
//     public final CompoundButton orientationButton;
// 
//     public final ViewGroup root;
// 
//     public MainViewBinding(View root) {
//         this.root = (ViewGroup) root;
// 
//         toolbar = (Toolbar) root.findViewById(R.id.toolbar);
//         mainViewPager = (ViewPager) root.findViewById(R.id.mainViewPager);
//         fab = (FloatingActionButton) root.findViewById(R.id.fab);
// 
//         cvi = (CutoutViewIndicator) root.findViewById(R.id.cutoutViewIndicator);
// 
//         spacing = (NumberPicker) root.findViewById(R.id.spacingPicker);
//         width = (NumberPicker) root.findViewById(R.id.widthPicker);
//         height = (NumberPicker) root.findViewById(R.id.heightPicker);
// 
//         gridLayout = (GridLayout) root.findViewById(R.id.gridLayout);
// 
//         unifiedButton = (CompoundButton) root.findViewById(R.id.unifiedSwitch);
//         orientationButton = (CompoundButton) root.findViewById(R.id.orientationSwitch);
//     }
// }


import java.util.List;
import java.util.concurrent.TimeUnit;
import static com.fuzz.indicator.BetterLayoutAssertions.verifyNoOverlaps;
import static com.fuzz.indicator.Proxies.proxyForXCells;
import static org.junit.Assert.assertEquals;
import android.support.test.InstrumentationRegistry;
import android.support.test.rule.ActivityTestRule;
import com.fuzz.emptyhusk.InstrumentationAwareActivity;
import com.fuzz.emptyhusk.MainViewBinding;
import com.fuzz.indicator.proxy.StateProxy;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Timeout;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.util.ArrayList;
/*
 * Copyright 2016 Philip Cohn-Cort
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.fuzz.indicator;






/**
 * Test to make sure that the {@link com.fuzz.indicator.CutoutViewIndicator}
 * doesn't let any of its children overlap. The test runner will instantiate
 * a new instance of this test for every array returned by {@link #data()}.
 *
 * @author Philip Cohn-Cort (Fuzz)
 */
@RunWith(Parameterized.class)
public class OverlapTest {

    protected static int maxCellCount = 30;

    @Parameterized.Parameters(name = "With {0} cells")
    public static Iterable<? extends Number[]> data() {
        List<Integer[]> retVal = new ArrayList<>(maxCellCount);
        for (int i = 0; i < maxCellCount; i++) {
            retVal.add(new Integer[]{i});
        }
        return retVal;
    }

    @Rule
// Path: mobile/src/main/java/com/fuzz/emptyhusk/InstrumentationAwareActivity.java
// public class InstrumentationAwareActivity extends AppCompatActivity {
// 
//     public MainViewBinding binding;
//     public PickerDelegate pickerDelegate;
// 
//     public ViewGroup inflationFrame;
// 
//     @Override
//     protected void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_main);
// 
//         binding = new MainViewBinding(findViewById(R.id.root));
//         pickerDelegate = new PickerDelegate(binding);
// 
//         setSupportActionBar(binding.toolbar);
// 
//         inflationFrame = (ViewGroup) getLayoutInflater().inflate(R.layout.test_frame, binding.root, false);
//     }
// 
//     public <T extends View> T inflateLayout(@LayoutRes int layoutId, Class<T> clazz) {
//         View inflated = getLayoutInflater().inflate(layoutId, inflationFrame, false);
//         return clazz.cast(inflated);
//     }
// }
// 
// Path: mobile/src/main/java/com/fuzz/emptyhusk/MainViewBinding.java
// public class MainViewBinding {
//     public final Toolbar toolbar;
//     public final ViewPager mainViewPager;
//     public final FloatingActionButton fab;
// 
//     public final NumberPicker spacing;
//     public final NumberPicker width;
//     public final NumberPicker height;
//     public final GridLayout gridLayout;
// 
//     public final CutoutViewIndicator cvi;
//     public final CompoundButton unifiedButton;
//     public final CompoundButton orientationButton;
// 
//     public final ViewGroup root;
// 
//     public MainViewBinding(View root) {
//         this.root = (ViewGroup) root;
// 
//         toolbar = (Toolbar) root.findViewById(R.id.toolbar);
//         mainViewPager = (ViewPager) root.findViewById(R.id.mainViewPager);
//         fab = (FloatingActionButton) root.findViewById(R.id.fab);
// 
//         cvi = (CutoutViewIndicator) root.findViewById(R.id.cutoutViewIndicator);
// 
//         spacing = (NumberPicker) root.findViewById(R.id.spacingPicker);
//         width = (NumberPicker) root.findViewById(R.id.widthPicker);
//         height = (NumberPicker) root.findViewById(R.id.heightPicker);
// 
//         gridLayout = (GridLayout) root.findViewById(R.id.gridLayout);
// 
//         unifiedButton = (CompoundButton) root.findViewById(R.id.unifiedSwitch);
//         orientationButton = (CompoundButton) root.findViewById(R.id.orientationSwitch);
//     }
// }


// Path: mobile/src/androidTest/java/com/fuzz/indicator/OverlapTest.java
import java.util.List;
import java.util.concurrent.TimeUnit;
import static com.fuzz.indicator.BetterLayoutAssertions.verifyNoOverlaps;
import static com.fuzz.indicator.Proxies.proxyForXCells;
import static org.junit.Assert.assertEquals;
import android.support.test.InstrumentationRegistry;
import android.support.test.rule.ActivityTestRule;
import com.fuzz.emptyhusk.InstrumentationAwareActivity;
import com.fuzz.emptyhusk.MainViewBinding;
import com.fuzz.indicator.proxy.StateProxy;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Timeout;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.util.ArrayList;

/*
 * Copyright 2016 Philip Cohn-Cort
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.fuzz.indicator;






/**
 * Test to make sure that the {@link com.fuzz.indicator.CutoutViewIndicator}
 * doesn't let any of its children overlap. The test runner will instantiate
 * a new instance of this test for every array returned by {@link #data()}.
 *
 * @author Philip Cohn-Cort (Fuzz)
 */
@RunWith(Parameterized.class)
public class OverlapTest {

    protected static int maxCellCount = 30;

    @Parameterized.Parameters(name = "With {0} cells")
    public static Iterable<? extends Number[]> data() {
        List<Integer[]> retVal = new ArrayList<>(maxCellCount);
        for (int i = 0; i < maxCellCount; i++) {
            retVal.add(new Integer[]{i});
        }
        return retVal;
    }

    @Rule
    public ActivityTestRule<InstrumentationAwareActivity> actRule