Пример #1
0
        public void Then_a_validation_exception_is_thrown(string value)
        {
            Action parse = () => SyncEmbedValue.Parse(value);

            parse
            .Should()
            .Throw <SyncEmbedValue.InvalidOptionException>();
        }
 public StreetNameSyndicationQuery(
     LegacyContext context,
     SyncEmbedValue embed)
 {
     _context     = context;
     _embedEvent  = embed?.Event ?? false;
     _embedObject = embed?.Object ?? false;
 }
 private static IRestRequest CreateBackendSyndicationRequest(
     string resourcename,
     long?from,
     int?limit,
     SyncEmbedValue embed)
 => new RestRequest($"{resourcename}/sync")
 .AddPagination(NoPaging, limit)
 .AddFiltering(new
 {
     position = from ?? 0,
     embed    = embed.ToString()
 });
Пример #4
0
 public void Then_object_is_set(string value)
 {
     SyncEmbedValue.Parse(value)
     .Object
     .Should().BeTrue();
 }
Пример #5
0
 public void Then_event_is_set(string value)
 {
     SyncEmbedValue.Parse(value)
     .Event
     .Should().BeTrue();
 }
Пример #6
0
 public When_parsing_an_empty_embed_string()
 {
     _sut = SyncEmbedValue.Parse("");
 }
Пример #7
0
 public PostalInformationSyndicationQuery(LegacyContext context, SyncEmbedValue embed)
 {
     _context     = context;
     _embedEvent  = embed?.Event ?? false;
     _embedObject = embed?.Object ?? false;
 }