示例#1
0
        public void RaiseRepairMaps()
        {
            var request = RepairMockBuilder.CreateFullRaiseRepair();

            var db = request.ToDb();

            db.AccessInformation.Description.Should().Be(request.AccessInformation.Description);
            db.AccessInformation.Keysafe.Code.Should().Be(request.AccessInformation.Keysafe.Code);
            db.AccessInformation.Keysafe.Location.Should().Be(request.AccessInformation.Keysafe.Location);
            db.DateReported.Should().Be(request.DateReported);
            db.DescriptionOfWork.Should().Be(request.DescriptionOfWork);
            db.EstimatedLaborHours.Should().Be(request.EstimatedLaborHours);
            db.LocationOfRepair.Should().Be(request.LocationOfRepair);
            db.ParkingArrangements.Should().Be(request.ParkingArrangements);
            db.WorkType.Should().Be(request.WorkType);
            db.WorkPriority.RequiredCompletionDateTime.Should().Be(request.Priority.RequiredCompletionDateTime);
            db.WorkPriority.PriorityDescription.Should().Be(request.Priority.PriorityDescription);
            db.WorkPriority.PriorityCode.Should().Be((int)request.Priority.PriorityCode);
            db.WorkPriority.NumberOfDays.Should().Be(request.Priority.NumberOfDays);
            db.WorkPriority.Comments.Should().Be(request.Priority.Comments);
            db.WorkClass.WorkClassCode.Should().Be(request.WorkClass.WorkClassCode);
            db.WorkClass.WorkClassDescription.Should().Be(request.WorkClass.WorkClassDescription);
            db.WorkClass.WorkClassSubType.WorkClassSubTypeDescription.Should().Be(request.WorkClass.WorkClassSubType.WorkClassSubTypeDescription);
            db.WorkClass.WorkClassSubType.WorkClassSubTypeName.Should().Be(string.Join(',', request.WorkClass.WorkClassSubType.WorkClassSubType1));
        }
示例#2
0
        public void RaiseRepairThrowsNotSupportedWhenMultipleSitesProvided()
        {
            var request = RepairMockBuilder.CreateFullRaiseRepair();

            request.SitePropertyUnit.Add(new SitePropertyUnit());

            Assert.Throws <NotSupportedException>(() => request.ToDb());
        }