public void TestBasicUpdate() { RunAndAwait( () => { BaseUpdateEntityAsync baseUpdateEntity = new BaseUpdateEntityAsync(); baseUpdateEntity.Name = "foobar"; baseUpdateEntity.Age = 20; Backendless.Persistence.Save( baseUpdateEntity, new ResponseCallback<BaseUpdateEntityAsync>( this ) { ResponseHandler = savedEntity => { savedEntity.Name = "foobar1"; savedEntity.Age = 21; Backendless.Persistence.Save( savedEntity, new ResponseCallback<BaseUpdateEntityAsync>( this ) { ResponseHandler = response => { Backendless.Persistence .Of<BaseUpdateEntityAsync>() .Find( new ResponseCallback < BackendlessCollection <BaseUpdateEntityAsync> >( this ) { ResponseHandler = collection => { BaseUpdateEntityAsync foundEntity = collection .GetCurrentPage ()[0]; Assert.AreEqual ( savedEntity, foundEntity, "Server didn't update an entity" ); Assert .IsNotNull( foundEntity .Updated, "Server didn't set an updated field value" ); CountDown(); } } ); } } ); } } ); } ); }
protected bool Equals(BaseUpdateEntityAsync other) { return(Age == other.Age && string.Equals(Name, other.Name) && string.Equals(ObjectId, other.ObjectId) && string.Equals(Created, other.Created)); }
protected bool Equals( BaseUpdateEntityAsync other ) { return Age == other.Age && string.Equals(Name, other.Name) && string.Equals(ObjectId, other.ObjectId) && string.Equals(Created, other.Created); }