Exemplo n.º 1
0
        public void InvalidSecondOfTwoClassAncestors()
        {
            {
                var action = TraverserActions.CheckAncestors <InformationValue>(new[] { typeof(InformationGroup) }, new[] { typeof(InformationGroup) }) as ITraverserAction <InformationValue>;

                var basic    = new XElement("Basic");
                var detailed = new XElement("Detailed");
                var value    = new InformationValue(2, "Name", "Value", new List <FileLine>());
                var group    = new InformationGroup(1, "Name", new[] { value }, new List <FileLine>());
                var root     = new TestClass("child1", new[] { group });

                Assert.Throws(typeof(TraverserException), () => action.Act(value, new StandardErrorListener <TraverserException>()));
            }
        }
Exemplo n.º 2
0
        public void ValidTwoInterfaceAncestors()
        {
            {
                var action = TraverserActions.CheckAncestors <InformationValue>(new[] { typeof(IInformation) }, new[] { typeof(IHasIdentifier) }) as ITraverserAction <InformationValue>;

                var basic    = new XElement("Basic");
                var detailed = new XElement("Detailed");
                var value    = new InformationValue(2, "Name", "Value", new List <FileLine>());
                var group    = new InformationGroup(1, "Name", new[] { value }, new List <FileLine>());
                var root     = new TestClass("child1", new[] { group });

                Assert.DoesNotThrow(() => action.Act(value, new StandardErrorListener <TraverserException>()));
            }
        }
Exemplo n.º 3
0
 public string getInformationGroup()
 {
     return(InformationGroup.ToString());
 }
Exemplo n.º 4
0
 public string getInformationStudent()
 {
     return(" Education Information: " + EducationType + "| Groupe Information: " + InformationGroup.ToString()); //ChangeToRussian
 }