Exemple #1
0
        public void ModelPerson_Basic_Valid()
        {
            DataStoreUtility.DataStoreSetup();

            DataStoreUtility.LoadTestFile();

            PersonModel tt = DV.PersonDV.GetModelFromId("I0000");

            Assert.True(tt.Valid, "Invalid person");
        }
Exemple #2
0
        public void Init()
        {
            DataStoreUtility.DataStoreSetup();

            // Load Resource
            DataStoreUtility.ListEmbeddedResources();

            var assemblyExec = Assembly.GetExecutingAssembly();
            var resourceName = DataStoreUtility.BasePath + ".Test_Data.grampsxml.171.rng";

            rngStream = assemblyExec.GetManifestResourceStream(resourceName);
        }
Exemple #3
0
        public void RelaxNGBasicDataTests_Basic()
        {
            DataStoreUtility.DataStoreSetup();

            string filePath = Path.Combine(DataStore.Instance.AD.CurrentDataFolder.Path, Constants.StorageXMLFileName);

            XmlReader instance = new XmlTextReader(filePath);

            XmlReader grammar = new XmlTextReader(rngStream);

            RelaxngValidatingReader reader =
                new RelaxngValidatingReader(instance, grammar);

            while (reader.Read())
            {
                // TODO parse based on NodeType
            }
        }
Exemple #4
0
        public void ModelPerson_Notes()
        {
            DataStoreUtility.DataStoreSetup();

            DataStoreUtility.LoadTestFile();

            PersonModel tt = DV.PersonDV.GetModelFromId("I0003");

            Assert.True(tt.Valid, "Invalid person");

            Assert.True(tt.GNoteRefCollection.Count == 2, "Wrong notes count");

            HLinkNoteModel noteModel = tt.GNoteRefCollection.GetFirstOfType(Common.Constants.NoteTypeBiography);

            Assert.True(noteModel.DeRef.Id == "N0000", "Wrong Person Model Notes Bio found");

            Assert.True(noteModel.DeRef.GType == Common.Constants.NoteTypeBiography, "Wrong Person Model Notes Type found");

            Assert.True(noteModel.DeRef.GStyledText.GText == "Biography Note.\n", "Wrong Person Model Notes Text found");
        }
Exemple #5
0
        public void Init()
        {
            GeneralData.setupMocks();

            DataStoreUtility.DataStoreSetup();
        }