public void Init() { Monitor.Enter(DataListSingletonTest.DataListSingletonTestGuard); var testEnvironmentModel = ResourceModelTest.CreateMockEnvironment(); _resourceModel = new ResourceModel(testEnvironmentModel.Object) { ResourceName = "test", ResourceType = ResourceType.Service, DataList = @" <DataList> <Scalar/> <Country/> <State /> <City> <Name/> <GeoLocation /> </City> </DataList> " }; IDataListViewModel setupDatalist = new DataListViewModel(); DataListSingleton.SetDataList(setupDatalist); DataListSingleton.ActiveDataList.InitializeDataListViewModel(_resourceModel); }
public void GivenIHaveTheFollowingVariableList(string variableList) { const string Root = "<DataList>##</DataList>"; var datalist = Root.Replace("##", variableList); ScenarioContext.Current.Add("dataList", datalist); var testEnvironmentModel = ResourceModelTest.CreateMockEnvironment(); var resourceModel = new ResourceModel(testEnvironmentModel.Object) { ResourceName = "test", ResourceType = ResourceType.Service, DataList = datalist }; IDataListViewModel setupDatalist = new DataListViewModel(); DataListSingleton.SetDataList(setupDatalist); DataListSingleton.ActiveDataList.InitializeDataListViewModel(resourceModel); }