public void EmitANDOR()
        {
            var n1 = new PhysicalValue() { Number = 51 };
            var n2 = new PhysicalValue() { Number = 52 };
            var sc1 = new SelectionCriteria()
            {
                BinaryRelation = ">",
                FirstArgument = n1,
                SecondArgument = n2
            };

            var n3 = new PhysicalValue() { Number = 53 };
            var n4 = new PhysicalValue() { Number = 54 };
            var sc2 = new SelectionCriteria()
            {
                BinaryRelation = "<",
                FirstArgument = n3,
                SecondArgument = n4
            };

            var andor = new ANDOR()
            {
                AOType = ANDORType.kAnd
            };
            andor.Arguments.Add(sc1);
            andor.Arguments.Add(sc2);

            var ms = new StringWriter();
            andor.Emit(ms);
            var text = ms.ToString().Split('\r').Select(l => l.Trim()).ToArray();

            Assert.AreEqual("atlas:number0 rdf:type qudt:QuantityValue ;", text[0]);
            Assert.AreEqual("qudt:numericValue \"51\"^^xsd:decimal .", text[1]);
            Assert.AreEqual("", text[2]);
            Assert.AreEqual("atlas:number1 rdf:type qudt:QuantityValue ;", text[3]);
            Assert.AreEqual("qudt:numericValue \"52\"^^xsd:decimal .", text[4]);
            Assert.AreEqual("", text[5]);

            Assert.AreEqual("atlas:selectionCriteria2 rdf:type dfs:SelectionCriteria ;", text[6]);
            Assert.AreEqual("dfs:usesBinaryRelation dfs:greaterThan ;", text[7]);
            Assert.AreEqual("dfs:hasFirstArgument atlas:number0 ;", text[8]);
            Assert.AreEqual("dfs:hasSecondArgument atlas:number1 .", text[9]);
            Assert.AreEqual("", text[10]);

            Assert.AreEqual("atlas:number3 rdf:type qudt:QuantityValue ;", text[11]);
            Assert.AreEqual("qudt:numericValue \"53\"^^xsd:decimal .", text[12]);
            Assert.AreEqual("", text[13]);
            Assert.AreEqual("atlas:number4 rdf:type qudt:QuantityValue ;", text[14]);
            Assert.AreEqual("qudt:numericValue \"54\"^^xsd:decimal .", text[15]);
            Assert.AreEqual("", text[16]);

            Assert.AreEqual("atlas:selectionCriteria5 rdf:type dfs:SelectionCriteria ;", text[17]);
            Assert.AreEqual("dfs:usesBinaryRelation dfs:lessThan ;", text[18]);
            Assert.AreEqual("dfs:hasFirstArgument atlas:number3 ;", text[19]);
            Assert.AreEqual("dfs:hasSecondArgument atlas:number4 .", text[20]);
            Assert.AreEqual("", text[21]);

            Assert.AreEqual("atlas:andor6 rdf:type dfs:And ;", text[22]);
            Assert.AreEqual("dfs:hasOperand atlas:selectionCriteria2 , atlas:selectionCriteria5 .", text[23]);
        }
 public void EmitPhysicalNumberUnit()
 {
     var pn = new PhysicalValue() { Number = 55.0, Unit = "GeV" };
     var ms = new StringWriter();
     pn.Emit(ms);
     var text = ms.ToString().Trim();
     Assert.AreEqual("atlas:number0 rdf:type qudt:QuantityValue ;\r\n  qudt:numericValue \"55\"^^xsd:decimal ;\r\n  qudt:unit unit:GigaElectronVolt .", text);
 }
        public void EmitSelectionCriteria()
        {
            var n1 = new PhysicalValue() { Number = 51 };
            var n2 = new PhysicalValue() { Number = 52 };
            var sc = new SelectionCriteria()
            {
                BinaryRelation = ">",
                FirstArgument = n1,
                SecondArgument = n2
            };
            var ms = new StringWriter();
            sc.Emit(ms);
            var text = ms.ToString().Split('\r').Select(l => l.Trim()).ToArray();
            Assert.AreEqual("atlas:number0 rdf:type qudt:QuantityValue ;", text[0]);
            Assert.AreEqual("qudt:numericValue \"51\"^^xsd:decimal .", text[1]);
            Assert.AreEqual("", text[2]);
            Assert.AreEqual("atlas:number1 rdf:type qudt:QuantityValue ;", text[3]);
            Assert.AreEqual("qudt:numericValue \"52\"^^xsd:decimal .", text[4]);
            Assert.AreEqual("", text[5]);

            Assert.AreEqual("atlas:selectionCriteria2 rdf:type dfs:SelectionCriteria ;", text[6]);
            Assert.AreEqual("dfs:usesBinaryRelation dfs:greaterThan ;", text[7]);
            Assert.AreEqual("dfs:hasFirstArgument atlas:number0 ;", text[8]);
            Assert.AreEqual("dfs:hasSecondArgument atlas:number1 .", text[9]);
        }
 /// <summary>
 /// A physical value has nothing.
 /// </summary>
 /// <param name="physicalValue"></param>
 /// <returns></returns>
 private IEnumerable<FinalStateObject> ExtractFSOReferences(PhysicalValue physicalValue)
 {
     return Enumerable.Empty<FinalStateObject>();
 }