Пример #1
0
 public void IsHigh_Pins_Is0()
 {
     var state = new DigitalPortState() { Pins = 0 };
     Assert.AreEqual(false, state.IsSet(0));
     Assert.AreEqual(false, state.IsSet(1));
     Assert.AreEqual(false, state.IsSet(2));
     Assert.AreEqual(false, state.IsSet(3));
     Assert.AreEqual(false, state.IsSet(4));
     Assert.AreEqual(false, state.IsSet(5));
     Assert.AreEqual(false, state.IsSet(6));
     Assert.AreEqual(false, state.IsSet(7));
 }
Пример #2
0
 public void IsHigh_Pin_Argument_IsNegative()
 {
     var state = new DigitalPortState();
     state.IsSet(-1);
 }
Пример #3
0
 public void IsHigh_Pin_Argument_Is8()
 {
     var state = new DigitalPortState();
     typeof(DigitalPortState).GetProperty("Pins").SetValue(state, 0);
     state.IsSet(8);
 }