package the.framework.game.accept.blog.admin;

import static java.util.Arrays.asList;
import static junit.framework.Assert.assertTrue;

import java.io.IOException;
import java.util.List;

import org.junit.Test;

import the.framework.game.accept.blog.admin.AdminPages;

public class TestAdminPage {

	// TODO: canLogoutFromAdminPage

	@Test
	public void hasLinksToListPages() throws IOException {
		try (AdminPages admin = new AdminPages()) {			
			assertTrue(admin.isAtAdminHome());
			List<String> pages = asList("Categories", "Comments", "Posts", "Users");
			for (String pageName : pages) {
				assertTrue(admin.hasListPageFor(pageName));
			}
		}
	}
	
	@Test
	public void adminRequiresLogin() throws IOException {
		try (AdminPages admin = new AdminPages(false)) {
			assertTrue(admin.isAtLogin());
		}
	}

}

@@ -367,35 +367,16 @@
 tPages()
- throws IOException
  %7B%0A%09%09try
@@ -674,27 +674,8 @@
 in()
- throws IOException
  %7B%0A%09

remove now unnecessary exceptions