Exemple #1
0
        public void ON_ContainsVertexAt_WHEN_Vertex_Exists_SHOULD_Return_True()
        {
            // Arrange
            var uut = new UnitUnderTest <int>(index => _vertexMocks[index].Object, () => _vertexMocks.Length);

            // Act
            var all = Enumerable.Range(0, VerticesCount).All(idx => uut.ContainsVertexAt(idx));

            // Assert
            Assert.IsTrue(all);
        }
Exemple #2
0
        public void ON_ContainsVertexAt_WHEN_Vertex_Does_Not_Exist_SHOULD_Return_False()
        {
            // Arrange
            var uut = new UnitUnderTest <int>(index => _vertexMocks[index].Object, () => _vertexMocks.Length);

            // Act
            var any = EnumerableExtensions.Enumerate(int.MinValue, -100, -1, VerticesCount, VerticesCount + 1, int.MaxValue)
                      .Any(idx => uut.ContainsVertexAt(idx));

            // Assert
            Assert.IsFalse(any);
        }