Skip to content

Commit

Permalink
work on test
Browse files Browse the repository at this point in the history
  • Loading branch information
auden-woolfson committed Dec 3, 2024
1 parent b1e2b2f commit a329169
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class TestServlet
TaskId taskId;
OutputBufferId bufferId;
String requestURI;
HttpServletRequest request;
long token;

void parse(String uri) throws IOException
Expand All @@ -50,6 +51,7 @@ protected void processRequest(
this.taskId = taskId;
this.bufferId = bufferId;
this.token = token;
this.request = request;
}

@Override
Expand Down Expand Up @@ -80,6 +82,13 @@ public void testParsing()
assertEquals(789, servlet.token);
}

@Test
public void testSanitization()
{
TestServlet servlet = parse("/v1/task/async/0.1.2.3.4/results/456/789");
// verify this.request here
}

@Test (expectedExceptions = { IllegalArgumentException.class })
public void testParseTooFewElements()
{
Expand Down

0 comments on commit a329169

Please sign in to comment.