// public void ProcessResultOfAIDI() { Result.Clear(); // if (OffsetParam.IsAddToDetection) { OffsetParam.CalculateRegion(); if (!OffsetParam.IsResultOK) { Result.Add(ETypeOfNg.OFFSET); } } // if (DefectParam.IsAddToDetection) { DefectParam.CalculateRegion(); if (!DefectParam.IsResultOK) { Result.Add(ETypeOfNg.DEFECT); } } // if (OverageParam.IsAddToDetection) { OverageParam.CalculateRegion(); if (!OverageParam.IsResultOK) { Result.Add(ETypeOfNg.OVERAGE); } } // if (TipParam.IsAddToDetection) { TipParam.CalculateRegion(); if (!TipParam.IsResultOK) { Result.Add(ETypeOfNg.TIP); } } // if (BadConnectionParam.IsAddToDetection) { BadConnectionParam.CalculateRegion(); if (!BadConnectionParam.IsResultOK) { Result.Add(ETypeOfNg.BADCONNECTION); } } // if (0 == Result.Count) { Result.Add(ETypeOfNg.OK); } return; }
public virtual void TestOffset() { long X = 42; long offset = new OffsetParam(System.Convert.ToString(X)).GetOffset(); NUnit.Framework.Assert.AreEqual("OffsetParam: ", X, offset); offset = new OffsetParam((string)null).GetOffset(); NUnit.Framework.Assert.AreEqual("OffsetParam with null should have defaulted to 0" , 0, offset); try { offset = new OffsetParam("abc").GetValue(); NUnit.Framework.Assert.Fail("OffsetParam with nondigit value should have thrown IllegalArgumentException" ); } catch (ArgumentException) { } }