Beispiel #1
0
        public void VerifyTransportVertexModelRequiredAnnotations()
        {
            var vertexForValidation = new TransportVertex
            {
                Description = "TestDescr"
            };
            var errorCount = CheckPropertyValidation.Validate(vertexForValidation).Count;

            Assert.AreEqual(ClassValidationError, errorCount);
        }
Beispiel #2
0
        public void VerifyGraphMapModelRequiredAnnotations()
        {
            var graphForValidation = new GraphMap
            {
                GraphString = string.Empty
            };
            var errorCount = CheckPropertyValidation.Validate(graphForValidation).Count;

            Assert.AreEqual(ClassValidationError, errorCount);
        }
Beispiel #3
0
        public void VerifyIntercityLinkModelRequiredAnnotations()
        {
            var edgeToValidate = new IntercityLink
            {
                NodesPair = new VerticesPair
                {
                    FirstNodeId   = 1,
                    RelatedNodeId = 2
                }
            };
            var errorCount = CheckPropertyValidation.Validate(edge).Count;

            if (errorCount == 0 && (edgeToValidate.Length == defaultValueOfDouble || edgeToValidate.Price == defaultValueOfDouble || edgeToValidate.ServiceClass == defaultValueOfByte))
            {
                errorCount++;
            }

            Assert.AreEqual(ClassValidationError, errorCount);
        }
Beispiel #4
0
        public void VerifyTransportVertexModelProperties()
        {
            var errorCount = CheckPropertyValidation.Validate(vertex).Count;

            Assert.AreEqual(NoErrors, errorCount);
        }
Beispiel #5
0
        public void VerifyGraphMapModelProperties()
        {
            var errorCount = CheckPropertyValidation.Validate(graph).Count;

            Assert.AreEqual(NoErrors, errorCount);
        }
Beispiel #6
0
        public void VerifyIntercityLinkModelProperties()
        {
            var errorCount = CheckPropertyValidation.Validate(edge).Count;

            Assert.AreEqual(NoErrors, errorCount);
        }