コード例 #1
0
 public IMoleculeTreeNode MapFrom(InteractionContainerDTO input)
 {
     return(new MoleculeTreeNode(input)
     {
         Text = input.Name, Icon = ApplicationIcons.IconByName(input.Icon)
     });
 }
 protected override void Context()
 {
     base.Context();
     _moleculeBuilderDTO   = new MoleculeBuilderDTO();
     _transporterMolecule  = new TransporterMoleculeContainerDTO().WithName("aa").WithId("bb");
     _interactionContainer = new InteractionContainerDTO().WithName("cc").WithId("dd");
     _moleculeBuilderDTO.TransporterMolecules           = new [] { _transporterMolecule };
     _moleculeBuilderDTO.InteractionContainerCollection = new[] { _interactionContainer };
 }
 protected override void Because()
 {
     _result = sut.MapFrom(_interactionContainer);
 }