Exemplo n.º 1
0
 void Start()
 {
     fbc       = GameObject.Find("FeedBackCanvas").GetComponent <FeedBackController>();
     score     = 0;
     scoreText = GameObject.Find("ScoreText").GetComponent <UnityEngine.UI.Text> ();
     SetScoreText();
 }
Exemplo n.º 2
0
        public async void Task_Return_GetAllUser()
        {
            var controller = new FeedBackController(context);
            var data       = await controller.Get();

            Assert.IsType <OkObjectResult>(data);
        }
Exemplo n.º 3
0
 void Start()
 {
     fbc           = GameObject.Find("FeedBackCanvas").GetComponent <FeedBackController>();
     rb            = GetComponent <Rigidbody> ();
     lifeText      = GameObject.Find("LifeText").GetComponent <UnityEngine.UI.Text> ();
     lifeText.text = "" + life.ToString();
 }
Exemplo n.º 4
0
        public async void Task_GetById_Return_NFResult()
        {
            var controller = new FeedBackController(context);
            var id         = 100;
            var data       = await controller.Get(id);

            Assert.IsType <NotFoundResult>(data);
        }
Exemplo n.º 5
0
        public async void Task_GetById_Return_OkResult()
        {
            var controller = new FeedBackController(context);
            var id         = 1;
            var data       = await controller.Get(id);

            Assert.IsType <OkObjectResult>(data);
        }
Exemplo n.º 6
0
        public async void Task_delete_Return_badrequest()
        {
            var controller = new FeedBackController(context);
            int?id         = null;
            var data       = await controller.Delete(id);

            Assert.IsType <BadRequestResult>(data);
        }
Exemplo n.º 7
0
        public async void Task_GetById_Return_BadRequest()
        {
            var controller = new FeedBackController(context);
            int?id         = null;
            var data       = await controller.Get(id);

            Assert.IsType <BadRequestResult>(data);
        }
Exemplo n.º 8
0
 void Start()
 {
     fbc       = GameObject.Find("FeedBackCanvas").GetComponent <FeedBackController>();
     yapayZeka = GetComponent <NavMeshAgent>();
     player    = GameObject.FindGameObjectWithTag("Player");
     rb        = GetComponent <Rigidbody>();
     isVisible(false);
 }
Exemplo n.º 9
0
        public async void Task_delete_Return_okResult()
        {
            var controller = new FeedBackController(context);
            var id         = 2;
            var data       = await controller.Delete(id);

            Assert.IsType <OkObjectResult>(data);
        }
Exemplo n.º 10
0
        public async void Task_delete_Return_notfound()
        {
            var controller = new FeedBackController(context);
            var id         = 100;
            var data       = await controller.Delete(id);

            Assert.IsType <NotFoundResult>(data);
        }
Exemplo n.º 11
0
    // Use this for initialization
    void Start()
    {
        removed = false;
        player = CustomExtensions.GetPlayer ();
        renderer = GetComponentInChildren<Renderer> ();
        focusData = GameObject.FindGameObjectWithTag ("GameController").GetComponent<FeedBackController> ();

        skyManager = GetComponentInParent<SkyStars> ();
    }
Exemplo n.º 12
0
 // Use this for initialization
 void Start()
 {
     //musicLoader = Camera.main.GetComponent<MusicLoad> ();
     specAny = GetComponent<SpectrumAnalyzer> ();
     FeedBackeReader = GetComponent<FeedBackController> ();
     //		songName = GameObject.FindGameObjectWithTag ("NAME").GetComponent<Text> ();
     //		playButton = GameObject.FindGameObjectWithTag ("PLAY").GetComponent<Text> ();
     //		textBox = GameObject.FindGameObjectWithTag ("TEXT").GetComponent<Text> ();
     calmSlider =  GameObject.FindGameObjectWithTag ("UI_Canvas").GetComponentInChildren<Slider> ();
 }
Exemplo n.º 13
0
        public async void Task_Add_Return_OkRequest()
        {
            var controller = new FeedBackController(context);
            var user       = new FeedBack()
            {
                Message    = "Awesome",
                CustomerId = 1
            };
            var data = await controller.Post(user);

            Assert.IsType <CreatedAtActionResult>(data);
        }
Exemplo n.º 14
0
        public async void Task_GetById_Return_MatchResult()
        {
            var controller = new FeedBackController(context);
            var Id         = 1;
            var data       = await controller.Get(Id);

            Assert.IsType <OkObjectResult>(data);
            var okResult = data.Should().BeOfType <OkObjectResult>().Subject;
            var brand    = okResult.Value.Should().BeAssignableTo <FeedBack>().Subject;

            Assert.Equal("good one", brand.Message);
        }
Exemplo n.º 15
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         int Linha = dataGridView1.CurrentRow.Index;
         MessageBox.Show(FeedBackController.BuscarFeedBacks(dataGridView1.Rows[Linha].Cells[2].Value.ToString()));
     }
     catch
     {
         MessageBox.Show("Selecione um aluno para continuar!");
     }
 }
Exemplo n.º 16
0
 private void btn_feedback_Click(object sender, RibbonControlEventArgs e)
 {
     try
     {
         FeedBackController controller = new FeedBackController(this);
         controller.Do();
     }
     catch (Exception EX)
     {
         LogHelper.WriteLog(typeof(BIMTRibbon), EX);
     }
 }
Exemplo n.º 17
0
        public void PostTest()
        {
            var target = new FeedBackController();

            var targetResponse = target.Post(postTestValue);

            Assert.IsInstanceOfType(targetResponse, typeof(OkNegotiatedContentResult <BaseResponse <FeedBack> >));
            var targetResponseData = targetResponse as OkNegotiatedContentResult <BaseResponse <FeedBack> >;

            Assert.IsNotNull(targetResponseData);
            Assert.IsNotNull(targetResponseData.Content);
            Assert.IsTrue(targetResponseData.Content.Success);
        }
Exemplo n.º 18
0
        public async void Task_update_Return_Badreq()
        {
            var controller = new FeedBackController(context);
            int?id         = null;
            var user       = new FeedBack()
            {
                FeedBackId = 2,
                Message    = "Awesome Blosoom",
                CustomerId = 1
            };
            var data1 = await controller.Put(id, user);

            Assert.IsType <BadRequestResult>(data1);
        }
Exemplo n.º 19
0
        public async void Task_update_Return_ok()
        {
            var id         = 2;
            var controller = new FeedBackController(context);
            var user       = new FeedBack()
            {
                FeedBackId = 2,
                Message    = "Awesome Blosoom",
                CustomerId = 1
            };
            var data1 = await controller.Put(id, user);

            Assert.IsType <OkObjectResult>(data1);
        }
Exemplo n.º 20
0
        public async void Task_update_Return_notfound()
        {
            var controller = new FeedBackController(context);
            var id         = 12;
            var user       = new FeedBack()
            {
                FeedBackId = 2,
                Message    = "Awesome Blosoom",
                CustomerId = 1
            };
            var data = await controller.Put(id, user);

            Assert.IsType <NotFoundResult>(data);
        }
Exemplo n.º 21
0
        public async void Task_getAll_Return_NotFound()
        {
            var controller = new FeedBackController(context);
            var data       = await controller.Get();

            data = null;
            if (data != null)
            {
                Assert.IsType <OkObjectResult>(data);
            }
            else
            {
                Assert.Equal(data, null);
            }
        }
Exemplo n.º 22
0
        private void button1_Click(object sender, EventArgs e)
        {
            string FeedBack = richTextBox1.Text;

            if (FeedBackController.AdicionarFeedBack(FeedBack))
            {
                MessageBox.Show("FeedBack enviado!");
                richTextBox1.Clear();
                RecarregarData();
            }
            else
            {
                MessageBox.Show("FeedBack não enviado!");
            }
        }
Exemplo n.º 23
0
        public void GetTest()
        {
            var target         = new FeedBackController();
            var requestJson    = JsonConvert.SerializeObject(getTestValue);
            var targetResponse = target.Get(requestJson);

            Assert.IsInstanceOfType(targetResponse, typeof(OkNegotiatedContentResult <BaseResponse <FeedBackGetResponse> >));
            var targetResponseData = targetResponse as OkNegotiatedContentResult <BaseResponse <FeedBackGetResponse> >;

            //var actual = new FeedBackController();
            //var actualResponse = target.Get(requestJson);
            //Assert.IsInstanceOfType(targetResponse, typeof(OkNegotiatedContentResult<BaseResponse<FeedBackGetResponse>>));
            //var actualResponseData = actualResponse as OkNegotiatedContentResult<BaseResponse<FeedBackGetResponse>>;
            Assert.IsNotNull(targetResponseData.Content);
            Assert.IsTrue(targetResponseData.Content.Success);
            //Assert.Inconclusive("驗證正確性!!!");
        }
Exemplo n.º 24
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (UsuarioDAL.logar("admin", textBox1.Text))
     {
         if (DialogResult.Yes == MessageBox.Show("Tem certeza que deseja apagar TODOS os dados?", "Confirmação", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
         {
             FeedBackController.DeletaFeedBack();
             AlunoController.DeletaAlunos();
             ExercicioController.DeletarExerciciosProgramados();
             ExercicioController.DeletarExercicios();
             ProfessorController.DeletaProfessores();
             MessageBox.Show("DataBase deletado!");
         }
     }
     else
     {
         MessageBox.Show("Senha incorreta!");
     }
 }
Exemplo n.º 25
0
        public void PutTest()
        {
            var target = new FeedBackController();

            var targetResponse = target.Put(putTestValue);

            Assert.IsInstanceOfType(targetResponse, typeof(OkNegotiatedContentResult <BaseResponse <FeedBack> >));
            var targetResponseData = targetResponse as OkNegotiatedContentResult <BaseResponse <FeedBack> >;

            //var actual = new FeedBackController();
            //var actualResponse = target.Put(putTestValue);
            //Assert.IsInstanceOfType(targetResponse, typeof(OkNegotiatedContentResult<BaseResponse<FeedBack>>));
            //var actualResponseData = actualResponse as OkNegotiatedContentResult<BaseResponse<FeedBack>>;
            Assert.IsNotNull(targetResponseData);
            Assert.IsNotNull(targetResponseData.Content);
            Assert.IsTrue(targetResponseData.Content.Success);

            //Assert.Inconclusive("驗證正確性!!!");
        }
        public FeedbackControllerTest()
        {
            _gebruikerRepository = new Mock <IGebruikerRepository>();
            _sessieRepository    = new Mock <ISessieRepository>();
            _controller          = new FeedBackController(_sessieRepository.Object, _gebruikerRepository.Object)
            {
                TempData = new Mock <ITempDataDictionary>().Object
            };

            _dummyData = new DummyData();
            // testdata ophalen
            testSessie    = _dummyData.s1;
            testGebruiker = _dummyData.piet;
            // testGebruiker inschrijven en aanwezig stellen
            testSessie.ToState(new RegistratieEnAanmeldenOpenState(testSessie));             // zorgen dat gebruiker kan inschrijven en aanmelden
            testGebruiker.SchrijfGebruikerInSessie(testSessie);
            testGebruiker.ZetAanwezigVoorSessie(testSessie);
            // schrijf een feedback
            testGebruiker.geefFeedbackOpSessie(testSessie, "een feedbackinhoud", 5);
        }
Exemplo n.º 27
0
 void Start()
 {
     fbc                = GameObject.Find("FeedBackCanvas").GetComponent <FeedBackController>();
     countdownText      = GameObject.Find("TimeText").GetComponent <Text>();
     countdownText.text = "" + (int)countdownTo;
 }
Exemplo n.º 28
0
 // Use this for initialization
 void Start()
 {
     player = CustomExtensions.GetPlayer ();
     renderer = GetComponentInChildren<Renderer> ();
     focusData = GameObject.FindGameObjectWithTag ("GameController").GetComponent<FeedBackController> ();
 }
Exemplo n.º 29
0
 void Start()
 {
     fbc = GameObject.Find("FeedBackCanvas").GetComponent <FeedBackController>();
     rb  = GetComponent <Rigidbody>();
 }