package com.geth1b.coding.skills.lc;

import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;

/**
 * @author geth1b
 */
public class _213_HouseRobberII_Test {
  private _213_HouseRobberII solution;
  
  @Before public void setUp() {
    solution = new _213_HouseRobberII();
  }
  
  @Test public void rob() {
    assertEquals(5, solution.rob(new int[]{1,5,3}));
    assertEquals(5, solution.rob(new int[]{2,5,4}));
    assertEquals(14, solution.rob(new int[]{1,3,5,7,9}));
  }
  
  @Test public void robLengthEqualToOrLessThanTwo() {
    assertEquals(3, solution.rob(new int[]{1,3}));
    assertEquals(4, solution.rob(new int[]{4,2}));
    assertEquals(1, solution.rob(new int[]{1}));
  }
  
  @Test public void robNullEmpty() {
//    assertEquals(0, solution.rob(null));
    assertEquals(0, solution.rob(new int[]{}));
  }  

}
