Skip to content

Commit

Permalink
CL-2993358761158 : URLRequestHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaxx committed Jan 16, 2013
1 parent 85f7492 commit 337c269
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion flash/3.4/Tests.as3proj
Expand Up @@ -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" />
Expand Down
13 changes: 8 additions & 5 deletions flash/3.4/test/src/com/pubnub/net/URLRequestHeaderTest.as
@@ -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);
}
}
Expand Down

0 comments on commit 337c269

Please sign in to comment.