Example #1
0
 public DesicionDto Create(Desicion desicion)
 {
     return(new DesicionDto
     {
         Id = desicion.Id,
         Name = desicion.Name
     });
 }
Example #2
0
 public void Flee()
 {
     GameManager.Instance.SpawnLocation = SpotInScene1;
     GameManager.Instance.SpawnRotation = RotationInScene1;
     choiseScreen.SetActive(false);
     Main.Play();
     Desicion.Stop();
     isBear = false;
 }
        protected override void InitializeMockData()
        {
            desicion = new Desicion {
                Id = 1, Name = "Rejected"
            };

            _mockControl = new QualityControl(_user)
            {
                Id     = 1,
                Name   = "High tolerances",
                Status = QualityControlStatus.Open,
                Defect = new Defect {
                    Name = "DI110", Description = "Out of tolerances"
                },
                Product = new Product {
                    Name = "Blade", Description = "blade fb1"
                }
            };
            controls = new List <QualityControl>
            {
                _mockControl,
                new QualityControl {
                    Name        = "Documental deviation",
                    Description = "Prox p40",
                    Product     = new Product {
                        Name = "CFM Fan Blade"
                    },
                    Defect = new Defect {
                        Name = "DEQ"
                    },
                    Inspection = new Inspection {
                        Desicion = desicion
                    }
                }
            };

            viewModel = new QualityControlViewModel
            {
                Name        = "High tolerances",
                Description = "Dimensions DI310 and C220 out of upper tolerance.",
                Serial      = "SN18972123",
                Defect      = 1,
                Product     = 1
            };
            detailViewModel = new QualityControlDetailViewModel
            {
                Id          = 1,
                Name        = "No-conforming dimensions",
                Description = "Dimension DI110 is out of upper tolerance."
            };

            expectedRedirectValues = new RouteValueDictionary
            {
                { "action", "Index" },
                { "controller", "QualityControl" }
            };
        }
Example #4
0
 public void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         choiseScreen.SetActive(true);
         Main.Stop();
         Desicion.Play();
         player.GetComponent <PlayerControl>().UnlockCursor();
         isBear = true;
     }
 }
        public async Task Inspection_UnexistingDesicion_ShouldReturnNotFound()
        {
            //Arrange
            Desicion desicionNull = null;

            _mockUnitOfWork.Setup(uw => uw.DesicionRepository
                                  .FindByIdAsync(It.IsAny <int>())).Returns(Task.FromResult(desicionNull));
            //Act
            var result = await _controller.AddDesicion(inspection);

            //Assert
            result.Should().BeOfType <BadRequestResult>();
        }
Example #6
0
 public void Encounter()
 {
     isBear = false;
     if (player.GetComponent <PlayerControl>().GetInjured())
     {
         choiseScreen.SetActive(false);
         StartCoroutine(LoadMain());
         Desicion.Stop();
         Dead.Play();
     }
     else
     {
         choiseScreen.SetActive(false);
         Desicion.Stop();
         gun.Play();
         End.Play();
         bear.Stop();
         StartCoroutine(LoadEnd());
     }
 }
 protected override void InitializeMockData()
 {
     desicion = new Desicion {
         Id = 1, Name = "Acepted"
     };
     inspection = new InspectionDto
     {
         QualityControlId = 1,
         Comments         = "Instructions' results OK",
         Desicion         = 1
     };
     control = new QualityControl
     {
         Name   = "High tolerances",
         Defect = new Defect {
             Name = "Dimensional"
         },
         Status = QualityControlStatus.Open
     };
 }
Example #8
0
 // Update is called once per frame
 void Update()
 {
     if (isBear)
     {
         if (Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetKeyDown(KeyCode.A))
         {
             GameManager.Instance.SpawnLocation = SpotInScene1;
             GameManager.Instance.SpawnRotation = RotationInScene1;
             choiseScreen.SetActive(false);
             Desicion.Stop();
             Main.Play();
             isBear = false;
         }
         else if (Input.GetKeyDown(KeyCode.RightArrow) || Input.GetKeyDown(KeyCode.D))
         {
             if (player.GetComponent <PlayerControl>().GetInjured())
             {
                 choiseScreen.SetActive(false);
                 Desicion.Stop();
                 Dead.Play();
                 StartCoroutine(LoadMain());
                 isBear = false;
             }
             else
             {
                 choiseScreen.SetActive(false);
                 Desicion.Stop();
                 gun.Play();
                 End.Play();
                 bear.Stop();
                 StartCoroutine(LoadEnd());
                 isBear = false;
             }
         }
     }
 }