本文整理汇总了C#中Domain.InitializeFromFolder方法的典型用法代码示例。如果您正苦于以下问题:C# Domain.InitializeFromFolder方法的具体用法?C# Domain.InitializeFromFolder怎么用?C# Domain.InitializeFromFolder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Domain
的用法示例。
在下文中一共展示了Domain.InitializeFromFolder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitializeFromFolder
public void InitializeFromFolder()
{
Domain domain = new Domain();
domain.InitializeFromFolder("TddAppWebTests");
Assert.AreNotEqual(0, domain.Projects.Count);
}
示例2: GetIndex
public void GetIndex()
{
Domain domain = new Domain();
domain.InitializeFromFolder("WebSampleTestFiles");
HomeController controller = new HomeController();
var result = controller.Index();
Assert.IsNotNull(result);
Assert.IsInstanceOfType(result, typeof(ViewResult));
var vresult = (ViewResult)result;
Assert.IsNotNull(vresult.Model);
Assert.IsInstanceOfType(vresult.Model, typeof(IList<DimensionModel>));
var model = (IList<DimensionModel>)vresult.Model;
Assert.AreEqual(2, model.Count);
Assert.IsTrue(model.Any(m => m.SetName == "Countries"));
Assert.IsTrue(model.Any(m => m.SetName == "Categories"));
}
示例3: LoadFromFolder
public void LoadFromFolder()
{
Domain domain = new Domain();
domain.InitializeFromFolder("WebSampleTestFiles");
var dimension = domain.TupleSet.GetDimension("Category");
Assert.IsNotNull(dimension);
var values = dimension.GetValues();
Assert.IsNotNull(values);
Assert.AreEqual(8, values.Count);
dimension = domain.TupleSet.GetDimension("Country");
Assert.IsNotNull(dimension);
values = dimension.GetValues();
Assert.IsNotNull(values);
Assert.AreEqual(8, values.Count);
}