private void FillImageList() { imgListMC.ImageSize = _display.ScaleSize(imgListMC.ImageSize); imgListMC.Images.Add(_display.ScaleImage(Resources.brick)); imgListMC.Images.Add(_display.ScaleImage(Resources.InformationSmall)); imgListMC.Images.Add(_display.ScaleImage(Resources.WarningSmall)); imgListMC.Images.Add(_display.ScaleImage(Resources.ErrorSmall)); }
public void ScaleSizeReturnsNewSizeWithCorrectlyScaledWidth() { var graphics = Substitute.For <IGraphicsProvider>(); graphics.GetResolutionScalingFactor().Returns(new SizeF(4, 2)); var sut = new DisplayProperties(graphics); var initialValue = new Size(12, 16); var scaledValue = sut.ScaleSize(initialValue); Assert.That(scaledValue.Width, Is.EqualTo(sut.ResolutionScalingFactor.Width * initialValue.Width)); }