Esempio n. 1
0
		public void TankRupturesWhenSensorDoesNotReportTankFullAndTimerDoesNotTimeout()
		{
			// Arrange
			var model = new PressureTankModel();
			var simulator = new Simulator(model);
			model.Sensor.EnableFault<Sensor.SuppressIsFull>();
			model.Timer.EnableFault<Timer.SuppressTimeout>();

			// Act
			simulator.Simulate(TimeSpan.FromHours(1));

			// Assert
			model.Tank.IsRuptured().Should().BeTrue();
		}
Esempio n. 2
0
		public ModelCheckingTests()
		{
			_model = new PressureTankModel();
			_spin = new Spin(_model);
		}
Esempio n. 3
0
		public void TankDoesNotRuptureWhenNoFaultsOccur()
		{
			// Arrange
			var model = new PressureTankModel();
			var simulator = new Simulator(model);

			// Act
			simulator.Simulate(TimeSpan.FromHours(1));

			// Assert
			model.Tank.IsRuptured().Should().BeFalse();
		}