public void NullDataTest() { var generator = new ValueGenerator(); var result = generator.Generate(null); Assert.AreEqual("null", result); }
public void ListDataTest() { var generator = new ValueGenerator(); var result = generator.Generate(new List <int> { 1, 2, 3 }); Assert.AreEqual("System.Collections.Generic.List`1[System.Int32]", result); }
public void Generate_MinAndMaxValue_InInterval(double min, double max) { var constraints = new List <ConstraintPrototype>() { new ConstraintPrototype(ConstraintTypes.Min, min), new ConstraintPrototype(ConstraintTypes.Max, max) }; double result = ValueGenerator.Generate(constraints); Assert.InRange(result, min, max); }
public void Generate_MinAndMaxValueB_InInterval(double minA, double maxA, double minB, double maxB) { var constraints = new List <ConstraintPrototype>() { new ConstraintPrototype(ConstraintTypes.MinA, minA), new ConstraintPrototype(ConstraintTypes.MaxA, maxA), new ConstraintPrototype(ConstraintTypes.MinB, minB), new ConstraintPrototype(ConstraintTypes.MaxB, maxB), }; Complex result = ValueGenerator.Generate(constraints); Assert.InRange(result.Imaginary, minB, maxB); }
public string LiteralDataTest(object data) { var generator = new ValueGenerator(); return(generator.Generate(data)); }