AssertStringProperty() public static method

public static AssertStringProperty ( ClassInfo classInfo, string propXmlName, bool isList, string propertyName ) : void
classInfo ClassInfo
propXmlName string
isList bool
propertyName string
return void
        public void ShouldHaveCar()
        {
            ClassInfo car = _classes.Single(c => c.XmlName == "car");

            Assert.That(car.Elements.Count, Is.EqualTo(3));
            GeneratorAssertHelper.AssertStringProperty(car, "brand", false, "Brand");
            GeneratorAssertHelper.AssertBindedProperty(car, "color", "color", false, "Color", "Color");
            GeneratorAssertHelper.AssertBindedProperty(car, "manufacturer", "manufacturerName", false, "Manufacturer", "ManufacturerName");
        }
Beispiel #2
0
        public void ShouldGenerateFileTest()
        {
            ClassInfo file = _classes.Single(c => c.XmlName == "File");

            GeneratorAssertHelper.AssertStringProperty(file, "FileName", false, "FileName");
            GeneratorAssertHelper.AssertStringProperty(file, "FilePath", false, "FilePath");
            GeneratorAssertHelper.AssertStringProperty(file, "URL", false, "URL");
            GeneratorAssertHelper.AssertBindedProperty(file, "HashSum", "HashSum", false, "HashSum", "HashSum");
        }
        public void ShouldHaveColor()
        {
            ClassInfo color = _classes.Single(c => c.XmlName == "color");

            Assert.That(color.Elements.Count, Is.EqualTo(3));

            GeneratorAssertHelper.AssertStringProperty(color, "hue", false, "Hue");
            GeneratorAssertHelper.AssertStringProperty(color, "rgb", false, "Rgb");
            GeneratorAssertHelper.AssertBindedProperty(color, "description", "colorDescription", false, "Description", "ColorDescription");
        }
        public void ShouldHaveCar()
        {
            ClassInfo car = _classes.Single(c => c.XmlName == "car");

            Assert.That(car.Elements.Count, Is.EqualTo(6));
            GeneratorAssertHelper.AssertStringProperty(car, "brand", false, "Brand");
            GeneratorAssertHelper.AssertBindedProperty(car, "color", "color", false, "Color", "Color");
            GeneratorAssertHelper.AssertBindedProperty(car, "manufacturer", "manufacturerName", false, "Manufacturer", "ManufacturerName");
            GeneratorAssertHelper.AssertProperty(car, "productionDate", "date", false, "ProductionDate", "DateTime?", false);
            GeneratorAssertHelper.AssertProperty(car, "exactProductionDate", "dateTime", false, "ExactProductionDate", "DateTime?", false);
            GeneratorAssertHelper.AssertProperty(car, "modelVersion", "decimal", false, "ModelVersion", "decimal?", false);
        }
        public void ShouldCollectionResourceReferenceHasCollectionResourceReferencePropOfStringType()
        {
            ClassInfo catalogItem = _classes.Single(c => c.XmlName == "CollectionResourceReference");

            GeneratorAssertHelper.AssertStringProperty(catalogItem, "CollectionResourceReference", false, "CollectionResourceReferenceProp");
        }