コード例 #1
0
 internal static UpdateDatasetFieldRequest GivenUpdateField(this DatasetTests tests)
 {
     return(new()
     {
         Description = "Updated",
         DisplayName = "Updated"
     });
 }
コード例 #2
0
 public static async Task EventuallyAssert(this DatasetTests tests, Func <Task> assert)
 {
     await Policy
     .Handle <AssertionException>()
     .WaitAndRetryAsync(6, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)))
     .ExecuteAsync(async() =>
     {
         await assert();
     });
 }
コード例 #3
0
 internal static Dataset GivenDataset(this DatasetTests tests)
 {
     return(new()
     {
         DatasetKey = $"netit-{Guid.NewGuid():n}",
         Description = "Dataset created by the IT tests of the smartobjects .net sdk",
         DisplayName = "Rainbow Dash",
         Fields = new List <DatasetField>
         {
             new()
             {
                 Key = "rainbowdash",
                 DisplayName = "The rainbow dash field",
                 Description = "Yolo description",
                 Type = new FieldType
                 {
                     HighLevelType = FieldHighLevelType.Acceleration
                 }
             }
         }
     });
 }