Exemplo n.º 1
0
        public void TestBasicUpdate()
        {
            BaseUpdateEntity baseUpdateEntity = new BaseUpdateEntity();
              baseUpdateEntity.Name = "foobar";
              baseUpdateEntity.Age = 20;

              BaseUpdateEntity savedEntity = Backendless.Persistence.Save( baseUpdateEntity );
              savedEntity.Name = "foobar1";
              savedEntity.Age = 21;

              Backendless.Persistence.Save( savedEntity );

              BaseUpdateEntity foundEntity = Backendless.Persistence.Of<BaseUpdateEntity>().Find().GetCurrentPage()[0];

              Assert.AreEqual( savedEntity, foundEntity, "Server didn't update an entity" );
              Assert.IsNotNull( foundEntity.Updated, "Server didn't set an updated field value" );
        }
Exemplo n.º 2
0
 protected bool Equals(BaseUpdateEntity other)
 {
     return(Age == other.Age && string.Equals(Name, other.Name) && string.Equals(ObjectId, other.ObjectId) && string.Equals(Created, other.Created));
 }
Exemplo n.º 3
0
 protected bool Equals( BaseUpdateEntity other )
 {
   return Age == other.Age && string.Equals( Name, other.Name ) && string.Equals( ObjectId, other.ObjectId ) && string.Equals( Created, other.Created );
 }