Esempio n. 1
0
 public void ChangesWithPrimaryKey()
 {
     RealtimePushTestTwoResponses(
         () => testTable.Get("3").Changes(),
         () =>
     {
         var result = connection.Run(testTable.Get("3").Update(o => new TestObject()
         {
             Name = "Updated!"
         }));
         result.Should().NotBeNull();
         result.Replaced.Should().Be(1);
     },
         response =>
     {
         // .Get().Changes() sends the initial value as the first streaming result
         response.OldValue.Should().BeNull();
         response.NewValue.Should().NotBeNull();
         response.NewValue.Name.Should().Be("3");
     },
         response =>
     {
         response.OldValue.Should().NotBeNull();
         response.OldValue.Name.Should().Be("3");
         response.NewValue.Should().NotBeNull();
         response.NewValue.Name.Should().Be("Updated!");
     }
         );
 }