@Test
void setAnchorPos() {

	final UIFrame frame = new UIFrame("UIFrameTest_setAnchor");
	
	frame.setAnchorPos(UIAnchorSide.BOTTOM, "min");
	assertEquals("$this", frame.getAnchorRelative(UIAnchorSide.TOP));
	assertEquals("$this", frame.getAnchorRelative(UIAnchorSide.LEFT));
	assertEquals("$this", frame.getAnchorRelative(UIAnchorSide.BOTTOM));
	assertEquals("$this", frame.getAnchorRelative(UIAnchorSide.RIGHT));
	assertEquals("MIN", frame.getAnchorPos(UIAnchorSide.TOP));
	assertEquals("MIN", frame.getAnchorPos(UIAnchorSide.LEFT));
	assertEquals("MIN", frame.getAnchorPos(UIAnchorSide.BOTTOM));
	assertEquals("MAX", frame.getAnchorPos(UIAnchorSide.RIGHT));
	assertEquals("0", frame.getAnchorOffset(UIAnchorSide.TOP));
	assertEquals("0", frame.getAnchorOffset(UIAnchorSide.LEFT));
	assertEquals("0", frame.getAnchorOffset(UIAnchorSide.BOTTOM));
	assertEquals("0", frame.getAnchorOffset(UIAnchorSide.RIGHT));
	
	frame.setAnchorPos(UIAnchorSide.BOTTOM, "max");
	assertEquals("$this", frame.getAnchorRelative(UIAnchorSide.TOP));
	assertEquals("$this", frame.getAnchorRelative(UIAnchorSide.LEFT));
	assertEquals("$this", frame.getAnchorRelative(UIAnchorSide.BOTTOM));
	assertEquals("$this", frame.getAnchorRelative(UIAnchorSide.RIGHT));
	assertEquals("MIN", frame.getAnchorPos(UIAnchorSide.TOP));
	assertEquals("MIN", frame.getAnchorPos(UIAnchorSide.LEFT));
	assertEquals("MAX", frame.getAnchorPos(UIAnchorSide.BOTTOM));
	assertEquals("MAX", frame.getAnchorPos(UIAnchorSide.RIGHT));
	assertEquals("0", frame.getAnchorOffset(UIAnchorSide.TOP));
	assertEquals("0", frame.getAnchorOffset(UIAnchorSide.LEFT));
	assertEquals("0", frame.getAnchorOffset(UIAnchorSide.BOTTOM));
	assertEquals("0", frame.getAnchorOffset(UIAnchorSide.RIGHT));
	
	frame.setAnchorPos(UIAnchorSide.BOTTOM, "mid");
	assertEquals("$this", frame.getAnchorRelative(UIAnchorSide.TOP));
	assertEquals("$this", frame.getAnchorRelative(UIAnchorSide.LEFT));
	assertEquals("$this", frame.getAnchorRelative(UIAnchorSide.BOTTOM));
	assertEquals("$this", frame.getAnchorRelative(UIAnchorSide.RIGHT));
	assertEquals("MIN", frame.getAnchorPos(UIAnchorSide.TOP));
	assertEquals("MIN", frame.getAnchorPos(UIAnchorSide.LEFT));
	assertEquals("mid", frame.getAnchorPos(UIAnchorSide.BOTTOM));
	assertEquals("MAX", frame.getAnchorPos(UIAnchorSide.RIGHT));
	assertEquals("0", frame.getAnchorOffset(UIAnchorSide.TOP));
	assertEquals("0", frame.getAnchorOffset(UIAnchorSide.LEFT));
	assertEquals("0", frame.getAnchorOffset(UIAnchorSide.BOTTOM));
	assertEquals("0", frame.getAnchorOffset(UIAnchorSide.RIGHT));
	
	frame.setAnchorPos(UIAnchorSide.BOTTOM, "0.123");
	assertEquals("$this", frame.getAnchorRelative(UIAnchorSide.TOP));
	assertEquals("$this", frame.getAnchorRelative(UIAnchorSide.LEFT));
	assertEquals("$this", frame.getAnchorRelative(UIAnchorSide.BOTTOM));
	assertEquals("$this", frame.getAnchorRelative(UIAnchorSide.RIGHT));
	assertEquals("MIN", frame.getAnchorPos(UIAnchorSide.TOP));
	assertEquals("MIN", frame.getAnchorPos(UIAnchorSide.LEFT));
	assertEquals("0.123", frame.getAnchorPos(UIAnchorSide.BOTTOM));
	assertEquals("MAX", frame.getAnchorPos(UIAnchorSide.RIGHT));
	assertEquals("0", frame.getAnchorOffset(UIAnchorSide.TOP));
	assertEquals("0", frame.getAnchorOffset(UIAnchorSide.LEFT));
	assertEquals("0", frame.getAnchorOffset(UIAnchorSide.BOTTOM));
	assertEquals("0", frame.getAnchorOffset(UIAnchorSide.RIGHT));
}