Exemplo n.º 1
0
        public void GetAssociationProperties_ClassHasAssociationProperty_OnePropertyReturned()
        {
            var contentInspector      = new ContentInspector();
            var associationProperties = contentInspector.GetAssociationProperties(new AssociationClass());

            Assert.AreEqual(1, associationProperties.Count());
        }
Exemplo n.º 2
0
        public void GetAssociationProperties_ClassHasNoAssociationProperties_EmptyListReturned()
        {
            var contentInspector      = new ContentInspector();
            var associationProperties = contentInspector.GetAssociationProperties(new AssociationLessClass());

            Assert.AreEqual(0, associationProperties.Count());
        }
Exemplo n.º 3
0
        public FileTypeValidator()
        {
            var contentInspectorBuilder = new ContentInspectorBuilder()
            {
                Definitions = MimeDetective.Definitions.Default.All()           // Potentially need to review the definitions due to file types allowed.
            };

            _contentInspector = contentInspectorBuilder.Build();
        }
Exemplo n.º 4
0
    public void ApplyDataToInspector()
    {
        if (inspectObj == null) {
            Debug.LogError("inspectObj new.");
            inspectObj = ScriptableObject.CreateInstance("ContentInspector") as ContentInspector;
        }

        inspectObj.id = id;
        inspectObj.data = data;

        foreach (var point in points) point.ApplyDataToInspector();
    }