Esempio n. 1
0
        public void GlasgoTest_SoporNotError()
        {
            // arrange
            var model = new GlasgoQuery
            {
                MotorResponse  = 4,
                VerbalResponse = 4,
                EyeResponse    = 3
            };

            // act
            var handler = new GlasgoHandler();
            var result  = handler.Handle(model).Result;

            // assert
            Assert.AreEqual(11, result.Index);
            Assert.AreEqual(GlasgoResponse.Sopor, result.GetResult);
        }
Esempio n. 2
0
        public void GlasgoTest_BeyondComaNotError()
        {
            // arrange
            var model = new GlasgoQuery
            {
                MotorResponse  = 1,
                VerbalResponse = 1,
                EyeResponse    = 1
            };

            // act
            var handler = new GlasgoHandler();
            var result  = handler.Handle(model).Result;

            // assert
            Assert.AreEqual(3, result.Index);
            Assert.AreEqual(GlasgoResponse.BeyondComa, result.GetResult);
        }
Esempio n. 3
0
        public void GlasgoTest_LightStunningNotError()
        {
            // arrange
            var model = new GlasgoQuery
            {
                MotorResponse  = 5,
                VerbalResponse = 5,
                EyeResponse    = 4
            };

            // act
            var handler = new GlasgoHandler();
            var result  = handler.Handle(model).Result;

            // assert
            Assert.AreEqual(14, result.Index);
            Assert.AreEqual(GlasgoResponse.LightStunning, result.GetResult);
        }
Esempio n. 4
0
        public void GlasgoTest_ClearMindNotError()
        {
            // arrange
            var model = new GlasgoQuery
            {
                MotorResponse  = 6,
                VerbalResponse = 5,
                EyeResponse    = 4
            };

            // act
            var handler = new GlasgoHandler();
            var result  = handler.Handle(model).Result;

            // assert
            Assert.AreEqual(15, result.Index);
            Assert.AreEqual(GlasgoResponse.ClearMind, result.GetResult);
        }
Esempio n. 5
0
 public async Task <GlasgoResponse> CalculateGlasgo(GlasgoQuery query)
 {
     return(await _glasgoHandler.Handle(query));
 }