public void TestCanResolve_Doc( ) { //documents have _CheckOutSrcUrl custom property { CustomPropResolver resolver = new CustomPropResolver( Workshare.TestUtils.TestFileUtils.MakeRootPathAbsolute( @"Test Files\Workshare.Connect.SharePoint.Common.Tests\Doc_With_CheckOutSrcUrl.doc" ) ); Assert.IsTrue( resolver.CanResolve( ) ); } //documents _don't_ have _CheckOutSrcUrl custom property { CustomPropResolver resolver = new CustomPropResolver( Workshare.TestUtils.TestFileUtils.MakeRootPathAbsolute( @"Test Files\Workshare.Connect.SharePoint.Common.Tests\Doc_WithOut_CheckOutSrcUrl.doc" ) ); Assert.IsFalse( resolver.CanResolve( ) ); } }
public void TestCanResolve_Docx( ) { //Workshare.TestUtils.TestFileUtils.MakeRootPathAbsolute( @"Test Files\Workshare.Connect.SharePoint.Common.Tests\Docx_With_CheckOutSrcUrl.docx" ) const string filename = @"C:\Documents and Settings\iainb\My Documents\SharePoint Drafts\deltaview original DOCX.docx"; //documents have _CheckOutSrcUrl custom property { CustomPropResolver resolver = new CustomPropResolver( filename ); Assert.IsTrue( resolver.CanResolve( ) ); } //documents _don't_ have _CheckOutSrcUrl custom property { CustomPropResolver resolver = new CustomPropResolver( filename ); Assert.IsFalse( resolver.CanResolve( ) ); } }