Esempio n. 1
0
        public void GetAssociatedProject()
        {
            m_ptHelper.AddProject("MNKY", "Soup");
            m_ptHelper.AddProject("SOUP", "Monkey Soup");
            m_ptHelper.AddProject("GRK", "Levington");
            m_ptHelper.AddProject("Mony", "Money");
            ScrText found = ParatextHelper.GetAssociatedProject(new TestProjectId(FDOBackendProviderType.kXML, "Monkey Soup"));

            Assert.AreEqual("SOUP", found.Name);
        }
Esempio n. 2
0
        public void IsProjectWritable()
        {
            m_ptHelper.AddProject("MNKY");
            m_ptHelper.AddProject("SOUP", "Monkey Soup", null, true, false);
            m_ptHelper.AddProject("TWNS", null, null, false, false);
            m_ptHelper.AddProject("LNDN", null, null, false, true);
            m_ptHelper.AddProject("Mony", null, null, true, true);
            m_ptHelper.AddProject("Grk7");             // Considered a source language text so should be ignored

            Assert.IsTrue(ParatextHelper.IsProjectWritable("MNKY"));
            Assert.IsFalse(ParatextHelper.IsProjectWritable("SOUP"));
            Assert.IsFalse(ParatextHelper.IsProjectWritable("TWNS"));
            Assert.IsFalse(ParatextHelper.IsProjectWritable("LNDN"));
            Assert.IsFalse(ParatextHelper.IsProjectWritable("Mony"));
            Assert.IsFalse(ParatextHelper.IsProjectWritable("Grk7"));
        }