package com.google.gdata.data; import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; import com.google.gdata.util.ContentType; import com.google.gdata.util.XmlBlob; public class TestOtherContent { public static final ContentType KML_CONTENT = new ContentType("application/vnd.google-earth.kml+xml"); private OtherContent content; @Before public void setup() { XmlBlob kml = new XmlBlob(); kml.setBlob(""); this.content = new OtherContent(); this.content.setXml(kml); this.content.setMimeType(KML_CONTENT); } @Test public void getTypeTest() { assertEquals(Content.Type.OTHER_XML, this.content.getType()); this.content.setText("blaaah"); assertEquals(Content.Type.OTHER_TEXT, this.content.getType()); this.content.setText(null); assertEquals(Content.Type.OTHER_BINARY, this.content.getType()); } }