public void GetAllCommitsShouldReturnAListOfCommits() { var target = new Adapter(); var actual = target.GetAllCommits(username, repository, branch); Assert.IsTrue(actual.Count > 0); }
public static void MainDemo(string[] args) { // Create adapter and place a request Target t = new Adapter(); t.Request(); }
protected Runnable CreateProcedureFrom(string name, object model, params string[] parametersNames) { var procedureName = string.Format("RANDOM.{0}", name); var parameters = new Adapter().CreateParametersFrom(model, parametersNames); return Runnable.StoreProcedure(procedureName, parameters); }
public void GetBlobAll() { var adapter = new Adapter(); var blobAll = adapter.GetBlobAll(username, repository, branch,treeSha); var r = blobAll.GetHtmlFiles(); }
/// <summary> /// Creates a new instance of the <see cref="FolderBrowserEditor"/> class. /// </summary> /// <param name="adapter">The adapter to be configured.</param> /// <param name="parameterName">The name of the parameter to be configured.</param> /// <param name="connectionString">Parameters for the folder browser.</param> public FolderBrowserEditor(Adapter adapter, string parameterName, string connectionString) { InitializeComponent(); m_adapter = adapter; m_parameterName = parameterName; m_connectionString = connectionString; }
protected Runnable CreateProcedureFrom(string name, Dictionary<string, object> values) { var procedureName = string.Format("RANDOM.{0}", name); var parameters = new Adapter().CreateParametersFrom(values); return Runnable.StoreProcedure(procedureName, parameters); }
public static void Demo() { // Here, we need calling Request. // Create adapter and place a request Target target = new Adapter(); target.Request(); }
static void Main() { Target target = new Target(); target.Request(); Target target2 = new Adapter(); target2.Request(); }
public void ShouldStartAndStopNoSports() { var settings = new Mock<ISettings>(); settings.Setup(x => x.EventStateFilePath).Returns("."); var streamListenerManager = new StreamListenerManager(settings.Object); streamListenerManager.StateManager = _state.Object; var service = new Mock<IServiceFacade>(); service.Setup(x => x.IsConnected).Returns(true); var connector = new Mock<IAdapterPlugin>(); var listener = new Mock<IListener>(); settings.Setup(s => s.FixtureCheckerFrequency).Returns(10000); service.Setup(s => s.Connect()); var adapter = new Adapter( settings.Object, service.Object, connector.Object, streamListenerManager); adapter.Start(); adapter.Stop(); service.VerifyAll(); listener.Verify(l => l.Start(), Times.Never()); listener.Verify(l => l.Stop(), Times.Never()); }
public static void Adapter() { IAdapter adapter = new Adapter(); Console.WriteLine(adapter.Sum(10, 2)); Adaptee adaptee = new Adaptee(); Console.WriteLine(adaptee.OldSum(10.00, 10.00)); }
static void Main(string[] args) { Target target = new Adapter(); target.Request(); Console.ReadKey(); }
public Direct3D11Base(Form form, SwapChainDescription swapDesc, Adapter adapter = null, DriverType type = DriverType.Hardware, DeviceCreationFlags flags = DeviceCreationFlags.None, FeatureLevel[] levels = null) { IsDisposed = false; try { _isInitializing = true; _form = form; _isComposited = DwmApi.IsCompositionEnabled; if (_isComposited) { DwmApi.EnableMMCSS(true); DwmPresentParameters present = new DwmPresentParameters() { IsQueued = true, BufferCount = 2, RefreshesPerFrame = 1, }; DwmApi.SetPresentParameters(form.Handle, ref present); } if (swapDesc.OutputHandle != IntPtr.Zero) { throw new ArgumentException("Output handle must not be set."); } if (swapDesc.Usage != Usage.RenderTargetOutput) { throw new ArgumentException("Usage must be RenderTargetOutput."); } swapDesc.OutputHandle = _form.Handle; bool setFullscreen = !swapDesc.IsWindowed; swapDesc.IsWindowed = true; Device.CreateWithSwapChain(adapter, type, DeviceCreationFlags.None, levels, swapDesc, out _device, out _swapChain); _swapChain.ResizeTarget(swapDesc.ModeDescription); _factory = _swapChain.GetParent<Factory>(); _factory.SetWindowAssociation(_form.Handle, WindowAssociationFlags.IgnoreAll); _form.SizeChanged += SizeChanged_Handler; _form.ResizeBegin += ResizeBegin_Handler; _form.Resize += Resize_Handler; _form.ResizeEnd += ResizeEnd_Handler; _form.KeyDown += KeyDown_Handler; if (setFullscreen) { ChangeMode(true); } _isInitializing = false; } catch { Dispose(); throw; } }
public static void Test() { var target = new Target(); target.Request(); Target adapter = new Adapter(); adapter.Request(); }
public void GetBlobsRawDataShouldReturnADataString() { var adapter = new Adapter(); string sha = "fedbe8bd68dfd8d320dc2f486f1db3afb8d8ba13"; var result = adapter.GetBlobsRawData(username, repository, sha); Assert.IsFalse(string.IsNullOrEmpty(result)); }
void setupViewPager (Android.Support.V4.View.ViewPager viewPager) { var adapter = new Adapter (SupportFragmentManager); adapter.AddFragment (new CheeseListFragment (), "Category 1"); adapter.AddFragment (new CheeseListFragment (), "Category 2"); adapter.AddFragment (new CheeseListFragment (), "Category 3"); viewPager.Adapter = adapter; }
/// <summary> /// Creates a new instance of the <see cref="RetransmissionStatPicker"/> class. /// </summary> /// <param name="fileBlockReader">The file block reader adapter to be configured.</param> /// <param name="parameterName">Name of the connection string parameter to be modified.</param> public RetransmissionStatPicker(Adapter fileBlockReader, string parameterName) { InitializeComponent(); m_fileBlockReader = fileBlockReader; m_parameterName = parameterName; ViewModel.PropertyChanged += ViewModel_PropertyChanged; OriginalValueTextBox.Text = GetParameterValue(); }
protected App () { this._state = new State (); //TODO: this should be asynchronous, and when it's initialized, need to // call State.WireUpBleEvents // also, do the whole app initialization thing this._bleAdapter = new Adapter (); }
public override void Listen() { if (Window < Delta) throw new InvalidOperationException("Window is less than Delta"); adapter = new Adapter(this, device, Window, Delta); adapter.SampleRate = this.SampleRate; adapter.NotifyPointsInSecond = DefaultNotifyPointsInSecond; adapter.Start(); }
/// <summary> /// Creates a new instance of the <see cref="MeasurementEditor"/> class. /// </summary> /// <param name="adapter">The adapter to be configured.</param> /// <param name="parameterName">The name of the parameter being configured.</param> /// <param name="connectionString">Parameters which define how this control interacts with the user.</param> public MeasurementEditor(Adapter adapter, string parameterName, string connectionString) { InitializeComponent(); m_adapter = adapter; m_parameterName = parameterName; m_connectionString = connectionString; m_dispatcherTimer = new DispatcherTimer(); m_dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 1); m_dispatcherTimer.Tick += DispatcherTimer_Tick; }
public void GetBlobShouldReturnAValidValue() { var target = new Adapter(); string path = "2011/02022011/ValGardenTrip.htm"; //string path = "Linkedin/Summary.htm"; var actual = target.GetBlob(username, repository, treeSha, path); Assert.IsTrue(actual.Data != null); Assert.AreEqual((string)actual.MimeType, "text/html"); }
internal PSMethod(string name, Adapter adapter, object baseObject, object adapterData) { if (string.IsNullOrEmpty(name)) { throw PSTraceSource.NewArgumentException("name"); } base.name = name; this.adapterData = adapterData; this.adapter = adapter; this.baseObject = baseObject; }
protected void setupViewPager() { viewPager = FindViewById<Android.Support.V4.View.ViewPager>(Resource.Id.viewpager); if (viewPager != null) { var adapter = new Adapter(SupportFragmentManager); adapter.AddFragment(new PageViewFragment(), "View"); adapter.AddFragment(new PageEditFragment(), "Edit"); viewPager.Adapter = adapter; } }
private static unsafe void GetRamSizes(out UInt64 vram, Adapter adapter, out UInt64 svram) { // DedicatedSystemMemory = bios or DVMT preallocated video memory, that cannot be used by OS - need retest on pc with only cpu/chipset based graphic // DedicatedVideoMemory = discrete graphic video memory // SharedSystemMemory = aditional video memory, that can be taken from OS RAM when needed void* vramptr = ((IntPtr) (adapter.Description.DedicatedSystemMemory != 0 ? adapter.Description.DedicatedSystemMemory : adapter.Description.DedicatedVideoMemory)).ToPointer(); vram = (UInt64) vramptr; void* svramptr = ((IntPtr) adapter.Description.SharedSystemMemory).ToPointer(); svram = (UInt64) svramptr; }
static void Main(string[] args) { ////Class Adapter; //ITarget target = new Adapter(); //target.Request(); //Object Adapter ITarget target = new Adapter(); target.Request(); Console.Read(); }
public void Main() { // Showing the Adapteee in standalone mode var first = new Adaptee(); Console.Write("Before the new standard\nPrecise reading: "); Console.WriteLine(first.SpecificRequest(5, 3)); // What the client really wants ITarget second = new Adapter(); Console.WriteLine("\nMoving to the new standard"); Console.WriteLine(second.Request(5)); }
public static void Run() { // 1) // Ми можемо користуватися новою системою без проблем var newElectricitySystem = new NewElectricitySystem(); ElectricityConsumer.ChargeNotebook(newElectricitySystem); // 2) // Ми повинні адаптуватися до старої системи, використовуючи адаптер var oldElectricitySystem = new OldElectricitySystem(); var adapter = new Adapter(oldElectricitySystem); ElectricityConsumer.ChargeNotebook(adapter); }
private static void PrintAdapterOutputs(Adapter adapter) { var outputCount = adapter.GetOutputCount(); for (var outputIndex = 0; outputIndex < outputCount; ++outputIndex) { using (var output = adapter.GetOutput(outputIndex)) { Console.WriteLine(" Output Index: {0}", outputIndex); foreach (var descProperty in output.Description.GetType().GetProperties()) { Console.WriteLine(" {0}: {1}", ParseName(descProperty.Name), descProperty.GetValue(output.Description, null)); } foreach (var format in Enum.GetValues(typeof(Format))) { PrintDisplayModes(output, (Format)format); } } } }
private void InitLayout() { this.padding1 = new Padding(0.0, 1.0 / 6.0); this.Children.Add(this.padding1); this.padding5 = new Padding(0.0, 1.0 - (1.0 - 0.01) * (1.0 - 0.02)); this.padding1.Children.Add(this.padding5); this.box1 = new Box(Direction.Vertical); this.padding5.Children.Add(this.box1); this.adapter1 = new Adapter(Direction.Horizontal); this.box1.Children.Add(this.adapter1); this.box2 = new Box(Direction.Horizontal); this.adapter1.Children.Add(this.box2); this.padding2 = new Padding(0.06, 0.04); this.box2.Children.Add(this.padding2); this.graveyardPlaceholder = new CardPlaceholderWidget(); this.padding2.Children.Add(this.graveyardPlaceholder); this.padding3 = new Padding(0.06, 0.04); this.box2.Children.Add(this.padding3); this.overlay1 = new Overlay(); this.padding3.Children.Add(this.overlay1); this.deckPlaceholder = new CardPlaceholderWidget(); this.overlay1.Children.Add(this.deckPlaceholder); this.padding4 = new Padding(0.02, 0.04); this.box1.Children.Add(this.padding4); this.solidColor1 = new SolidColor(); this.solidColor1.Color = new Cairo.Color(0.25, 0.25, 0.25, 0.3); this.padding4.Children.Add(this.solidColor1); this.selectionPlaceholder = new GeneralPlaceholderWidget(); this.solidColor1.Children.Add(this.selectionPlaceholder); }
private void btn_aceptar_alta_Click(object sender, EventArgs e) { var cant = runner.Single("SELECT COUNT(*) as cant FROM SIGKILL.rol WHERE rol_nombre='{0}'", txtNombre.Text); if (txtNombre.Text.Length == 0 || (int)cant["cant"]==1) { MessageBox.Show("No ingresaste el nombre o el nombre ya existe"); return; } int hab=0; if (chk_habilitado.Checked) hab=1; runner.Insert("INSERT INTO SIGKILL.rol(rol_nombre,rol_habilitado) VALUES ('{0}',{1})", txtNombre.Text, hab.ToString()); var res=runner.Single("SELECT * FROM SIGKILL.rol WHERE rol_nombre='{0}'", txtNombre.Text); Rol newrol = new Adapter().Transform<Rol>(res); foreach(var f in checkedListBox1.CheckedItems){ runner.Insert("INSERT INTO SIGKILL.func_rol(frol_rol,frol_funcionalidad) VALUES ({0},{1})",newrol.rol_id.ToString(),(checkedListBox1.Items.IndexOf(f)+1).ToString()); } MessageBox.Show("Rol ingresado Correctamente"); }
static void Main(string[] args) { Console.WriteLine("Pluggable Adaptor"); Adapter calculatorOriginal = new Adapter(new Adaptee()); Console.WriteLine(calculatorOriginal.Request(5, 3)); Adapter calculatorStandard = new Adapter(new Target()); Console.WriteLine(calculatorStandard.Request(5, 3)); Console.ReadLine(); /* * Output: * * Pluggable Adaptor * (Precised) Estimate is 2 * (Standard) Estimate is 2 * */ }
/// <summary> /// Creates a new shopping list for the current user. /// </summary> /// <param name="list">A ShoppingList object containing a normalized shopping list.</param> /// <returns>A result indicating the ID assigned to the newly created list.</returns> public virtual ShoppingListResult CreateShoppingList(ShoppingList list) { return(Adapter.CreateShoppingList(Identity, list)); }
public void RefreshContent() { if (DesignMode || Adapter == null || Adapter.Session == null) { return; } /*2009-02-28Liao*/ if (m_UnitID.Length != 3) { return; } string strID = "S6" + m_UnitID.Substring(2, 1); Adapter.set_URIParameters("CCMID", m_UnitID); Adapter.set_URIParameters("HeatID", m_CurHeatID); foreach (Control cSpeedTemp in gbxSpeedTemp.Controls) { if (cSpeedTemp is AppSvrHMI.L3DataBox) { ((AppSvrHMI.L3DataBox)cSpeedTemp).DataObject = "XGMESLogic\\CCMMag\\CCCM_Unit_Mag\\{CCMID}"; } } foreach (Control cCasting in gbxCasting.Controls) { if (cCasting is AppSvrHMI.L3DataBox) { ((AppSvrHMI.L3DataBox)cCasting).DataObject = "XGMESLogic\\CCMMag\\CCCM_Unit_Mag\\{CCMID}"; } } dbxCutInformation.DataObject = "XGMESLogic\\CCMMag\\CCCM_Unit_Mag\\{CCMID}"; dsCutInfo.SourceCondition = "CasterID = '" + m_UnitID + "' and CUT_MARK = '0' order by Log_Time desc"; dsPlan.SourceCondition = "CasterID='" + m_UnitID + "' and Status > 10 and (CreateDate >=(select SYSDATE from dual) -0.1667 or( CreateDate < (select SYSDATE from dual) -0.1667 and Status < 13)) order by Caster_Status desc,RH_Status desc,LF_Status desc,Side_Status desc,BOF_Status desc"; dsArrivleCCMSteel.SourceCondition = "Position ='" + m_UnitID + "' || 'P01' order by Idx"; string strSQLPlan = ""; strSQLPlan += "SELECT a.heatid, a.planid, a.steelgradeindex, a.lfid, a.rhid, a.casterid,"; strSQLPlan += " a.status, a.createdate, a.preheatid, a.pre_steelgradeindex, "; strSQLPlan += " a.pre_steelgrade, a.bofid, a.bof_status, a.lf_status, a.rh_status,"; strSQLPlan += " a.caster_status, a.side_status, a.casting_no, a.casting_heat_cnt, "; strSQLPlan += " a.fir_heat_flag, a.div_heatid, a.plan_ord_id, a.destitation,a.AIM_TAPPED_WEIGHT,a.REFINE_TYPE, a.HOT_SEND_FLAG,a.STEEL_RETURN_FLAG,a.STEEL_BACK_FLAG,a.LENGTH,a.WIDTH,a.THICKNESS , "; strSQLPlan += " b.steelgrade, b.protocol ,c.other_tech_request "; strSQLPlan += " FROM cplan_tapping a, cqa_steelgradeindex_r b ,cplan_order c "; //清空数据 dsPlan.SourceMethod = strSQLPlan + " where 1 = 2"; strSQLPlan += " WHERE a.steelgradeindex = b.steelgradeindex "; strSQLPlan += " AND a.CASTERID = '" + strID + "' "; strSQLPlan += " AND a.plan_ord_id = c.planid "; strSQLPlan += " AND a.status > 10 "; strSQLPlan += " AND ( a.createdate >= (SELECT SYSDATE "; strSQLPlan += " FROM DUAL) - 0.1667 "; strSQLPlan += " OR (a.createdate < (SELECT SYSDATE "; strSQLPlan += " FROM DUAL) - 0.1667 AND a.status < 13) "; strSQLPlan += " ) "; strSQLPlan += "ORDER BY LF_Status desc ,Side_Status desc ,BOF_Status desc "; dsPlan.SourceMethod = strSQLPlan; Adapter.RefreshDataBindings(); }
/// <summary> /// Deletes one or more shopping lists owned by the current user. /// </summary> /// <param name="lists">One or more shopping lists to delete. Note, the default shopping list cannot be deleted.</param> public virtual void DeleteShoppingLists(ShoppingList[] lists) { Adapter.DeleteShoppingLists(Identity, lists); }
public void MSVIEWSS_S05_TC03_UpdateViewHtml2_GroupByAndCollapse() { this.Site.Assume.IsTrue(Common.IsRequirementEnabled(8016, this.Site), @"The test case is executed only when R8016Enabled is set to true."); this.Site.Assume.IsTrue(Common.IsRequirementEnabled(1507, this.Site), @"The test case is executed only when R1507Enabled is set to true."); // Add a view. string viewName = this.AddView(false, Query.EmptyQueryInfo, ViewType.Grid); string updatedDisplayName = this.GenerateRandomString(6); UpdateViewHtml2ViewProperties viewProperties = this.GetViewProperties(false, updatedDisplayName, false, ViewScope.RecursiveAll); UpdateViewHtml2Toolbar toolbar; UpdateViewHtml2ViewHeader viewHeader; UpdateViewHtml2ViewBody viewBody; UpdateViewHtml2ViewFooter viewFooter; UpdateViewHtml2ViewEmpty viewEmpty; UpdateViewHtml2RowLimitExceeded rowLimitExceeded; this.GetHtmlConfigure( out toolbar, out viewHeader, out viewBody, out viewFooter, out viewEmpty, out rowLimitExceeded); UpdateViewHtml2Query queryValue = new UpdateViewHtml2Query(); // Make the query have GroupBy condition and Collapse as false. queryValue.Query = this.GetCamlQueryRoot(Query.IsNotCollapse, false); UpdateViewHtml2ViewFields viewFields = new UpdateViewHtml2ViewFields(); viewFields.ViewFields = this.GetViewFields(false); UpdateViewHtml2Aggregations aggregations = new UpdateViewHtml2Aggregations(); string aggregationsType = Common.GetConfigurationPropertyValue("FieldRefAggregations_AggregationsType", this.Site); aggregations.Aggregations = this.GetAggregationsDefinition(true, true, aggregationsType); UpdateViewHtml2Formats formats = new UpdateViewHtml2Formats(); formats.Formats = this.GetViewFormatDefinitions(); UpdateViewHtml2RowLimit rowLimitValue = new UpdateViewHtml2RowLimit(); rowLimitValue.RowLimit = this.GetAvailableRowLimitDefinition(); string openApplicationExtension = Common.GetConfigurationPropertyValue("OpenApplicationExtension", this.Site); // Call UpdateViewHtml2 to update the view with a query having GroupBy condition and Collapse as false. UpdateViewHtml2ResponseUpdateViewHtml2Result updateViewHtml2Re = Adapter.UpdateViewHtml2( TestSuiteBase.ListGUID, viewName, viewProperties, toolbar, viewHeader, viewBody, viewFooter, viewEmpty, rowLimitExceeded, queryValue, viewFields, aggregations, formats, rowLimitValue, openApplicationExtension); this.Site.Assert.IsNotNull(updateViewHtml2Re, "The updated view html2 should be got successfully."); this.Site.Assert.IsNotNull(updateViewHtml2Re.View, "There should be a view element returned from a successful UpdateViewHtml2 operation."); // Get the count of the items in the view. int itemGroupByCount = TestSuiteBase.SutControlAdapter.GetItemsCount(TestSuiteBase.ListGUID, viewName); int expectAllItemsCount = int.Parse(Common.GetConfigurationPropertyValue("AllItemsCount", this.Site)); // Verify Requirement MS-WSSCAML_R67, if the item count in the view returned from the server is the same with the count of all list items. Site.CaptureRequirementIfAreEqual(expectAllItemsCount, itemGroupByCount, "MS-WSSCAML", 67, @"[In Attributes] Otherwise[In GroupByDefinition: If Collapse is false], the number of rows in the result set MUST NOT be affected by the GroupBy element."); // Make the query have GroupBy condition and Collapse as true, while the referenced view fields have no computed fields. queryValue.Query = this.GetCamlQueryRoot(Query.IsCollapse, false); // Call UpdateViewHtml2 to update the view with a query having GroupBy condition and Collapse as true, while the referenced view fields have no computed fields. updateViewHtml2Re = Adapter.UpdateViewHtml2( TestSuiteBase.ListGUID, viewName, viewProperties, toolbar, viewHeader, viewBody, viewFooter, viewEmpty, rowLimitExceeded, queryValue, viewFields, aggregations, formats, rowLimitValue, openApplicationExtension); this.Site.Assert.IsNotNull(updateViewHtml2Re, "The updated view html2 should be got successfully."); this.Site.Assert.IsNotNull(updateViewHtml2Re.View, "There should be a view element returned from a successful UpdateViewHtml2 operation."); int itemCollapseCount = TestSuiteBase.SutControlAdapter.GetItemsCount(TestSuiteBase.ListGUID, viewName); int expectItemCollapseCount = int.Parse(Common.GetConfigurationPropertyValue("AllItemsCount", this.Site)); // Verify Requirement MS-VIEWSS_R1507, if the item count in the view returned from the server is the same with the count of all items in the list. Site.CaptureRequirementIfAreEqual <int>(expectItemCollapseCount, itemCollapseCount, 1507, @"[In Appendix B: Product Behavior] Implementation does not restrict the number of rows present in the result set to the number of unique tuples where a tuple is a set of field values when there aren't any computed fields in the ViewFields section if Collapse is true.(Windows SharePoint Services 2.0 and above products follow this behavior.)"); }
public void MSFSSHTTP_FSSHTTPB_S01_TC01_DownloadContents_EmptyUrl() { if ((!Common.IsRequirementEnabled("MS-FSSHTTP-FSSHTTPB", 3008, this.Site)) && (!Common.IsRequirementEnabled("MS-FSSHTTP-FSSHTTPB", 3009, this.Site))) { Site.Assume.Inconclusive("Implementation does not have same behaviors as Microsoft products."); } // Initialize the context using user01 and defaultFileUrl. this.InitializeContext(this.DefaultFileUrl, this.UserName01, this.Password01, this.Domain); CellStorageResponse response = new CellStorageResponse(); bool isR3008Verified = false; try { // Query the updated file content. CellSubRequestType queryChange = SharedTestSuiteHelper.CreateCellSubRequestEmbeddedQueryChanges(SequenceNumberGenerator.GetCurrentFSSHTTPBSubRequestID()); response = Adapter.CellStorageRequest(string.Empty, new SubRequestType[] { queryChange }); } catch (System.Xml.XmlException exception) { string message = exception.Message; isR3008Verified = message.Contains("Duplicate attribute"); isR3008Verified &= message.Contains("ErrorCode"); } if (SharedContext.Current.IsMsFsshttpRequirementsCaptured) { // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R3008 if (Common.IsRequirementEnabled("MS-FSSHTTP-FSSHTTPB", 3008, this.Site)) { Site.Log.Add( LogEntryKind.Debug, "SharePoint server 2010 and SharePoint Foundation responses two ErrorCode attributes when the URL is empty."); Site.CaptureRequirementIfIsTrue( isR3008Verified, "MS-FSSHTTP", 3008, @"[In Appendix B: Product Behavior] If the Url attribute of the corresponding Request element is an empty string, the implementation does return two ErrorCode attributes in Response element. <8> Section 2.2.3.5: SharePoint Server 2010 will return 2 ErrorCode attributes in Response element."); } // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R3009 if (Common.IsRequirementEnabled("MS-FSSHTTP-FSSHTTPB", 3009, this.Site)) { Site.CaptureRequirementIfIsNull( response.ResponseCollection, "MS-FSSHTTP", 3009, @"[In Appendix B: Product Behavior] If the Url attribute of the corresponding Request element is an empty string, the implementation does not return Response element. <8> Section 2.2.3.5: SharePoint Server 2013 will not return Response element."); } } else { if (Common.IsRequirementEnabled("MS-FSSHTTP-FSSHTTPB", 3008, this.Site)) { Site.Log.Add( LogEntryKind.Debug, "SharePoint server 2010 and SharePoint Foundation responses two ErrorCode attributes when the URL is non exists."); Site.Assert.IsTrue( isR3008Verified, "SharePoint server 2010 and SharePoint Foundation responses two ErrorCode attributes when the URL is non exists."); } if (Common.IsRequirementEnabled("MS-FSSHTTP-FSSHTTPB", 3009, this.Site)) { Site.Assert.IsNull( response.ResponseCollection, @"[In Appendix B: Product Behavior] If the Url attribute of the corresponding Request element is an empty string, the implementation does not return Response element. <8> Section 2.2.3.5: SharePoint Server 2013 will not return Response element."); } } }
public void AdapterPatternCodeTest() { Target adapter = new Adapter(); adapter.Request(); }
public async Task<ApiResponse<Adapter>> CreateAdapterAsync(Adapter adapter) { adapter.ProviderId = (int)adapter.Provider.Id; adapter.Provider = null; return await InvokeApiPostRequestAsync<Adapter, Adapter>("api/adapters/new", adapter); }
public Product GetById(int id) { return(Adapter.LoadObject <Product>( "dbo.Product_Product_SelectById", new[] { SqlDbParameter.Instance.BuildParameter("@id", id, System.Data.SqlDbType.Int) } ).FirstOrDefault()); }
/// <summary> /// Deletes one or more menus owned by the current user. /// </summary> /// <param name="menuIds">One or more menus to delete. Note, the Favorites menu cannot be deleted.</param> public virtual void DeleteMenus(params Guid[] menuIds) { Adapter.DeleteMenus(Identity, menuIds); }
public FunctionalityManager(Adapter adapter) : base(adapter) { }
/// <summary>Creates the default database schema in the configured database.</summary> public void InitializeStore() { Adapter.InitializeStore(); }
public void MSVIEWSS_S05_TC07_UpdateViewHtml2_InvalidListName() { this.Site.Assume.IsTrue(Common.IsRequirementEnabled(8016, this.Site), @"The test case is executed only when R8016Enabled is set to true."); // Add a view. string viewName = this.AddView(false, Query.AvailableQueryInfo, ViewType.Html); string listName = this.GenerateRandomString(8); string updatedDisplayName = this.GenerateRandomString(6); UpdateViewHtml2ViewProperties viewProperties = this.GetViewProperties(false, updatedDisplayName, false, ViewScope.Recursive); UpdateViewHtml2Toolbar toolbar; UpdateViewHtml2ViewHeader viewHeader; UpdateViewHtml2ViewBody viewBody; UpdateViewHtml2ViewFooter viewFooter; UpdateViewHtml2ViewEmpty viewEmpty; UpdateViewHtml2RowLimitExceeded rowLimitExceeded; this.GetHtmlConfigure( out toolbar, out viewHeader, out viewBody, out viewFooter, out viewEmpty, out rowLimitExceeded); UpdateViewHtml2Query queryValue = new UpdateViewHtml2Query(); queryValue.Query = this.GetCamlQueryRoot(Query.AvailableQueryInfo, false); UpdateViewHtml2ViewFields viewFields = new UpdateViewHtml2ViewFields(); viewFields.ViewFields = this.GetViewFields(false); UpdateViewHtml2Aggregations aggregations = new UpdateViewHtml2Aggregations(); string aggregationsType = Common.GetConfigurationPropertyValue("FieldRefAggregations_AggregationsType", this.Site); aggregations.Aggregations = this.GetAggregationsDefinition(true, true, aggregationsType); UpdateViewHtml2Formats formats = new UpdateViewHtml2Formats(); formats.Formats = this.GetViewFormatDefinitions(); UpdateViewHtml2RowLimit rowLimitValue = new UpdateViewHtml2RowLimit(); rowLimitValue.RowLimit = this.GetAvailableRowLimitDefinition(); string openApplicationExtension = Common.GetConfigurationPropertyValue("OpenApplicationExtension", this.Site); bool caughtSoapException = false; try { // Call UpdateViewHtml2 operation with invalid list name. Adapter.UpdateViewHtml2( listName, viewName, viewProperties, toolbar, viewHeader, viewBody, viewFooter, viewEmpty, rowLimitExceeded, queryValue, viewFields, aggregations, formats, rowLimitValue, openApplicationExtension); } catch (SoapException soapException) { caughtSoapException = true; // Verify Requirement MS-VIEWSS_R13, if the server returns a SOAP fault message. Site.CaptureRequirementIfIsNotNull(soapException, 13, @"[In listName] If the value of listName element is not the name or GUID of a list (1), the operation MUST return a SOAP fault message."); } this.Site.Assert.IsTrue(caughtSoapException, "There should be a SOAP exception in the response."); }
public void MSVIEWSS_S05_TC05_UpdateViewHtml2_EmptyViewName() { this.Site.Assume.IsTrue(Common.IsRequirementEnabled(8016, this.Site), @"The test case is executed only when R8016Enabled is set to true."); string listName = TestSuiteBase.ListGUID; // Add a default view. this.AddView(true, Query.EmptyQueryInfo, ViewType.Grid); string updatedDisplayName = this.GenerateRandomString(6); UpdateViewHtml2ViewProperties viewProperties = this.GetViewProperties(false, updatedDisplayName, false, ViewScope.Recursive); UpdateViewHtml2Toolbar toolbar; UpdateViewHtml2ViewHeader viewHeader; UpdateViewHtml2ViewBody viewBody; UpdateViewHtml2ViewFooter viewFooter; UpdateViewHtml2ViewEmpty viewEmpty; UpdateViewHtml2RowLimitExceeded rowLimitExceeded; this.GetHtmlConfigure( out toolbar, out viewHeader, out viewBody, out viewFooter, out viewEmpty, out rowLimitExceeded); UpdateViewHtml2Query queryValue = new UpdateViewHtml2Query(); queryValue.Query = this.GetCamlQueryRoot(Query.IsNotCollapse, false); UpdateViewHtml2ViewFields viewFields = new UpdateViewHtml2ViewFields(); viewFields.ViewFields = this.GetViewFields(false); UpdateViewHtml2Aggregations aggregations = new UpdateViewHtml2Aggregations(); string aggregationsType = Common.GetConfigurationPropertyValue("FieldRefAggregations_AggregationsType", this.Site); aggregations.Aggregations = this.GetAggregationsDefinition(true, true, aggregationsType); UpdateViewHtml2Formats formats = new UpdateViewHtml2Formats(); formats.Formats = this.GetViewFormatDefinitions(); UpdateViewHtml2RowLimit rowLimitValue = new UpdateViewHtml2RowLimit(); rowLimitValue.RowLimit = this.GetAvailableRowLimitDefinition(); string openApplicationExtension = Common.GetConfigurationPropertyValue("OpenApplicationExtension", this.Site); // Call UpdateViewHtml2 operation with empty view name. UpdateViewHtml2ResponseUpdateViewHtml2Result updateViewHtml2Re = Adapter.UpdateViewHtml2( listName, string.Empty, viewProperties, toolbar, viewHeader, viewBody, viewFooter, viewEmpty, rowLimitExceeded, queryValue, viewFields, aggregations, formats, rowLimitValue, openApplicationExtension); this.Site.Assert.IsNotNull(updateViewHtml2Re, "The updated view html2 should be got successfully."); this.Site.Assert.IsNotNull(updateViewHtml2Re.View, "There should be a view element returned from a successful UpdateViewHtml2 operation."); this.Site.Assert.IsNotNull(updateViewHtml2Re.View.DefaultView, "The response element \"updateViewHtml2Re.View.DefaultView\" should not be null."); bool isDefaultView = Convert.ToBoolean(updateViewHtml2Re.View.DefaultView); // Verify Requirement MS-VIEWSS_R2302, if the server returns the default view back. Site.CaptureRequirementIfIsTrue(isDefaultView, 2302, @"[In viewName] When the value of viewName element is empty, the protocol server MUST refer to the default list view of the list (1)."); }
public void MSVIEWSS_S05_TC01_UpdateViewHtml2_Success() { this.Site.Assume.IsTrue(Common.IsRequirementEnabled(8016, this.Site), @"The test case is executed only when R8016Enabled is set to true."); // Add a view. string viewName = this.AddView(false, Query.EmptyQueryInfo, ViewType.Html); string updatedDisplayName = this.GenerateRandomString(6); UpdateViewHtml2ViewProperties viewProperties = this.GetViewProperties(false, updatedDisplayName, false, ViewScope.Recursive); UpdateViewHtml2Toolbar toolbar; UpdateViewHtml2ViewHeader viewHeader; UpdateViewHtml2ViewBody viewBody; UpdateViewHtml2ViewFooter viewFooter; UpdateViewHtml2ViewEmpty viewEmpty; UpdateViewHtml2RowLimitExceeded rowLimitExceeded; this.GetHtmlConfigure( out toolbar, out viewHeader, out viewBody, out viewFooter, out viewEmpty, out rowLimitExceeded); UpdateViewHtml2Query queryValue = new UpdateViewHtml2Query(); queryValue.Query = this.GetCamlQueryRoot(Query.AvailableQueryInfo, false); UpdateViewHtml2ViewFields viewFields = new UpdateViewHtml2ViewFields(); viewFields.ViewFields = this.GetViewFields(false); UpdateViewHtml2Aggregations aggregations = new UpdateViewHtml2Aggregations(); string aggregationsType = Common.GetConfigurationPropertyValue("FieldRefAggregations_AggregationsType", this.Site); aggregations.Aggregations = this.GetAggregationsDefinition(true, true, aggregationsType); UpdateViewHtml2Formats formats = new UpdateViewHtml2Formats(); formats.Formats = this.GetViewFormatDefinitions(); UpdateViewHtml2RowLimit rowLimitValue = new UpdateViewHtml2RowLimit(); rowLimitValue.RowLimit = this.GetAvailableRowLimitDefinition(); string openApplicationExtension = Common.GetConfigurationPropertyValue("OpenApplicationExtension", this.Site); // Call UpdateViewHtml2 to update the view including display properties and the possibility to be rendered with extended application. // All optional parameters in the request of UpdateViewHtml2 are present in this call. UpdateViewHtml2ResponseUpdateViewHtml2Result updateViewHtml2Re = Adapter.UpdateViewHtml2( TestSuiteBase.ListGUID, viewName, viewProperties, toolbar, viewHeader, viewBody, viewFooter, viewEmpty, rowLimitExceeded, queryValue, viewFields, aggregations, formats, rowLimitValue, openApplicationExtension); this.Site.Assert.IsNotNull(updateViewHtml2Re, "There should be a result element returned from the UpdateViewHtml2 operation."); // Verify Requirement MS-VIEWSS_R145, if the server returns a View element in the update result. Site.CaptureRequirementIfIsNotNull(updateViewHtml2Re.View, 145, @"[In UpdateViewHtml2Response] UpdateViewHtml2Result: If the protocol server successfully updates the list view, it MUST return a View element that specifies the list view."); this.Site.Assert.IsNotNull(updateViewHtml2Re.View.DisplayName, "The response element \"updateViewHtml2Re.View.DisplayName\" should not be null."); this.Site.Assert.AreEqual(viewProperties.View.DisplayName, updateViewHtml2Re.View.DisplayName, "The display name should be the same as updated."); // Verify Requirement MS-VIEWSS_R8016, if the server returns a View element in the update result that indicates the UpdateViewHTML2 operation succeed on the server. Site.CaptureRequirementIfIsNotNull(updateViewHtml2Re.View, 8016, @"[In Appendix B: Product Behavior] Implementation does support this method[UpdateViewHtml2]. (Windows SharePoint Services 3.0 and above products follow this behavior.)"); }
public async Task<ApiResponse<bool>> DeleteAdapterAsync(Adapter adapter) { return await InvokeApiDeleteRequestAsync<bool>($"api/adapters/{adapter.Id}"); }
/// <summary> /// Updates a specified menu owned by the current user. /// </summary> /// <param name="menuId">The Menu ID to update, or null to update the Favorites menu.</param> /// <param name="recipesAdd">A list of recipe IDs to add to the menu. Duplicates will be ignored.</param> /// <param name="recipesRemove">A list of recipe IDs to remove from the menu.</param> /// <param name="recipesMove">A list of items to move from this menu to another menu.</param> /// <param name="clear">If true, all recipes will be removed from this menu.</param> /// <param name="newName">An optional new name for this menu. Note, the favorites menu cannot be renamed.</param> /// <returns></returns> public virtual MenuResult UpdateMenu(Guid?menuId, Guid[] recipesAdd, Guid[] recipesRemove, MenuMove[] recipesMove, bool clear, string newName = null) { return(Adapter.UpdateMenu(Identity, menuId, recipesAdd, recipesRemove, recipesMove, clear, newName)); }
/// <summary> /// Checks if module (online) is ready /// </summary> /// <param name="adapter">Element to check</param> /// <returns> /// <br>True: if module is ready</br> /// <br>False: if module is not ready</br> /// </returns> public bool IsModuleOnlineReady(Adapter adapter) { // EH.PCPS.TestAutomation.Common.Tools.Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Entered"); return(adapter != null && adapter.Enabled); }
public async Task<ApiResponse<Adapter>> UpdateAdapterAsync(Adapter adapter) { var api = await InvokeApiPutRequestAsync<Adapter>($"api/adapters/{adapter.Id}", adapter); return api; }
public override int GetHashCode() { return(Adapter.GetHashCode() ^ Connection.GetHashCode() ^ Adapter.GetHashCode() ^ DataGrid.GetHashCode()); }
public List <Product> GetAll() { return(Adapter.LoadObject <Product>( "dbo.Product_Product_SelectAll")); }
/// <summary> /// 解释整个表达式信息。 /// </summary> /// <param name="DbParameters">用于缓存在解释过程中可能会产生的参数。</param> /// <returns></returns> public override string Parsing(ref List <IDbDataParameter> DbParameters) { ExpDescription expDes = (ExpDescription)this.Description; StringBuilder cBuffer = new StringBuilder(); string paramName = string.Empty; foreach (object item in expDes.ExpElements) { // 如果是命令元素描述对象,则调用它相应的解释器。 if (item is IDescription) { IDescription Des = (IDescription)item; Des.DescriptionParserAdapter = expDes.DescriptionParserAdapter; // 如果是字段描述对象,则先将字段名称记录下来(后面的非描述对象可能需要创建参数,这就需要使用到) FieldDescription fdes = Des as FieldDescription; if (!IsNull(fdes)) { paramName = fdes.FieldName; } string buf = Des.GetParser().Parsing(ref DbParameters); // 判断并补空格。 if (buf[0] == (char)0x20) { cBuffer.Append(buf); } else { cBuffer.AppendFormat(" {0}", buf); } } else if (item is char) // 如果是单字符,则先分析是否是预定义的运算符,如果是则需要进行相应的转换。 { bool createParam = false; string buf = ParsingOperChar((char)item, ref createParam); if (createParam && !string.IsNullOrEmpty(paramName)) { // 当单字段并非预定义的运算符时视为值,并为其创建参数。 IDbDataParameter p = Adapter.CreateDbParameter(string.Format("u_{0}", paramName), buf); AddDbParameter(ref DbParameters, p); cBuffer.AppendFormat(" {0}", p.ParameterName); paramName = string.Empty; // 参数创建完成后应该清除该记录,否则下一次循环就会一直定沿用。 } else { // 单字符为预定义的运算符时。 cBuffer.AppendFormat(" {0}", buf); } } else // 其他类型的处理 { if (item.Equals(string.Empty)) { // 空字符串转换。 cBuffer.AppendFormat(" ''"); } else { if (string.IsNullOrEmpty(paramName)) { // 前面没有检测到字段描述信息,不需要创建参数。 cBuffer.AppendFormat(" {0}", item); } else { // 前面的元素检测到字段信息,需要创建参数。 IDbDataParameter p = Adapter.CreateDbParameter(string.Format("u_{0}", paramName), item); AddDbParameter(ref DbParameters, p); cBuffer.AppendFormat(" {0}", p.ParameterName); paramName = string.Empty; // 参数创建完成后应该清除该记录,否则下一次循环就会一直定沿用。 } } } } return(cBuffer.ToString()); }
public Matrix GetViewMatrix() { return (GetVirtualViewMatrix() * Adapter.GetScaleMatrix()); }
/// <summary> /// Created a new menu owned by the current user. /// </summary> /// <param name="menu">A menu to create.</param> /// <param name="recipeIds">Zero or more recipes to add to the newly created menu.</param> /// <returns>A result indicating the new menu ID.</returns> public virtual MenuResult CreateMenu(Menu menu, params Guid[] recipeIds) { return(Adapter.CreateMenu(Identity, menu, recipeIds)); }
public async Task<ApiResponse<bool>> TestAdapterAsync(Adapter adapter) { return await InvokeApiPostRequestAsync<Adapter, bool>("api/adapters/test", adapter); }
/// <summary> /// Returns one or more saved shopping lists from the current user. /// </summary> /// <param name="lists">A list of ShoppingList objects indicating the ID of the list to load, or ShoppingList.Default for the default list.</param> /// <param name="options">Indicates what data to load. Use GetShoppingListOptions.None to simply load the names of the lists.</param> /// <returns>An array of ShoppingList objects with all the desired properties loaded.</returns> public virtual ShoppingList[] GetShoppingLists(IList <ShoppingList> lists, GetShoppingListOptions options) { return(Adapter.GetShoppingLists(Identity, lists, options)); }
public async Task<ApiResponse<bool>> TurnOffAdapterAsync(Adapter adapter) { return await InvokeApiGetRequestAsync<bool>($"api/adapters/turnoff/{adapter.Id}"); }
public DataStore Export() { return(Adapter.Export()); }
private void ObjCacheManager_ConnectionInfo_update(object sender, EventArgs e) { bool TSCstat_Color = false; string TSCstat_Display = string.Empty; bool SECSstat_Color = false; string SECSstat_Display = string.Empty; bool Controlstat_Color = false; string Controlstat_Display = string.Empty; ALINE aLINE = app.ObjCacheManager.GetLine(); try { switch (aLINE.Secs_Link_Stat) { case SCAppConstants.LinkStatus.LinkOK: SECSstat_Color = true; //SECSstat_Display = BCAppConstants.SECSLinkDisplay.Link; SECSstat_Display = "On"; Adapter.BeginInvoke(new SendOrPostCallback((o1) => { CommunicationStatus.Button1.IsEnabled = false; CommunicationStatus.Button2.IsEnabled = true; }), null); break; case SCAppConstants.LinkStatus.LinkFail: SECSstat_Color = false; //SECSstat_Display = BCAppConstants.SECSLinkDisplay.NotLink; SECSstat_Display = "Off"; Adapter.BeginInvoke(new SendOrPostCallback((o1) => { CommunicationStatus.Button1.IsEnabled = true; CommunicationStatus.Button2.IsEnabled = false; }), null); break; } switch (aLINE.Host_Control_State) { case SCAppConstants.LineHostControlState.HostControlState.On_Line_Remote: Controlstat_Color = true; Controlstat_Display = BCAppConstants.HostModeDisplay.OnlineRemote; Adapter.BeginInvoke(new SendOrPostCallback((o1) => { ControlStatus.Button1.IsEnabled = false; ControlStatus.Button2.IsEnabled = true; ControlStatus.Button3.IsEnabled = true; TSCStatus.Button1.IsEnabled = true; TSCStatus.Button2.IsEnabled = true; }), null); break; case SCAppConstants.LineHostControlState.HostControlState.On_Line_Local: Controlstat_Color = true; Controlstat_Display = BCAppConstants.HostModeDisplay.OnlineLocal; Adapter.BeginInvoke(new SendOrPostCallback((o1) => { ControlStatus.Button1.IsEnabled = true; ControlStatus.Button2.IsEnabled = false; ControlStatus.Button3.IsEnabled = true; TSCStatus.Button1.IsEnabled = true; TSCStatus.Button2.IsEnabled = true; }), null); break; case SCAppConstants.LineHostControlState.HostControlState.EQ_Off_line: Controlstat_Color = false; Controlstat_Display = BCAppConstants.HostModeDisplay.Offline; Adapter.BeginInvoke(new SendOrPostCallback((o1) => { ControlStatus.Button1.IsEnabled = true; ControlStatus.Button2.IsEnabled = true; ControlStatus.Button3.IsEnabled = false; TSCStatus.Button1.IsEnabled = false; TSCStatus.Button2.IsEnabled = false; }), null); break; } switch (aLINE.SCStats) { case TSCState.AUTO: TSCstat_Color = true; TSCstat_Display = BCAppConstants.TSCStateDisplay.Auto; Adapter.BeginInvoke(new SendOrPostCallback((o1) => { TSCStatus.Button1.IsEnabled = false; TSCStatus.Button2.IsEnabled = true; }), null); break; case TSCState.NONE: TSCstat_Color = false; TSCstat_Display = BCAppConstants.TSCStateDisplay.None; Adapter.BeginInvoke(new SendOrPostCallback((o1) => { TSCStatus.Button1.IsEnabled = false; TSCStatus.Button2.IsEnabled = true; }), null); break; case TSCState.PAUSED: TSCstat_Color = false; TSCstat_Display = BCAppConstants.TSCStateDisplay.Pause; Adapter.BeginInvoke(new SendOrPostCallback((o1) => { //TSCStatus.Button1.IsEnabled = true; TSCStatus.Button2.IsEnabled = false; }), null); break; case TSCState.PAUSING: TSCstat_Color = false; TSCstat_Display = BCAppConstants.TSCStateDisplay.Pausing; Adapter.BeginInvoke(new SendOrPostCallback((o1) => { TSCStatus.Button1.IsEnabled = false; TSCStatus.Button2.IsEnabled = false; }), null); break; case TSCState.TSC_INIT: TSCstat_Color = false; TSCstat_Display = BCAppConstants.TSCStateDisplay.Init; Adapter.BeginInvoke(new SendOrPostCallback((o1) => { TSCStatus.Button1.IsEnabled = false; TSCStatus.Button2.IsEnabled = false; }), null); break; } } catch (Exception ex) { logger.Error(ex, "Exception"); } CommunicationStatus.SetConnectSignal(SECSstat_Display, SECSstat_Color); ControlStatus.SetConnSignal(Controlstat_Display, Controlstat_Color); TSCStatus.SetConnectSignal(TSCstat_Display, TSCstat_Color); }
public void MSVIEWSS_S05_TC02_UpdateViewHtml2_LogicalJoin() { this.Site.Assume.IsTrue(Common.IsRequirementEnabled(8016, this.Site), @"The test case is executed only when R8016Enabled is set to true."); // Add a view. string viewName = this.AddView(false, Query.EmptyQueryInfo, ViewType.Html); string updatedDisplayName = this.GenerateRandomString(6); UpdateViewHtml2ViewProperties viewProperties = this.GetViewProperties(false, updatedDisplayName, false, ViewScope.Item); UpdateViewHtml2Toolbar toolbar; UpdateViewHtml2ViewHeader viewHeader; UpdateViewHtml2ViewBody viewBody; UpdateViewHtml2ViewFooter viewFooter; UpdateViewHtml2ViewEmpty viewEmpty; UpdateViewHtml2RowLimitExceeded rowLimitExceeded; this.GetHtmlConfigure( out toolbar, out viewHeader, out viewBody, out viewFooter, out viewEmpty, out rowLimitExceeded); UpdateViewHtml2Query queryValue = new UpdateViewHtml2Query(); // Make the query having LogicalJoinDefinition element with available child in it. queryValue.Query = this.GetCamlQueryRoot(Query.AvailableQueryInfo, false); UpdateViewHtml2ViewFields viewFields = new UpdateViewHtml2ViewFields(); viewFields.ViewFields = this.GetViewFields(false); UpdateViewHtml2Aggregations aggregations = new UpdateViewHtml2Aggregations(); string aggregationsType = Common.GetConfigurationPropertyValue("FieldRefAggregations_AggregationsType", this.Site); aggregations.Aggregations = this.GetAggregationsDefinition(true, true, aggregationsType); UpdateViewHtml2Formats formats = new UpdateViewHtml2Formats(); formats.Formats = this.GetViewFormatDefinitions(); UpdateViewHtml2RowLimit rowLimitValue = new UpdateViewHtml2RowLimit(); rowLimitValue.RowLimit = this.GetAvailableRowLimitDefinition(); string openApplicationExtension = Common.GetConfigurationPropertyValue("OpenApplicationExtension", this.Site); // Call UpdateViewHtml2 to update the view with available LogicalJoinDefinition query condition. UpdateViewHtml2ResponseUpdateViewHtml2Result updateViewHtml2Re = Adapter.UpdateViewHtml2( TestSuiteBase.ListGUID, viewName, viewProperties, toolbar, viewHeader, viewBody, viewFooter, viewEmpty, rowLimitExceeded, queryValue, viewFields, aggregations, formats, rowLimitValue, openApplicationExtension); this.Site.Assert.IsNotNull(updateViewHtml2Re, "The updated view html2 should be got successfully."); this.Site.Assert.IsNotNull(updateViewHtml2Re.View, "There should be a view element returned from a successful UpdateViewHtml2 operation."); // Get the count of the items in the view. int itemCountInTheView = TestSuiteBase.SutControlAdapter.GetItemsCount(TestSuiteBase.ListGUID, viewName); int expectIQueryItemsCount = int.Parse(Common.GetConfigurationPropertyValue("QueryItemsCount", this.Site)); // Verify Requirement MS-WSSCAML_R25, if the item count in the view returned from the server is the same with the query expectation. Site.CaptureRequirementIfAreEqual(expectIQueryItemsCount, itemCountInTheView, "MS-WSSCAML", 25, @"[In LogicalJoinDefinition Type] When this element[LogicalJoinDefinition] is present and has child elements, the server MUST return only list items that satisfy the conditions specified by those child elements."); // Make the query having no child element in LogicalJoinDefinition, an empty query. queryValue.Query = this.GetCamlQueryRoot(Query.EmptyQueryInfo, false); // Call UpdateViewHtml2 to update the view with an empty query condition. updateViewHtml2Re = Adapter.UpdateViewHtml2( TestSuiteBase.ListGUID, viewName, viewProperties, toolbar, viewHeader, viewBody, viewFooter, viewEmpty, rowLimitExceeded, queryValue, viewFields, aggregations, formats, rowLimitValue, openApplicationExtension); this.Site.Assert.IsNotNull(updateViewHtml2Re, "The updated view html2 should be got successfully."); this.Site.Assert.IsNotNull(updateViewHtml2Re.View, "There should be a view element returned from a successful UpdateViewHtml2 operation."); // Get the count of the items in the view. itemCountInTheView = TestSuiteBase.SutControlAdapter.GetItemsCount(TestSuiteBase.ListGUID, viewName); int expectAllItemsCount = int.Parse(Common.GetConfigurationPropertyValue("AllItemsCount", this.Site)); // Verify Requirement MS-WSSCAML_R2501, if the item count in the view returned from the server is the same with the count of all list items. Site.CaptureRequirementIfAreEqual(expectAllItemsCount, itemCountInTheView, "MS-WSSCAML", 2501, @"[In LogicalJoinDefinition Type] When there are no child elements[in the element of LogicalJoinDefinition type], no additional conditions apply to the query."); }
public void Import(IProvisionSource source) { Adapter.Import(source); }