@@ -41,35 +41,35 @@ public void testPageTitleEdit() throws Exception
4141 Path path = new Path ();
4242
4343 // set your page path and site name
44- path .setPath ("/test-block-overrides " );
45- path .setSiteName ("bradley " );
44+ path .setPath ("/about " );
45+ path .setSiteName ("example.com " );
4646 toRead .setPath (path );
4747 toRead .setType (EntityTypeString .page );
4848
4949 Read read = new Read ();
5050 read .setIdentifier (toRead );
5151
5252 Authentication authentication = new Authentication ();
53- authentication .setUsername ("bradley.wagner " );
54- authentication .setPassword ("soosad " );
53+ authentication .setUsername ("admin " );
54+ authentication .setPassword ("admin " );
5555
5656 // read the asset
5757 AssetOperationHandlerServiceLocator serviceLocator = new AssetOperationHandlerServiceLocator ();
5858 AssetOperationHandler handler = serviceLocator .getAssetOperationService ();
5959 ReadResult result = handler .read (authentication , toRead );
60- assertTrue ("Read was not successful" , result .getSuccess ().equals ("true" ) ? true : false );
60+ assertTrue ("Read was not successful: " + result . getMessage () , result .getSuccess ().equals ("true" ) ? true : false );
6161
6262 // edit the title
6363 Asset readAsset = result .getAsset ();
6464 Page page = readAsset .getPage ();
6565 page .getMetadata ().setTitle ("new title" );
6666
6767 OperationResult editResult = handler .edit (authentication , readAsset );
68- assertTrue ("Edit was not successful" , editResult .getSuccess ().equals ("true" ) ? true : false );
68+ assertTrue ("Edit was not successful: " + result . getMessage () , editResult .getSuccess ().equals ("true" ) ? true : false );
6969
7070 // re-read to verify title change
7171 result = handler .read (authentication , toRead );
72- assertTrue ("Read was not successful" , result .getSuccess ().equals ("true" ) ? true : false );
72+ assertTrue ("Read was not successful: " + result . getMessage () , result .getSuccess ().equals ("true" ) ? true : false );
7373 assertEquals ("Title was not changed" , "new title" , result .getAsset ().getPage ().getMetadata ().getTitle ());
7474 }
7575}
0 commit comments