Permalink
Browse files

CL-2993358761158 : URLRequestHeader

  • Loading branch information...
1 parent 85f7492 commit 337c269af7dbbc2d0eee5adb06b6cea0a3908bc9 @fmaxx fmaxx committed Jan 16, 2013
Showing with 9 additions and 6 deletions.
  1. +1 −1 flash/3.4/Tests.as3proj
  2. +8 −5 flash/3.4/test/src/com/pubnub/net/URLRequestHeaderTest.as
View
@@ -4,7 +4,7 @@
<output>
<movie outputType="Application" />
<movie input="" />
- <movie path="bin\PubNubAS3Example.swf" />
+ <movie path="bin\TestSuite.swf" />
<movie fps="30" />
<movie width="800" />
<movie height="600" />
@@ -1,30 +1,33 @@
package com.pubnub.net {
- import flexunit.framework.Assert;
+ import flexunit.framework.*;
/**
* Tests for URLRequestHeader
* @author firsoff maxim, firsoffmaxim@gmail.com, icq : 235859730
*/
public class URLRequestHeaderTest {
+ private var header:URLRequestHeader;
+
+ [Before]
+ public function setUp():void {
+ header = new URLRequestHeader();
+ }
+
[Test(description="KEEP_ALIVE")]
public function keepAlive() : void {
- var header:URLRequestHeader = new URLRequestHeader();
Assert.assertEquals(
header.getValue(URLRequestHeader.CONNECTION),
URLRequestHeader.KEEP_ALIVE);
}
[Test(description="IS_EMPTY")]
public function isEmpty() : void {
- var header:URLRequestHeader = new URLRequestHeader();
Assert.assertEquals(header.isEmpty, false);
- trace(header.content);
}
[Test(description="CONTENT")]
public function content() : void {
var testStr:String = 'Connection: Keep-Alive\r\n'
- var header:URLRequestHeader = new URLRequestHeader();
Assert.assertEquals(header.content, testStr);
}
}

0 comments on commit 337c269

Please sign in to comment.