Ejemplo n.º 1
0
        public LoadTestViewModel()
        {
            Configuration = new LoadTestConfiguration();

            RunLoadTestCommand = new RunLoadTestCommand(this);

            Heartbeats = new List <Heartbeat>();

            ChartModel = new LoadTestChart(Heartbeats);

            Defaults();
        }
Ejemplo n.º 2
0
        public LoadTestViewModel()
        {
            Configuration = new LoadTestConfiguration();

            RunLoadTestCommand = new RunLoadTestCommand(this);

            Heartbeats = new List<Heartbeat>();

            ChartModel = new LoadTestChart(Heartbeats);

            Defaults();
        }
Ejemplo n.º 3
0
        public void MonitorHeartRate()
        {
            var config = new LoadTestConfiguration
            {
                Duration = TimeSpan.FromSeconds(3)
            };

            var loadTest = new Mock<ILoadTest>();

            loadTest.Setup(k => k.TotalIterations).Returns(1);
            loadTest.Setup(k => k.TotalErrors).Returns(1);
            loadTest.Setup(k => k.Configuration).Returns(config);

            var heartRateMonitor = new HeartRateMonitor(loadTest.Object);

            heartRateMonitor.Start(DateTime.Now, TimeSpan.FromSeconds(2));

            Assert.IsNotNull(heartRateMonitor.Heartbeats);

            Assert.IsTrue(heartRateMonitor.Heartbeats.Any());
        }
Ejemplo n.º 4
0
        public void MonitorHeartRate()
        {
            var config = new LoadTestConfiguration
            {
                Duration = TimeSpan.FromSeconds(3)
            };

            var loadTest = new Mock <ILoadTest>();

            loadTest.Setup(k => k.TotalIterations).Returns(1);
            loadTest.Setup(k => k.TotalErrors).Returns(1);
            loadTest.Setup(k => k.Configuration).Returns(config);

            var heartRateMonitor = new HeartRateMonitor(loadTest.Object);

            heartRateMonitor.Start(DateTime.Now, TimeSpan.FromSeconds(2));

            Assert.IsNotNull(heartRateMonitor.Heartbeats);

            Assert.IsTrue(heartRateMonitor.Heartbeats.Any());
        }
Ejemplo n.º 5
0
 public LoadTestBuilder(LoadTestConfiguration configuration)
 {
     _configuration = configuration;
 }
Ejemplo n.º 6
0
 public LoadTestBuilder()
 {
     _configuration = new LoadTestConfiguration();
 }