Skip to content

Commit

Permalink
Randomize ConsumerTest.StreamTest
Browse files Browse the repository at this point in the history
References #8
  • Loading branch information
andreashuber-lawo committed Jan 10, 2016
1 parent e424977 commit d76c3bb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Lawo.EmberPlusSharpTest/Model/ConsumerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -854,14 +854,16 @@ await WaitForChangeAsync(
[TestMethod]
public void StreamTest()
{
var boolValue = true;
byte intValue = 42;
var boolValue = GetRandomBoolean();
byte intValue = (byte)this.Random.Next(byte.MinValue, byte.MaxValue + 1);
var intFormat = GetFormat(intValue);
byte enumValue = 2;
var enumValues = (Enumeration[])Enum.GetValues(typeof(Enumeration));
byte enumValue = (byte)(int)enumValues[this.Random.Next(enumValues.Length)];
var enumFormat = GetFormat(enumValue);
var octetStringValue = new byte[] { 0xBD, 0xD7, 0xC4, 0xC4, 0x3C, 0xED, 0x13 };
var realValue = 3.14159265359;
var stringValue = "Hello";
var octetStringValue = new byte[this.Random.Next(0, 5)];
this.Random.NextBytes(octetStringValue);
var realValue = this.Random.NextDouble();
var stringValue = GetRandomString();

var intBytes = BitConverter.GetBytes(intValue);
var enumBytes = BitConverter.GetBytes(enumValue);
Expand Down

0 comments on commit d76c3bb

Please sign in to comment.