public void HumanReadableEnumFactoryClass_GetAddSubtractMethod_ReturnsArrayContainingAddSubtractSubtractValueWithCorrectNameProperty()
        {
            HumanReadableEnum <AddSubtract>[] testOutput = HumanReadableEnumFactory.GetAddSubtract();

            HumanReadableEnum <AddSubtract> item = testOutput.Single(e => e.Value == AddSubtract.Subtract);

            Assert.AreEqual(Resources.HumanReadableEnum_AddSubtract_Subtract, item.Name);
        }
コード例 #2
0
 /// <summary>
 /// Default constructor; initialises values of the add/subtract and arrive/depart combo boxes.
 /// </summary>
 public TrainAdjustTimesForm()
 {
     InitializeComponent();
     cbAddSubtract.Items.AddRange(HumanReadableEnumFactory.GetAddSubtract());
     cbArriveDepart.Items.AddRange(HumanReadableEnumFactory.GetArrivalDeparture());
 }
        public void HumanReadableEnumFactoryClass_GetAddSubtractMethod_ReturnsArrayOfLength2()
        {
            HumanReadableEnum <AddSubtract>[] testOutput = HumanReadableEnumFactory.GetAddSubtract();

            Assert.AreEqual(2, testOutput.Length);
        }
コード例 #4
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 public TrainCopyForm()
 {
     InitializeComponent();
     cbAddSubtract.Items.AddRange(HumanReadableEnumFactory.GetAddSubtract());
 }