Exemplo n.º 1
0
        public void Validate_NodeWithoutNameOrType_ShouldReturnFalse()
        {
            // Arange
            ValidGatesValidation validGatesValidation = new ValidGatesValidation();

            _nodeDefinitions.Add(new NodeDefinition());

            // Act
            bool result = validGatesValidation.Validate(_nodeDefinitions);

            // Assert
            Assert.IsFalse(result);
        }
Exemplo n.º 2
0
        public void Validate_NodeWithNameAndValidType_ShouldReturnTrue()
        {
            // Arange
            ValidGatesValidation validGatesValidation = new ValidGatesValidation();

            _nodeDefinitions.Add(
                new NodeDefinition()
            {
                Name = "NODE1",
                Type = "AND"
            }
                );

            // Act
            bool result = validGatesValidation.Validate(_nodeDefinitions);

            // Assert
            Assert.IsTrue(result);
        }