예제 #1
0
 public void TestSaveDateEntityAsync()
 {
     RunAndAwait( () =>
     {
       var EntityAsync = new DateEntityAsync {DateField = DateTime.Now};
       Backendless.Persistence.Save( EntityAsync,
                                 new ResponseCallback<DateEntityAsync>( this )
                                   {
                                     ResponseHandler = savedEntityAsync =>
                                       {
                                         Assert.IsNotNull( savedEntityAsync, "Server returned a null result" );
                                         Assert.IsNotNull( savedEntityAsync.DateField,
                                                           "Returned object doesn't have expected field" );
                                         Assert.IsNotNull( savedEntityAsync.ObjectId,
                                                           "Returned object doesn't have expected field id" );
                                         Assert.IsNotNull( savedEntityAsync.Created,
                                                           "Returned object doesn't have expected field created" );
                                         Assert.IsTrue(
                                           savedEntityAsync.DateField.Ticks - EntityAsync.DateField.Ticks < 1000,
                                           "Returned object has wrong field value" );
                                         CountDown();
                                       }
                                   } );
     } );
 }
예제 #2
0
 protected bool Equals( DateEntityAsync other )
 {
   return base.Equals( other ) && DateField.Equals( other.DateField );
 }
예제 #3
0
 protected bool Equals(DateEntityAsync other)
 {
     return(base.Equals(other) && DateField.Equals(other.DateField));
 }