IReport is added
This commit is contained in:
@@ -22,11 +22,11 @@ namespace StructureHelperTests.FieldsVisualizerTests.ColorOperationTests
|
||||
|
||||
[TestCase(0, 100, -10, 255, 128, 128, 128)] //Gray as less than minimum
|
||||
[TestCase(0, 100, 0, 255, 255, 128, 128)]
|
||||
[TestCase(0, 100, 50, 255, 255, 255, 0)]
|
||||
[TestCase(0, 100, 100, 255, 0, 0, 255)]//Blue
|
||||
[TestCase(0, 100, 50, 255, 255, 254, 0)] //!!!!!!254 cause broading range in method!
|
||||
[TestCase(0, 100, 100, 255, 0, 0, 254)]//Blue
|
||||
[TestCase(0, 100, 110, 255,128, 128, 128)] //Gray as greater than maximum
|
||||
[TestCase(-100, 100, 110, 255, 128, 128, 128)] //Gray as greater than maximum
|
||||
[TestCase(-100, 100, 100, 255, 0, 0, 255)]//Blue
|
||||
[TestCase(-100, 100, 100, 255, 0, 0, 254)]//Blue
|
||||
[TestCase(100, 100, -100, 255, 255, 128, 128)]
|
||||
public void Run_ShouldPass(double bottomVal, double topVal, double val, int expectedA, int expectedR, int expectedG, int expectedB)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
using FieldVisualizer.Entities.ColorMaps;
|
||||
using FieldVisualizer.Entities.ColorMaps.Factories;
|
||||
using FieldVisualizer.Entities.Values;
|
||||
using FieldVisualizer.Entities.Values.Primitives;
|
||||
using FieldVisualizer.InfraStructures.Enums;
|
||||
using FieldVisualizer.Services.ColorServices;
|
||||
using FieldVisualizer.Services.PrimitiveServices;
|
||||
using FieldVisualizer.Windows;
|
||||
using NUnit.Framework;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace StructureHelperTests.FieldsVisualizerTests.WindowTests
|
||||
{
|
||||
public class ViewerTest
|
||||
{
|
||||
private IEnumerable<IPrimitiveSet> primitiveSets;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
primitiveSets = TestPrimitivesOperation.AddTestPrimitives();
|
||||
}
|
||||
public void Run_ShouldPass()
|
||||
{
|
||||
//Arrange
|
||||
//Act
|
||||
WndFieldViewer viewer = new WndFieldViewer(primitiveSets);
|
||||
//Assert
|
||||
Assert.NotNull(viewer);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -41,6 +41,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="FieldsVisualizerTests\ColorOperationTests\GetColorByValueTest.cs" />
|
||||
<Compile Include="FieldsVisualizerTests\WindowTests\ViewerTest.cs" />
|
||||
<Compile Include="FunctionalTests\Ndms\RCSections\RCSectionFromNdmPrimitiveTest.cs" />
|
||||
<Compile Include="FunctionalTests\Ndms\RCSections\RCSectionTest.cs" />
|
||||
<Compile Include="FunctionalTests\Ndms\SteelSections\ReinforcementTest.cs" />
|
||||
@@ -48,6 +49,7 @@
|
||||
<Compile Include="LibrariesTests\Ndms\RCSections\RCSectionTest.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="UnitTests\Ndms\Triangulations\RectangleTriangulationTest.cs" />
|
||||
<Compile Include="UnitTests\WindowTests\Calculations\CalculationProperties\CalculationPropertyWindowTest.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
@@ -67,6 +69,7 @@
|
||||
<HintPath>..\packages\NUnit.3.13.3\lib\net45\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
@@ -85,6 +88,10 @@
|
||||
<Project>{87064b50-3b7c-4a91-af4a-941c6f95d997}</Project>
|
||||
<Name>FieldVisualizer</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\StructureHelper.csproj">
|
||||
<Project>{BAD27E27-4444-4300-ADF8-E21042C0781D}</Project>
|
||||
<Name>StructureHelper</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\StructureHelperCommon\StructureHelperCommon.csproj">
|
||||
<Project>{5DFEC3FD-9677-47BB-9E88-EB71828B5913}</Project>
|
||||
<Name>StructureHelperCommon</Name>
|
||||
@@ -94,9 +101,7 @@
|
||||
<Name>StructureHelperLogics</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="FieldsVisualizerTests\WindowTests\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
using NUnit.Framework;
|
||||
using StructureHelper.Windows.CalculationWindows.CalculationPropertyWindow;
|
||||
using StructureHelper.Windows.ViewModels.Calculations.CalculationProperies;
|
||||
using StructureHelper.Windows.ViewModels.Calculations.CalculationResult;
|
||||
using StructureHelperLogics.Models.Calculations.CalculationProperties;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace StructureHelperTests.UnitTests.WindowTests.Calculations.CalculationProperties
|
||||
{
|
||||
public class CalculationPropertyWindowTest
|
||||
{
|
||||
private CalculationPropertyViewModel viewModel;
|
||||
private ICalculationProperty calculationProperty;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
calculationProperty = new CalculationProperty();
|
||||
viewModel = new CalculationPropertyViewModel(calculationProperty);
|
||||
}
|
||||
|
||||
public void Run_Shoulpass()
|
||||
{
|
||||
//Arrange
|
||||
|
||||
//Act
|
||||
var wnd = new CalculationPropertyView(viewModel);
|
||||
//Assert
|
||||
Assert.NotNull(wnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user