Added reviewing of results in graphic mode
This commit is contained in:
@@ -20,15 +20,18 @@ namespace StructureHelperTests.FieldsVisualizerTests.ColorOperationTests
|
||||
valueRange = new ValueRange() { BottomValue = 0, TopValue = 100 };
|
||||
}
|
||||
|
||||
[TestCase(-10, 255, 128, 128, 128)] //Gray as less than minimum
|
||||
[TestCase(0, 255, 255, 128, 128)]
|
||||
[TestCase(50, 255, 255, 255, 0)]
|
||||
[TestCase(100, 255, 0, 0, 255)]//Blue
|
||||
[TestCase(110, 255,128, 128, 128)] //Gray as greater than maximum
|
||||
public void Run_ShouldPass(double val, int expectedA, int expectedR, int expectedG, int expectedB)
|
||||
[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, 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, 255, 128, 128)]
|
||||
public void Run_ShouldPass(double bottomVal, double topVal, double val, int expectedA, int expectedR, int expectedG, int expectedB)
|
||||
{
|
||||
//Arrange
|
||||
|
||||
valueRange = new ValueRange() { BottomValue = bottomVal, TopValue = topVal };
|
||||
//Act
|
||||
var result = ColorOperations.GetColorByValue(valueRange, FullSpectrum, val);
|
||||
var actualA = result.A;
|
||||
|
||||
@@ -94,6 +94,9 @@
|
||||
<Name>StructureHelperLogics</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="FieldsVisualizerTests\WindowTests\" />
|
||||
</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">
|
||||
|
||||
Reference in New Issue
Block a user