本文整理匯總了C#中UnitTesting.Tests.Utils.MockClass.AddProperty方法的典型用法代碼示例。如果您正苦於以下問題:C# MockClass.AddProperty方法的具體用法?C# MockClass.AddProperty怎麽用?C# MockClass.AddProperty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UnitTesting.Tests.Utils.MockClass
的用法示例。
在下文中一共展示了MockClass.AddProperty方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: CreateClassWithOneProperty
void CreateClassWithOneProperty()
{
resolverHelper = new PythonResolverTestsHelper();
myClass = resolverHelper.CreateClass("MyClass");
myClassProperty = myClass.AddProperty("MyProperty");
AddNestedPropertyToExistingProperty();
resolverHelper.ProjectContent.SetClassToReturnFromGetClass("MyClass", myClass);
}
示例2: AddProperty_PassedPropertyName_ReturnsPropertyWithExpectedName
public void AddProperty_PassedPropertyName_ReturnsPropertyWithExpectedName()
{
MockClass c = new MockClass();
IProperty property = c.AddProperty("MyProperty");
string name = property.Name;
Assert.AreEqual("MyProperty", name);
}
示例3: InsertPropertyAtStart_PassedPropertyName_AddsPropertyAsFirstProperty
public void InsertPropertyAtStart_PassedPropertyName_AddsPropertyAsFirstProperty()
{
MockClass c = new MockClass();
c.AddProperty("SecondProperty");
c.InsertPropertyAtStart("FirstProperty");
IProperty property = c.Properties[0];
string name = property.Name;
Assert.AreEqual("FirstProperty", name);
}
示例4: AddProperty_PassedPropertyName_AddsPropertyToClass
public void AddProperty_PassedPropertyName_AddsPropertyToClass()
{
MockClass c = new MockClass();
c.AddProperty("MyProperty");
IProperty property = c.Properties[0];
string name = property.Name;
Assert.AreEqual("MyProperty", name);
}