Skip to content

Commit

Permalink
Introduced parameter messageRandomNumberFrom50To110 and messageRandom…
Browse files Browse the repository at this point in the history
…NumberFrom40To126) for method TelemetryClient.Receive().
  • Loading branch information
wubin28 committed Apr 19, 2014
1 parent 9443ce0 commit 300ef10
Showing 1 changed file with 8 additions and 3 deletions.
Expand Up @@ -65,7 +65,12 @@ public virtual void Send(string message)
}
}

public virtual string Receive()
public virtual string Receive()
{
this.Receive(_randomMessageSimulator.Next(50, 110), _randomMessageSimulator.Next(40, 126));
}

public virtual string Receive(int messageRandomNumberFrom50To110, int messageRandomNumberFrom40To126)
{
string message;

Expand Down Expand Up @@ -93,10 +98,10 @@ public virtual string Receive()
{
// Simulate the reception of a response message returning a random message.
message = string.Empty;
int messageLength = _randomMessageSimulator.Next(50, 110);
int messageLength = messageRandomNumberFrom50To110;
for(int i = messageLength; i > 0; --i)
{
message += (char)_randomMessageSimulator.Next(40, 126);
message += (char)messageRandomNumberFrom40To126;
}
}

Expand Down

0 comments on commit 300ef10

Please sign in to comment.