Ejemplo n.º 1
0
 private void LoadSettings()
 {
     using (DecoupledStorage storage = OptUnitTestVisualizer.Storage)
     {
         ShadeAttribute          = OptUnitTestVisualizer.ReadShadeAttribute(storage);
         DrawArrowToAssert       = OptUnitTestVisualizer.ReadDrawArrow(storage);
         ShortenLongStrings      = OptUnitTestVisualizer.ReadShortenLongStrings(storage);
         MaxContextLength        = Convert.ToInt32(OptUnitTestVisualizer.ReadMaxContextLength(storage));
         ConvertEscapeCharacters = OptUnitTestVisualizer.ReadConvertEscapeCharacters(storage);
         AttributeColors         = new ShadeColors {
             PassedColor  = Platform.Color.ConvertFrom(OptUnitTestVisualizer.ReadTestPassColor(storage)),
             FailedColor  = Platform.Color.ConvertFrom(OptUnitTestVisualizer.ReadTestFailColor(storage)),
             SkippedColor = Platform.Color.ConvertFrom(OptUnitTestVisualizer.ReadTestSkipColor(storage))
         };
     }
 }
Ejemplo n.º 2
0
		private void LoadSettings()
		{
			using (DecoupledStorage storage = OptUnitTestVisualizer.Storage)
			{
				ShadeAttribute = OptUnitTestVisualizer.ReadShadeAttribute(storage);
				DrawArrowToAssert = OptUnitTestVisualizer.ReadDrawArrow(storage);
				ShortenLongStrings = OptUnitTestVisualizer.ReadShortenLongStrings(storage);
				MaxContextLength = Convert.ToInt32(OptUnitTestVisualizer.ReadMaxContextLength(storage));
				ConvertEscapeCharacters = OptUnitTestVisualizer.ReadConvertEscapeCharacters(storage);
				AttributeColors = new ShadeColors {
					PassedColor = Platform.Color.ConvertFrom(OptUnitTestVisualizer.ReadTestPassColor(storage)),
					FailedColor = Platform.Color.ConvertFrom(OptUnitTestVisualizer.ReadTestFailColor(storage)),
					SkippedColor = Platform.Color.ConvertFrom(OptUnitTestVisualizer.ReadTestSkipColor(storage))
				};
			}
		}
		private static Platform.Color GetColor(TestStatus status, ShadeColors colors)
		{
			switch (status)
			{
				//case TestStatus.Pending:
				default:
					return Platform.Color.ConvertFrom(CodeRush.VSSettings.BackgroundColor);
				case TestStatus.Ignored:
					return colors.SkippedColor;
				case TestStatus.Passed:
					//case TestStatus.PassedWithChanges:
					return colors.PassedColor;
				case TestStatus.Failure:
					//case TestStatus.FailedWithChanges:
					return colors.FailedColor;
			}
		}
        private static Platform.Color GetColor(TestStatus status, ShadeColors colors)
        {
            switch (status)
            {
            //case TestStatus.Pending:
            default:
                return(Platform.Color.ConvertFrom(CodeRush.VSSettings.BackgroundColor));

            case TestStatus.Ignored:
                return(colors.SkippedColor);

            case TestStatus.Passed:
                //case TestStatus.PassedWithChanges:
                return(colors.PassedColor);

            case TestStatus.Failure:
                //case TestStatus.FailedWithChanges:
                return(colors.FailedColor);
            }
        }
 public TestAttributeShaderAdornmentDocumentAdornment(SourceRange range, TestStatus status, ShadeColors colors)
     : base(range)
 {
     this.status = status;
     this.colors = colors;
 }
		public TestAttributeShaderAdornmentDocumentAdornment(SourceRange range, TestStatus status, ShadeColors colors)
			: base(range)
		{
			this.status = status;
			this.colors = colors;
		}