コード例 #1
0
        public void HeartRateRecordController_GetAllHeartRateData_Test()
        {
            //arrange
            var mockController      = new HeartRateRecordController();
            var heartRateRecordData = new UsernameData()
            {
                username = "******",
            };

            //act
            var result = mockHeartRateRecordService.Object.GetAllHeartRateData(heartRateRecordData);

            //assert
            Assert.True(result.IsCompletedSuccessfully);
        }
コード例 #2
0
        public void HeartRateRecordController_GetRestingHeartRateHistory_Test()
        {
            //arrange
            var mockController      = new HeartRateRecordController();
            var heartRateRecordData = new UsernameData()
            {
                username = "******",
            };

            //act
            var result = mockHeartRateRecordService.Object.GetRestingHeartRateHistory(heartRateRecordData);

            //assert
            Assert.True(result.IsCompletedSuccessfully);
        }
コード例 #3
0
        public void HeartRateRecordController_RecordHeartRate_Test()
        {
            //arrange
            var mockController      = new HeartRateRecordController();
            var heartRateRecordData = new HeartRateRecordData()
            {
                username  = "******",
                type      = "Running",
                startTime = 983409823704981,
                endTime   = 8304983209483200,
                bpmLow    = 50.0,
                bpmHigh   = 150.0,
                bpmAvg    = 100.0
            };

            //act
            var result = mockHeartRateRecordService.Object.RecordHeartRate(heartRateRecordData);

            //assert
            Assert.True(result.IsCompletedSuccessfully);
        }