protected override void Establish_context()
 {
     base.Establish_context();
     NetworkSettings = new Mock <INetworkSettings>();
     UriSource       = new Mock <IUriSource>();
     Logger          = new Mock <ILogger>();
     SpeedMeasurer   = new SpeedMeasurer();
     NetworkClient   = new NetworkClient(NetworkSettings.Object, UriSource.Object,
                                         SpeedMeasurer, Logger.Object);
     NotificationService.Notifier = null;
 }
Beispiel #2
0
        protected override void Because_of()
        {
            timeFrom = DateTime.Now;
            for (int i = 0; i < iterations; i++)
            {
                SpeedMeasurer.Add(countPerMeasure);
                Thread.Sleep(200);
            }
            timeTo = DateTime.Now;

            expectedSpeed = countPerMeasure * iterations * 1000.0 / (timeTo - timeFrom).TotalMilliseconds;
            currentSpeed  = SpeedMeasurer.Speed;
        }
Beispiel #3
0
 protected override void Establish_context()
 {
     base.Establish_context();
     SpeedMeasurer = new SpeedMeasurer();
 }