diff options
author | Artur Signell <artur.signell@itmill.com> | 2009-11-26 13:13:55 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2009-11-26 13:13:55 +0000 |
commit | 19cf454499dc6a80c5aa26ad8be8c642de74636b (patch) | |
tree | 4ddb8090aabc149f6fdcc728aeaeae72966b8f26 /tests | |
parent | 459cd623c8fe7c7e5b95a8ddbd0fe7ea1f2afbf6 (diff) | |
download | vaadin-framework-19cf454499dc6a80c5aa26ad8be8c642de74636b.tar.gz vaadin-framework-19cf454499dc6a80c5aa26ad8be8c642de74636b.zip |
Simple mime type test
svn changeset:10075/svn branch:6.2
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/vaadin/tests/server/TestMimeTypes.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/server/TestMimeTypes.java b/tests/src/com/vaadin/tests/server/TestMimeTypes.java new file mode 100644 index 0000000000..4475d0cdcf --- /dev/null +++ b/tests/src/com/vaadin/tests/server/TestMimeTypes.java @@ -0,0 +1,26 @@ +package com.vaadin.tests.server; + +import junit.framework.TestCase; + +import com.vaadin.Application; +import com.vaadin.terminal.ClassResource; +import com.vaadin.ui.Embedded; + +public class TestMimeTypes extends TestCase { + + public void testEmbeddedPDF() { + Application app = new Application() { + + @Override + public void init() { + // TODO Auto-generated method stub + + } + }; + Embedded e = new Embedded("A pdf", new ClassResource("file.pddf", app)); + assertEquals("Invalid mimetype", "application/octet-stream", e + .getMimeType()); + e = new Embedded("A pdf", new ClassResource("file.pdf", app)); + assertEquals("Invalid mimetype", "application/pdf", e.getMimeType()); + } +} |