public PirateBroadcaster Constructor01(
     byte[] message,
     int port,
     double interval
 )
 {
     PirateBroadcaster target = new PirateBroadcaster(message, port, interval);
     return target;
     // TODO: add assertions to method PirateBroadcasterTest.Constructor01(Byte[], Int32, Double)
 }
 public void Stop943()
 {
     PirateBroadcaster pirateBroadcaster;
     pirateBroadcaster = new PirateBroadcaster(0, 1);
     pirateBroadcaster.Start();
     this.Stop(pirateBroadcaster);
     Assert.IsNotNull((object)pirateBroadcaster);
     Assert.IsNotNull(pirateBroadcaster.Message);
     Assert.AreEqual<int>(0, pirateBroadcaster.Message.Length);
     Assert.AreEqual<int>(0, pirateBroadcaster.Port);
 }
 public void IntervalGet162()
 {
     PirateBroadcaster pirateBroadcaster;
     double d;
     pirateBroadcaster = new PirateBroadcaster(0, 1);
     pirateBroadcaster.Start();
     d = this.IntervalGet(pirateBroadcaster);
     Assert.AreEqual<double>(1, d);
     Assert.IsNotNull((object)pirateBroadcaster);
     Assert.IsNotNull(pirateBroadcaster.Message);
     Assert.AreEqual<int>(0, pirateBroadcaster.Message.Length);
     Assert.AreEqual<int>(0, pirateBroadcaster.Port);
 }
 public void IntervalSetThrowsContractException248()
 {
     try
     {
       PirateBroadcaster pirateBroadcaster;
       pirateBroadcaster = new PirateBroadcaster(0, 1);
       pirateBroadcaster.Start();
       this.IntervalSet(pirateBroadcaster, 0);
       throw
     new AssertFailedException("expected an exception of type ContractException");
     }
     catch(Exception ex)
     {
       if (!PexContract.IsContractException(ex))
     throw ex;
     }
 }
Exemple #5
0
 /// <summary>
 /// When a broadcast has been executed.
 /// </summary>
 /// <param name="broadcaster">The broadcaster that executed.</param>
 public void OnBroadcastExecuted(PirateBroadcaster broadcaster)
 {
     if(DebugMode) Console.WriteLine("Broadcasted IP");
 }
 public PirateBroadcaster Constructor(int port, double interval)
 {
     PirateBroadcaster target = new PirateBroadcaster(port, interval);
     return target;
     // TODO: add assertions to method PirateBroadcasterTest.Constructor(Int32, Double)
 }