public void TestCoreStandardFromIdentifier() { StandardIdentifier identifier = StandardIdentifierTranslation.StandardStringToStandardIdentifier(elaStandardString); var coreStandardsRowCcss = ImmutableArray.Create( CoreStandardsRow.Create( subjectCode: "ELA", key: "3-l|4-6|6.SL.2", name: "", description: "CCSS Desc", levelType: "CCSS", identifier: identifier)); var coreStandardsRowTarget = ImmutableArray.Create( CoreStandardsRow.Create( subjectCode: "ELA", key: "4-6|3-6", name: "", description: "Target Desc", levelType: "Target", identifier: identifier)); CoreStandardsXml coreStandardsXml = new CoreStandardsXml(coreStandardsRowTarget, coreStandardsRowCcss); CoreStandards core = StandardIdentifierTranslation.CoreStandardFromIdentifier(coreStandardsXml, identifier); Assert.NotNull(core); Assert.Equal(core.CommonCoreStandardsId, "6.SL.2"); Assert.Equal(core.TargetId, "4-6"); Assert.Equal(core.TargetIdLabel, "4"); Assert.Equal(core.TargetDescription, "Target Desc"); Assert.Equal(core.CommonCoreStandardsDescription, "CCSS Desc"); }
public void TestElaV1Translation() { StandardIdentifier identifier = StandardIdentifierTranslation.StandardStringToStandardIdentifier(elaStandardString); Assert.Equal("3-L", identifier.Claim); Assert.Equal("4-6", identifier.Target); Assert.Equal("6.SL.2", identifier.CommonCoreStandard); }
public void TestInvalidMathV1String() { StandardIdentifier identifier = StandardIdentifierTranslation.StandardStringToStandardIdentifier(invalidMathV1StandardString); Assert.Equal("1", identifier.Claim); Assert.Equal(string.Empty, identifier.Target); Assert.Equal(string.Empty, identifier.CommonCoreStandard); }
public void TestInvalidMathV6String() { StandardIdentifier identifier = StandardIdentifierTranslation.StandardStringToStandardIdentifier(invalidMathV6StandardString); Assert.Equal("3", identifier.Claim); Assert.Equal(string.Empty, identifier.ContentCategory); Assert.Equal(string.Empty, identifier.TargetSet); Assert.Equal(string.Empty, identifier.TargetSet); }
public void TestMathV6Translation() { StandardIdentifier identifier = StandardIdentifierTranslation.StandardStringToStandardIdentifier(mathV6StandardString); Assert.Equal("3", identifier.Claim); Assert.Equal("D-6", identifier.Target); Assert.Equal("P", identifier.ContentCategory); Assert.Equal("TS04", identifier.TargetSet); }
public void TestMathV1Translation() { StandardIdentifier identifier = StandardIdentifierTranslation.StandardStringToStandardIdentifier(mathv1StandardString); Assert.Equal("1", identifier.Claim); Assert.Equal("NBT", identifier.ContentDomain); Assert.Equal("E-3", identifier.Target); Assert.Equal("3.NBT.2", identifier.CommonCoreStandard); }
public void TestInvalidMathV5String() { StandardIdentifier identifier = StandardIdentifierTranslation.StandardStringToStandardIdentifier(invalidMathV5StandardString); Assert.Equal("2", identifier.Claim); Assert.Equal("6.NS.6c", identifier.CommonCoreStandard); Assert.Equal(string.Empty, identifier.Target); Assert.Equal(string.Empty, identifier.ContentDomain); Assert.Equal(string.Empty, identifier.Emphasis); }
public void TestMathV5Translation() { StandardIdentifier identifier = StandardIdentifierTranslation.StandardStringToStandardIdentifier(mathV5StandardString); Assert.Equal("2", identifier.Claim); Assert.Equal("D-6", identifier.Target); Assert.Equal("6.NS.6c", identifier.CommonCoreStandard); Assert.Equal("NS", identifier.ContentDomain); Assert.Equal("m", identifier.Emphasis); }
public void TestToTargetId() { StandardIdentifier identifier = StandardIdentifierTranslation.StandardStringToStandardIdentifier(elaStandardString); var targetId = StandardIdentifierTranslation.ToTargetId(identifier); identifier = StandardIdentifierTranslation.StandardStringToStandardIdentifier(noTargetString); var noTargetId = StandardIdentifierTranslation.ToTargetId(identifier); Assert.Equal("4", targetId); Assert.Equal(string.Empty, noTargetId); }
public void TestToClaimId() { StandardIdentifier identifier = StandardIdentifierTranslation.StandardStringToStandardIdentifier(elaStandardString); var claimId = StandardIdentifierTranslation.ToClaimId(identifier); identifier = StandardIdentifierTranslation.StandardStringToStandardIdentifier(noClaimString); var noClaimId = StandardIdentifierTranslation.ToClaimId(identifier); Assert.Equal("3", claimId); Assert.Equal(string.Empty, noClaimId); }
public void TestEmptyInput() { StandardIdentifier identifier = StandardIdentifierTranslation.StandardStringToStandardIdentifier(string.Empty); Assert.Null(identifier); }
public void TestNullInput() { StandardIdentifier identifier = StandardIdentifierTranslation.StandardStringToStandardIdentifier(null); Assert.Null(identifier); }
public void TestNoClaimString() { StandardIdentifier identifier = StandardIdentifierTranslation.StandardStringToStandardIdentifier(noClaimString); Assert.Null(identifier); }
public void TestToSampleItems() { var digests = ImmutableArray.Create(digest); ImmutableArray <AccessibilityFamilyResource> noPartialResources = ImmutableArray.Create <AccessibilityFamilyResource>(); var subjectMath = ImmutableArray.Create("MATH"); AccessibilityFamily noPartialResourcesFamily = new AccessibilityFamily( subjects: subjectMath, grades: GradeLevels.Grade5, resources: noPartialResources); MergedAccessibilityFamily resourceFamily = AccessibilityResourceTranslation.MergeGlobalResources(noPartialResourcesFamily, Resources); var resourceFamilies = ImmutableArray.Create(resourceFamily); Claim1 = new Claim("claim1", "1", "ELA Claim 1"); Claim2 = new Claim("claim2", "2", "3"); ItMath = new InteractionType("2", "EQ", "", 2); ItEla = new InteractionType("1", "WER", "", 1); Math = Subject.Create("MATH", "Mathematics", "Math", ImmutableArray.Create(Claim2), ImmutableArray.Create(ItMath.Code)); Ela = Subject.Create("ELA", "English", "ELA", ImmutableArray.Create(Claim1), ImmutableArray.Create(ItEla.Code)); var interactionTypes = ImmutableArray.Create(ItEla, ItMath); var subjects = ImmutableArray.Create(Ela, Math); StandardIdentifier identifier = StandardIdentifierTranslation.StandardStringToStandardIdentifier("SBAC-ELA-v1:3-L|4-6|6.SL.2"); var coreStandardsRowCcss = ImmutableArray.Create( CoreStandardsRow.Create( subjectCode: "ELA", key: "3-l|4-6|6.SL.2", name: "", description: "CCSS Desc", levelType: "CCSS", identifier: identifier)); var coreStandardsRowTarget = ImmutableArray.Create( CoreStandardsRow.Create( subjectCode: "ELA", key: "4-6|3-6", name: "", description: "Target Desc", levelType: "Target", identifier: identifier)); CoreStandardsXml coreStandardsXml = new CoreStandardsXml(coreStandardsRowTarget, coreStandardsRowCcss); var itemPatch = ImmutableArray.Create(new ItemPatch()); var brailleFileInfo = new List <BrailleFileInfo>(); var items = SampleItemTranslation.ToSampleItems(digests, resourceFamilies, interactionTypes, subjects, coreStandardsXml, itemPatch, brailleFileInfo, appSettings); Assert.NotNull(items); Assert.Equal(items[0].AccessibilityResourceGroups[0].AccessibilityResources[0].Label, Resources[0].Label); Assert.Equal(items[0].AccessibilityResourceGroups[0].AccessibilityResources[0].Order, Resources[0].Order); Assert.Equal(items[0].AccessibilityResourceGroups[0].AccessibilityResources[0].ResourceCode, Resources[0].ResourceCode); Assert.Equal(items[0].AccessibilityResourceGroups[0].AccessibilityResources[0].ResourceTypeId, Resources[0].ResourceTypeId); Assert.Equal(items[0].SufficentEvidenceOfClaim, metadata.Metadata.SufficientEvidenceOfClaim); Assert.Equal(items[0].TargetAssessmentType, metadata.Metadata.TargetAssessmentType); Assert.Equal(items[0].Grade, GradeLevelsUtils.FromString(digest.GradeCode)); Assert.Equal(items[0].ItemKey, digest.ItemKey); Assert.Equal(items[0].BankKey, digest.BankKey); Assert.Equal(items[0].CoreStandards.CommonCoreStandardsDescription, coreStandardsRowCcss[0].Description); Assert.Equal(items[0].CoreStandards.TargetDescription, coreStandardsRowTarget[0].Description); Assert.Equal(items[0].InteractionType.Code, ItMath.Code); Assert.Equal(items[0].InteractionType.Label, ItMath.Label); Assert.Equal(items[0].Subject.Code, digest.SubjectCode); }