Skip to content

Commit

Permalink
now supports deployment state planned (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
runeanielsen authored Feb 10, 2023
1 parent a1e40f1 commit 8e1777d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<ItemGroup>
<PackageReference Include="MediatR" Version="8.1.0" />
<PackageReference Include="OpenFTTH.Events" Version="2.2.0" />
<PackageReference Include="OpenFTTH.Events" Version="3.2.0" />
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions src/OpenFTTH.GDBIntegrator.RouteNetwork/Mapping/InfoMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public class InfoMapper : IInfoMapper
return DeploymentStateEnum.OutOfService;
case "removed":
return DeploymentStateEnum.Removed;
case "planned":
return DeploymentStateEnum.Planned;
default:
throw new ArgumentException($"Value '{deploymentStateStringRepresentation}' is not valid'");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="NetTopologySuite.IO.GeoJSON" Version="2.0.3" />
<PackageReference Include="OpenFTTH.Events" Version="2.2.0" />
<PackageReference Include="OpenFTTH.Events" Version="3.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class SerializationMapperTest
[InlineData("NotYetInstalled", DeploymentStateEnum.NotYetInstalled)]
[InlineData("OutOfService", DeploymentStateEnum.OutOfService)]
[InlineData("Removed", DeploymentStateEnum.Removed)]
[InlineData("Planned", DeploymentStateEnum.Planned)]
[InlineData("", null)]
[InlineData(null, null)]
public void MapDeploymentState_ShouldReturnMappedEnumDeploymentState_OnBeingPassedValidStringRepresentation(string deploymentStateStringReprestation, DeploymentStateEnum? expected)
Expand Down

0 comments on commit 8e1777d

Please sign in to comment.