本文整理匯總了C#中MonoDevelop.NUnit.UnitTest.HasOptions方法的典型用法代碼示例。如果您正苦於以下問題:C# UnitTest.HasOptions方法的具體用法?C# UnitTest.HasOptions怎麽用?C# UnitTest.HasOptions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MonoDevelop.NUnit.UnitTest
的用法示例。
在下文中一共展示了UnitTest.HasOptions方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: NUnitOptionsWidget
public NUnitOptionsWidget (Properties customizationObject)
{
Build ();
test = ((Properties)customizationObject).Get<UnitTest> ("UnitTest");
config = ((Properties)customizationObject).Get<string> ("Config");
options = localOptions = (NUnitCategoryOptions) test.GetOptions (typeof(NUnitCategoryOptions), config);
store = new TreeStore (typeof(string));
categoryTree.Model = store;
categoryTree.HeadersVisible = false;
CellRendererText tr = new CellRendererText ();
tr.Editable = true;
tr.Edited += new EditedHandler (OnCategoryEdited);
textColumn = new TreeViewColumn ();
textColumn.Title = GettextCatalog.GetString ("Category");
textColumn.PackStart (tr, false);
textColumn.AddAttribute (tr, "text", 0);
textColumn.Expand = true;
categoryTree.AppendColumn (textColumn);
if (test.Parent != null)
useParentCheck.Active = !test.HasOptions (typeof(NUnitCategoryOptions), config);
else {
useParentCheck.Active = false;
useParentCheck.Sensitive = false;
}
if (!options.EnableFilter)
noFilterRadio.Active = true;
else if (options.Exclude)
excludeRadio.Active = true;
else
includeRadio.Active = true;
Fill ();
noFilterRadio.Toggled += new EventHandler (OnFilterToggled);
includeRadio.Toggled += new EventHandler (OnFilterToggled);
excludeRadio.Toggled += new EventHandler (OnFilterToggled);
useParentCheck.Toggled += new EventHandler (OnToggledUseParent);
addButton.Clicked += new EventHandler (OnAddCategory);
removeButton.Clicked += new EventHandler (OnRemoveCategory);
}