public void Assemble_part_dto_from_part()
        {
            var assembler = new PartAssembler();
            var part      = Fixtures.BuildSinglePart();

            var partDto = assembler.WritePartDto(part);

            Assert.Equal(5, partDto.Components.Count());
            Assert.Equal(5, partDto.Labor.Count());
        }
示例#2
0
        public PartDTO GetPart(string partNumber)
        {
            var part = _partRepository.Get(x => x.PartNumber == partNumber);

            return(_partAssembler.WritePartDto(part));
        }