public void GetConstraint_BuildUniqueItemWithSubsetOf_CorrectConstraint() { //Buiding object used during test var sutXml = new StructureXml(); sutXml.Item = new MeasureGroupsXml(); sutXml.Item.ConnectionString = ConnectionStringReader.GetAdomd(); ((MeasureGroupsXml)sutXml.Item).Perspective = "Perspective"; sutXml.Item.Caption = "MeasureGroup"; var ctrXml = new SubsetOf1xXml(); var builder = new StructureContainedInBuilder(); builder.Setup(sutXml, ctrXml); builder.Build(); var ctr = builder.GetConstraint(); Assert.That(ctr, Is.InstanceOf <ContainedInConstraint>()); }
public void GetConstraint_BuildMultipleItem_CorrectConstraint() { //Buiding object used during test var sutXml = new StructureXml(); sutXml.Item = new MeasureGroupsXml(); sutXml.Item.ConnectionString = ConnectionStringReader.GetAdomd(); ((MeasureGroupsXml)sutXml.Item).Perspective = "Perspective"; var ctrXml = new ContainedInXml(); ctrXml.Items.Add("Search 1"); ctrXml.Items.Add("Search 2"); ctrXml.Items.Add("Search 3"); var builder = new StructureContainedInBuilder(); builder.Setup(sutXml, ctrXml); builder.Build(); var ctr = builder.GetConstraint(); Assert.That(ctr, Is.InstanceOf <ContainedInConstraint>()); }