Exemple #1
0
 public IEnumerable <VariableRepresentation> GetVariables()
 {
     string[] lines = File.ReadAllLines(Path);
     return(lines
            .Select(name =>
     {
         //string russianName = _transliterator.ToRussian(line);
         string phoneticName = PhoneticConverter.GetPhonetic(name);
         VariableRepresentation variableRepresentation = new VariableRepresentation(name, phoneticName, name.UpperNormalize());
         return variableRepresentation;
     }));
 }
Exemple #2
0
        public void Serializes_VariableRepresentation_as_proper_URIs(VariableRepresentation vr)
        {
            // given
            var iriTemplate = new IriTemplate
            {
                VariableRepresentation = vr
            };

            // when
            var jsonLd = this.Serializer.Serialize(iriTemplate);

            // then
            Assert.Equal(Vocab.Hydra.BaseUri + vr, jsonLd[Vocab.Hydra.variableRepresentation]["@id"].ToString());
        }