DD.WellWorkover.Cloud/AsbCloudWebApi.Tests/Builders/DetectableTelemetryBuilder.cs

69 lines
1.5 KiB
C#

using System;
using AsbCloudInfrastructure.Services.DetectOperations;
namespace AsbCloudWebApi.Tests.Builders;
public class DetectableTelemetryBuilder
{
private DateTimeOffset dateTime = DateTimeOffset.UtcNow;
private float wellDepth = 300;
private float pressure = 15;
private float hookWeight = 20;
private float blockPosition = 20;
private float bitDepth = 151;
private float axialLoad = 19;
public DetectableTelemetryBuilder WithDateTime(DateTimeOffset newDateTime)
{
dateTime = newDateTime;
return this;
}
public DetectableTelemetryBuilder WithWellDepth(float newWllDepth)
{
wellDepth = newWllDepth;
return this;
}
public DetectableTelemetryBuilder WithPressure(float newPressure)
{
pressure = newPressure;
return this;
}
public DetectableTelemetryBuilder WithHookWeight(float newHookWeight)
{
hookWeight = newHookWeight;
return this;
}
public DetectableTelemetryBuilder WithBlockPosition(float newBlockPosition)
{
blockPosition = newBlockPosition;
return this;
}
public DetectableTelemetryBuilder WithBitDepth(float newBitDepth)
{
bitDepth = newBitDepth;
return this;
}
public DetectableTelemetryBuilder WithAxialLoad(float newAxialLoad)
{
axialLoad = newAxialLoad;
return this;
}
public DetectableTelemetry Build() =>
new()
{
DateTime = dateTime,
WellDepth = wellDepth,
Pressure = pressure,
HookWeight = hookWeight,
BlockPosition = blockPosition,
BitDepth = bitDepth,
AxialLoad = axialLoad
};
}