Exemple #1
0
        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);
        }
Exemple #2
0
        public void DuadF_DefaultConstructor_DefaultProperties()
        {
            var t = new DuadF();

            Assert.AreEqual(t.Row, default(int));
            Assert.AreEqual(t.Column, default(int));
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }
Exemple #5
0
        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);
        }
Exemple #6
0
        public void DuadF_DefaultConstructor_InstantiationSuccessful()
        {
            var t = new DuadF();

            Assert.IsInstanceOfType(t, typeof(DuadF));
        }