Ejemplo n.º 1
0
        public void SaveActivityDiaryBulkDetails_Error()
        {
            ActivityDiaryDetailsBulkModel request = new ActivityDiaryDetailsBulkModel()
            {
                ActivityId = 987654321, OverrideFlag = "N", StartDate = DateTime.Now.AddDays(-7), EndDate = DateTime.Now, Attendances = new List <AttendanceModel>()
            };

            var response = new AASaveBulkResponse
            {
            };

            mockAttendanceWcf.Setup(m => m.SaveAttendancesBulk(It.IsAny <AASaveBulkRequest>())).Throws(new FaultException());

            var result = SystemUnderTest().SaveActivityDiaryBulkDetails(request);

            Assert.IsNotNull(result);
        }
Ejemplo n.º 2
0
        public void GetActivityDiaryBulkDetails_Error()
        {
            ActivityDiaryDetailsBulkModel request = new ActivityDiaryDetailsBulkModel()
            {
                FromDate = DateTime.Now
            };

            var response = new AADetailsBulkResponse
            {
            };

            mockAttendanceWcf.Setup(m => m.GetActivityAttendanceListBulk(It.IsAny <AADetailsBulkRequest>())).Throws(new FaultException());

            var result = SystemUnderTest().GetActivityDiaryBulkDetails(request);

            Assert.IsNotNull(result);
        }