示例#1
0
 /// <summary>
 /// Создание экземпляров классов
 /// слоя Model шаблона MVP.
 /// </summary>
 void InitCanvasModelLayer()
 {
     painter                      = new Painter(viewMainForm.GetPictureBoxWidth, viewMainForm.GetPictureBoxHeight);
     colorsInstanceList           = new ColorsInstanceList();
     figureInstanceList           = new FigureInstanceList();
     figureInstanceList.Instances = TypeFinder.CreateInstances <IFigure>();
     colorsInstanceList.Instances = TypeFinder.CreateInstances <IColor>();
 }
        public void CreateInstance_PassIFigureType_ListReturnSuccess()
        {
            //Arrange
            FigureInstanceList figureInstanceList = new FigureInstanceList();
            List <IFigure>     expected;

            //Act
            figureInstanceList.Instances = TypeFinder.CreateInstances <IFigure>();
            expected = figureInstanceList.Instances;
            //Assert
            Assert.AreEqual(typeof(List <IFigure>), expected.GetType());
        }