public void Serialize_Always_ReturnsTheCorrectValue() { var forceProjecion = new ForceProjecion { Id = "A12", X = 2500, Y = 3000 }; var serializedValue = _subject.Serialize(forceProjecion); serializedValue.Should().Be("A12,2500,3000"); }
public void Start_AStateIsReceived_SavesTheProcessedForceProjection() { var newClimbingHoldState = new ClimbingHoldState(); _mockStateReaderService.Setup(sr => sr.ClimbingHoldStates) .Returns(Observable.Return(newClimbingHoldState)); var forceProjecion = new ForceProjecion(); _mockStateProcessor.Setup(p => p.Process(newClimbingHoldState)).Returns(forceProjecion); _subject.Start(); _testScheduler.Start(); _mockForceProjectionRepository.Verify(r => r.Save(forceProjecion)); }
public IObservable <ForceProjecion> Save(ForceProjecion state) { base.Save(_serializer.Serialize(state)); return(Observable.Return(state)); }
public string Serialize(ForceProjecion forceProjecion) { return($"{forceProjecion.Id}{Separator}{forceProjecion.X}{Separator}{forceProjecion.Y}"); }