Пример #1
0
 public void Should_Report_CodeBase_Attributes_Simple_Case()
 {
     codeBase.LinesOfCode().Should().Be(100);
     codeBase.InstanceCount().Should().Be(2);
     codeBase.AverageToxicity().Should().Be(0d);
     codeBase.Density().Should().Be(50d);
     codeBase.Duplicates().Should().Be(0.02d);
 }
Пример #2
0
 private void DisplayWorkspaceDetails()
 {
     App.ViewModel.ProjectName = CodeBase.Name;
     SetInstanceLabel(CodeBase.SourceType);
     RunDateTextBox.Text            = CodeBase.RunDate.ToString("yyyy-MM-dd HH:mm");
     LocTextBlock.Text              = CodeBase.LinesOfCode().ToString("N0", CultureInfo.InvariantCulture);
     TypesTextBlock.Text            = CodeBase.InstanceCount().ToString("N0", CultureInfo.InvariantCulture);
     ToxicityTextBlock.Text         = CodeBase.AverageToxicity().ToString("N2", CultureInfo.InvariantCulture);
     AbsoluteToxicityTextBlock.Text = CodeBase.AbsoluteToxicity().ToString("N0", CultureInfo.InvariantCulture);
     CodeDensityTextBlock.Text      = CodeBase.Density().ToString("N2", CultureInfo.InvariantCulture);
     DuplicateTextBlock.Text        = CodeBase.Duplicates().ToString("P", CultureInfo.InvariantCulture);
     Renderlayout();
 }