Ejemplo n.º 1
0
        public void Test_GetColumnVector_ByName_StronglyTypedVarsion()
        {
            // Given
            var expectedVector = new DataVector <string>(new[] { "a1.1", "a2.1", "a3.1" }, "Col1");

            // When
            var actualVector = _subject.GetColumnVector <string>("Col1");

            // Then
            Assert.IsTrue(expectedVector.Equals(actualVector));
        }
Ejemplo n.º 2
0
            public override bool Equals(object obj)
            {
                try
                {
                    if (!(obj is DataShape))
                    {
                        return(false);
                    }

                    DataShape d = (DataShape)obj;
                    if (!gridPosition.Equals(d.gridPosition))
                    {
                        return(false);
                    }

                    for (int i = 0; i < blocks.Count; i++)
                    {
                        if (!blocks[i].Equals(d.blocks[i]))
                        {
                            return(false);
                        }
                    }

                    for (int i = 0; i < stateRelativePostions.Count; i++)
                    {
                        if (!stateRelativePostions[i].Equals(d.stateRelativePostions[i]))
                        {
                            return(false);
                        }
                    }

                    return(true);
                }
                catch
                {
                    return(false);
                }
            }
Ejemplo n.º 3
0
        public void Test_GetColumnVector_ByName_StronglyTypedVarsion()
        {
            // Given
            var expectedVector = new DataVector<string>(new[] { "a1.1", "a2.1", "a3.1" }, "Col1");

            // When
            var actualVector = _subject.GetColumnVector<string>("Col1");

            // Then
            Assert.IsTrue(expectedVector.Equals(actualVector));
        }