package com.lenox.beyond.launch;


import org.junit.Assert;
import org.junit.Test;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class ApplicationOptionsTest {

    @Test
    public void showSorting(){

        List<ApplicationOptions> list = new ArrayList<>();

        ApplicationOptions options1 = new ApplicationOptions();
        options1.setContextPath("options1");
        options1.setSystemGateway(false);

        ApplicationOptions options2 = new ApplicationOptions();
        options2.setContextPath("options2");
        options2.setSystemGateway(false);

        ApplicationOptions options3 = new ApplicationOptions();
        options3.setContextPath("options3");
        options3.setSystemGateway(true);

        list.add(options1);
        list.add(options3);
        list.add(options2);

        Collections.sort(list);

        Assert.assertTrue(options3.equals(list.get(0)));
    }
}
