private void GetModelsList() { modelsList.Clear(); bodyModelList = bodyModelTable.GetList(true); BodyStructureTable.BodyStructure searchStruct = new BodyStructureTable.BodyStructure(); BodySubtypeTable.BodySubtype searchSubtype = new BodySubtypeTable.BodySubtype(); for (int i = 0; i < bodyModelList.Count; i++) { ListModels toAdd = new ListModels(); toAdd.IDModel = bodyModelList [i].ID; toAdd.Name = bodyModelList [i].Name; searchStruct = bodyStrucList.Find(x => x.ID == bodyModelList [i].IDBodyStructure); if (searchStruct != null) { toAdd.Structure = searchStruct.Name; } searchSubtype = bodySubtList.Find(x => x.ID == bodyModelList [i].IDBodySubtype); if (searchSubtype != null) { toAdd.BodySubtype = searchSubtype.Name; } GameObject prefabToLoad = (GameObject)Resources.Load(_config.GetPathName(CSConfig.PathTypeEnum.BodyModelsPath) + "/" + bodyModelList[i].ModelName); if (prefabToLoad == null) { toAdd.PrefabError = true; } modelsList.Add(toAdd); } }
public async void ListModels( EStatusCode expectedStatus, ListModels query ) { var model = EntitiesFactory.NewModel().Save(); var(status, result) = await Request.Get <QueryResultListTest <ModelList> >(Uri, query); Assert.Equal(expectedStatus, status); if (expectedStatus == EStatusCode.Success) { Assert.NotEmpty(result.Data); Assert.Contains(result.Data, d => d.Id == model.Id); } }
void Start() { DontDestroyOnLoad(this); PhotonNetwork.ConnectUsingSettings("0.1"); PhotonNetwork.logLevel = PhotonLogLevel.Full; _listRooms = canvas.GetComponent <ListRooms>(); _listModels = canvas.GetComponent <ListModels>(); uiManager = GetComponent <UIManagerLobby>(); playerData = new string[2]; MarkersData = new List <string[]>(); ObjectMasterData = new List <string[]>(); markerData = new string[2]; feedback.text = ""; feedback.GetComponent <Text>().color = Color.red; }
void Start () { DontDestroyOnLoad(this); PhotonNetwork.ConnectUsingSettings("0.1"); PhotonNetwork.logLevel = PhotonLogLevel.Full; _listRooms = canvas.GetComponent<ListRooms>(); _listModels = canvas.GetComponent<ListModels>(); uiManager = GetComponent<UIManagerLobby>(); playerData = new string[2]; MarkersData = new List<string[]>(); ObjectMasterData = new List<string[]>(); markerData = new string[2]; feedback.text = ""; feedback.GetComponent<Text>().color = Color.red; }
public async Task getModelsList_ReturnsModels() { int companyId = 1; string cacheKey = "CompanyModel_" + companyId; ListModels models = new ListModels(); List <dbModels> m = new List <dbModels>(); m.Add(new dbModels { ModelId = 1, ModelName = "X1", Rating = 5, ImageUrl = "https://imgd.aeplcdn.com" }); models.DbModels.AddRange(m); Mock <ICarDataCache> _ICarDataCache = new Mock <ICarDataCache>(); _ICarDataCache.Setup(cache => cache.getModelsDetails_Cache(companyId, cacheKey)).ReturnsAsync(models); carDetailsService carDetailsService = new carDetailsService(_ICarDataCache.Object); var result = await carDetailsService.getModelsList(new compId { CompanyId = companyId }, It.IsAny <ServerCallContext>()); Assert.Equal(result, models); }
public async Task <ActionResult <QueryResultList <ModelList> > > ListAsync([FromQuery] ListModels query) { return(GetResult(await _queriesHanlder.Handle(query))); }