コード例 #1
0
ファイル: TestSPWebsProxy.cs プロジェクト: killbug2004/WSProf
        public void TestGetWebCollection()
        {
            SPWebsProxy proxy = new SPWebsProxy(SITE_URL2);
            KeyValuePair<string, string>[] webs = proxy.GetWebCollection();

            Assert.IsNotNull(webs);
        }
コード例 #2
0
ファイル: TestSPWebsProxy.cs プロジェクト: killbug2004/WSProf
        public void TestGetContentType()
        {
            SPWebsProxy proxy = new SPWebsProxy(SITE_URL3);
            SPContentTypeInfo contentType = proxy.GetContentType("0x01010099BCFB0D7A03B54D8334579650ECE57E");  // you can get this ID by using proxy.GetContentTypes() and iterating through the results

            Assert.IsNotNull(contentType);
            Assert.AreEqual("CustomDocumentContentType1", contentType.Name);
        }
コード例 #3
0
ファイル: TestSPWebsProxy.cs プロジェクト: killbug2004/WSProf
        public void TestGetContentTypes()
        {
            SPWebsProxy proxy = new SPWebsProxy(SITE_URL3);
            SPContentTypeInfo[] contentTypes = proxy.GetContentTypes();

            Assert.IsNotNull(contentTypes);
            Assert.Greater(contentTypes.Length, 0);
        }
コード例 #4
0
        public void TestInit( )
        {
            SPWebsProxy proxy = new SPWebsProxy( SITE_URL3 );
            SPContentTypeInfo contentType = proxy.GetContentType( "0x01010099BCFB0D7A03B54D8334579650ECE57E" );  // you can get this ID by using proxy.GetContentTypes() and iterating through the results

            Assert.IsNotNull( contentType );

            List<SPFieldInfo> fields = contentType.GetFields( );
            Assert.IsNotNull( fields );
            Assert.Greater( fields.Count, 0 );

            Assert.IsNotNull( FindByName( fields, "Title" ) );
            Assert.IsNotNull( FindByName( fields, "_Author" ) );
            Assert.IsNotNull( FindByName( fields, "Birthday" ) );
            Assert.IsNotNull( FindByName( fields, "CustomerID" ) );
            Assert.IsNotNull( FindByName( fields, "Hobbies" ) );
        }