public void ConvertArrayToParamsOneParam_IncorectArray_False(string[] inner) { uint minlenth = 1; uint maxlenth = 2; uint num; InnerDataValidator parser = new InnerDataValidator(minlenth, maxlenth); bool result = parser.ConvertArrayToParams(inner, out num); Assert.IsFalse(result); }
public void ValidateInputArray_NullReserense_Falfe() { string[] array = null; uint minlenth = 1; uint maxlenth = 2; InnerDataValidator parser = new InnerDataValidator(minlenth, maxlenth); bool result = parser.ValidateInputArray(array); Assert.IsFalse(result); }
public void ValidateInputArray_ValidData_True() { string[] array = new string[] { "q", "s" }; uint minlenth = 1; uint maxlenth = 2; InnerDataValidator parser = new InnerDataValidator(minlenth, maxlenth); bool result = parser.ValidateInputArray(array); Assert.IsTrue(result); }
public void ValidateInputArray_OneArrayElementIsEmpty_False() { string[] array = new string[] { "q", string.Empty }; uint minlenth = 1; uint maxlenth = 2; InnerDataValidator parser = new InnerDataValidator(minlenth, maxlenth); bool result = parser.ValidateInputArray(array); Assert.IsFalse(result); }
public void ValidateInputArray_TooLongArray_False() { string[] array = new string[] { "q", "s", "33", " 55", "44" }; uint minlenth = 1; uint maxlenth = 2; InnerDataValidator parser = new InnerDataValidator(minlenth, maxlenth); bool result = parser.ValidateInputArray(array); Assert.IsFalse(result); }
static void Main(string[] args) { IVisualizer vi = new ConsoleUI(); IEnvelopeCreator eCreator = new EnvelopeCreator(); IComparer <Envelope> comparer = new EnvelopeComparer(); IEnvelopesStorage eStorage = new EnvelopesStorage(eCreator, comparer); IInnerDataValidator iDataValidator = new InnerDataValidator(); Controler cntrlr = new Controler(vi, eStorage, iDataValidator, args); cntrlr.Start(); }
public void ConvertArrayToParamsOneParam_ValidData_True(string[] inner, uint expected) { uint minlenth = 1; uint maxlenth = 2; uint num; InnerDataValidator parser = new InnerDataValidator(minlenth, maxlenth); bool result = parser.ConvertArrayToParams(inner, out num); Assert.IsTrue(result); Assert.AreEqual(num, expected); }
static void Main(string[] args) { uint maxValidLenth = 2; uint minValidLenth = 1; IVisualizer visualizer = new ConsoleUI(); IInnerDataValidator innerDataValidator = new InnerDataValidator(minValidLenth, maxValidLenth); IAlgoritmSelector algoritmSelector = new AlgoritmSelector(innerDataValidator, minValidLenth, maxValidLenth); Controller controller = new Controller(args, visualizer, algoritmSelector); controller.Start(); }
public void Initialize() { _dataValidator = new InnerDataValidator(); }