コード例 #1
0
 public void EmitSinglePhysicalValue()
 {
     var fso = new FinalStateObject() { Name = "J1", BaseDefinition = null };
     var spq = new SinglePhysicalQuantity() { RefersToObject = fso, PhysicalQantity = "pT" };
     var ms = new StringWriter();
     spq.Emit(ms);
     var text = ms.ToString().Trim();
     Assert.AreEqual("atlas:physicalQuantity0 rdf:type dfs:PhysicalQuantity ;\r\n  dfs:refersToObject atlas:J1 ;\r\n  dfs:refersToFinalStateObjectProperty dfs:pT .", text);
 }
 /// <summary>
 /// List the various items
 /// </summary>
 /// <param name="singlePhysicalQuantity"></param>
 /// <returns></returns>
 private IEnumerable<FinalStateObject> ExtractFSOReferences(SinglePhysicalQuantity singlePhysicalQuantity)
 {
     if (singlePhysicalQuantity.RefersToObject != null)
         return new FinalStateObject[] { singlePhysicalQuantity.RefersToObject };
     return Enumerable.Empty<FinalStateObject>();
 }