Example #1
0
        public void ShouldHaveVehicles()
        {
            ClassInfo vehicle = _classes.Single(c => c.XmlName == "vehicles");

            Assert.That(vehicle.Elements.Count, Is.EqualTo(1));
            GeneratorAssertHelper.AssertBindedProperty(vehicle, "car", "car", true, "Cars", "IList<Car>");
        }
Example #2
0
        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");
        }
Example #3
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");
        }
Example #4
0
        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 ShouldTechnicalImageDetailsHaveMultipleFiles()
        {
            ClassInfo techDetails = _classes.Single(c => c.XmlName == "TechnicalImageDetails");

            GeneratorAssertHelper.AssertBindedProperty(techDetails, "File", "File", true, "Files", "IList<File>");
        }
        public void ShouldCollectionResourceReferenceHasCollectionResourceReferencePropOfStringType()
        {
            ClassInfo catalogItem = _classes.Single(c => c.XmlName == "CollectionResourceReference");

            GeneratorAssertHelper.AssertStringProperty(catalogItem, "CollectionResourceReference", false, "CollectionResourceReferenceProp");
        }
        public void ShouldAdministratingRecordCompanyHasOnePartyId()
        {
            ClassInfo catalogItem = _classes.Single(c => c.XmlName == "AdministratingRecordCompany");

            GeneratorAssertHelper.AssertBindedProperty(catalogItem, "PartyId", "PartyId", false, "PartyId", "PartyId");
        }
        public void ShouldCatalogItemHasDisplayTitle()
        {
            ClassInfo catalogItem = _classes.Single(c => c.XmlName == "CatalogItem");

            GeneratorAssertHelper.AssertBindedProperty(catalogItem, "DisplayTitle", "ReferenceTitle", false, "DisplayTitle", "ReferenceTitle");
        }
        public void ShouldCatalogItemHasDisplayArtistNameAsString()
        {
            ClassInfo catalogItem = _classes.Single(c => c.XmlName == "CatalogItem");

            GeneratorAssertHelper.AssertBindedProperty(catalogItem, "DisplayArtistName", "Name", false, "DisplayArtistName", "Name");
        }