Пример #1
0
 public void WriteRawValueWritesRawString()
 {
     RawValueWriter target = new RawValueWriter(this.settings, this.stream, new UTF32Encoding());
     const string value = "string value";
     target.WriteRawValue(value);
     this.StreamAsString(target).Should().Be(value);
 }
Пример #2
0
 public void WriteRawValueWritesTimeOfDay()
 {
     RawValueWriter target = new RawValueWriter(this.settings, this.stream, new UTF32Encoding());
     TimeOfDay value = new TimeOfDay(9, 47, 5, 900);
     target.WriteRawValue(value);
     this.StreamAsString(target).Should().Be("09:47:05.9000000");
 }
Пример #3
0
 public void WriteRawValueWritesDate()
 {
     RawValueWriter target = new RawValueWriter(this.settings, this.stream, new UTF32Encoding());
     Date value = new Date(2014, 9, 18);
     target.WriteRawValue(value);
     this.StreamAsString(target).Should().Be("2014-09-18");
 }
Пример #4
0
 public void WriteRawValueWritesGeometryValue()
 {
     RawValueWriter target = new RawValueWriter(this.settings, this.stream, new UTF32Encoding());
     var value2 = GeometryPoint.Create(1.2, 3.16);
     target.WriteRawValue(value2);
     this.StreamAsString(target).Should().Be("SRID=0;POINT (1.2 3.16)");
 }
Пример #5
0
 public void WriteRawValueWritesGeographyValue()
 {
     RawValueWriter target = new RawValueWriter(this.settings, this.stream, new UTF32Encoding());
     var value = GeographyPoint.Create(22.2, 22.2);
     target.WriteRawValue(value);
     this.StreamAsString(target).Should().Be("SRID=4326;POINT (22.2 22.2)");
 }