public void DuadF_Constructor_ParametersSet() { var t = new DuadF(int.MinValue, int.MaxValue); Assert.AreEqual(t.Row, int.MinValue); Assert.AreEqual(t.Column, int.MaxValue); }
public void DuadF_DefaultConstructor_DefaultProperties() { var t = new DuadF(); Assert.AreEqual(t.Row, default(int)); Assert.AreEqual(t.Column, default(int)); }
public void Util_PointFFromDuadF_RandomValid() { var row = (float)rand.NextDouble(); var column = (float)rand.NextDouble(); var stimulus = new DuadF(row, column); var result = Util.PointFFromDuadF(stimulus); Assert.AreEqual(result.X, stimulus.Column); Assert.AreEqual(result.Y, stimulus.Row); }
public void DuadF_ColumnParameter_Persists() { var t = new DuadF(); var stimulus = rand.Next(); t.Column = stimulus; var expected = stimulus; var actual = t.Column; Assert.AreEqual(expected, actual); }
public void DuadF_ToString_Valid() { var row = (float)(1000 * rand.NextDouble()); var column = (float)(1000 * rand.NextDouble()); var d = new DuadF(row, column); var expected = "(" + row.ToString("f") + ", " + column.ToString("f") + ")"; var actual = d.ToString(); Assert.AreEqual(expected, actual); }
public void DuadF_DefaultConstructor_InstantiationSuccessful() { var t = new DuadF(); Assert.IsInstanceOfType(t, typeof(DuadF)); }