コード例 #1
0
        public void TestNullCoreStandardToIdentifier()
        {
            CoreStandardsRow   coreStandardsRow = new CoreStandardsRow("", "3-l", null, null, null, null);
            StandardIdentifier identifier       = StandardIdentifierTranslation.CoreStandardToIdentifier(coreStandardsRow);

            Assert.Null(identifier);
        }
コード例 #2
0
        public void TestCoreStandardToIdentifierELATarget()
        {
            CoreStandardsRow   coreStandardsRow = new CoreStandardsRow("ELA", "4-6|3-6", "", "", "Target", null);
            StandardIdentifier identifier       = StandardIdentifierTranslation.CoreStandardToIdentifier(coreStandardsRow);

            Assert.Equal("4-6", identifier.Claim);
            Assert.Equal("3-6", identifier.Target);
            Assert.Equal("ELA", identifier.SubjectCode);
        }
コード例 #3
0
        public void TestInvalidCoreStandardToIdentifier()
        {
            CoreStandardsRow coreStandardsRow = new CoreStandardsRow("", null, null, null, null, null);
            Exception        exception        = Assert.Throws <ArgumentException>(() => StandardIdentifierTranslation.CoreStandardToIdentifier(coreStandardsRow));

            Assert.Equal("The standards string must not be null or empty", exception.Message);
            exception = Assert.Throws <ArgumentException>(() => StandardIdentifierTranslation.CoreStandardToIdentifier(null));
            Assert.Equal("The standards string must not be null or empty", exception.Message);
        }
コード例 #4
0
        public void TestCoreStandardToIdentifierMathTarget()
        {
            CoreStandardsRow   coreStandardsRow = new CoreStandardsRow("MATH", "1|NBT|E-3", "", "", "Target", null);
            StandardIdentifier identifier       = StandardIdentifierTranslation.CoreStandardToIdentifier(coreStandardsRow);

            Assert.Equal("1", identifier.Claim);
            Assert.Equal("NBT", identifier.ContentDomain);
            Assert.Equal("E-3", identifier.Target);
            Assert.Equal("MATH", identifier.SubjectCode);
        }
コード例 #5
0
        public void TestCoreStandardToIdentifierMathCcss()
        {
            CoreStandardsRow   coreStandardsRow = new CoreStandardsRow("MATH", "1|NBT|E-3|a/s|3.NBT.2", "", "", "CCSS", null);
            StandardIdentifier identifier       = StandardIdentifierTranslation.CoreStandardToIdentifier(coreStandardsRow);

            Assert.Equal("1", identifier.Claim);
            Assert.Equal("NBT", identifier.ContentDomain);
            Assert.Equal("E-3", identifier.Target);
            Assert.Equal("3.NBT.2", identifier.CommonCoreStandard);
        }
コード例 #6
0
        public void TestCoreStandardToIdentifierELACcss()
        {
            CoreStandardsRow   coreStandardsRow = new CoreStandardsRow("ELA", "3-l|4-6|6.SL.2", "", "", "CCSS", null);
            StandardIdentifier identifier       = StandardIdentifierTranslation.CoreStandardToIdentifier(coreStandardsRow);

            Assert.Equal("3-l", identifier.Claim);
            Assert.Equal("4-6", identifier.Target);
            Assert.Equal("6.SL.2", identifier.CommonCoreStandard);
            Assert.Equal("ELA", identifier.SubjectCode);
        }
コード例 #7
0
        public static CoreStandardsRow Create(XElement element)
        {
            var row = Create(
                subjectCode: (string)element.Attribute("Subject"),
                key: (string)element.Attribute("Key"),
                name: (string)element.Attribute("Name"),
                description: (string)element.Attribute("Description"),
                levelType: (string)element.Attribute("LevelType"));

            row.StandardIdentifier = StandardIdentifierTranslation.CoreStandardToIdentifier(row);

            return(row);
        }