コード例 #1
0
 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( ) );
     }
 }
コード例 #2
0
 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( ) );
     }
 }