public void ProcessNewDiagnoseOutputEntry_NewEntryWithLastAddedEntryIsBracketOpen_AddsDurationAndGapToTotalDiagnoseOutputViewModelDuration() { var mock = new Mock<IDiagnoseOutputEntry>(); mock.Setup(x => x.Type).Returns(DiagnoseType.StartBracketOutput); mock.Setup(x => x.Duration).Returns(1); mock.Setup(x => x.Gap).Returns(2); var diagnoseViewModel = new DiagnoseOutputViewModel(mock.Object, 0); diagnoseViewModel.ProcessNewDiagnoseOutputEntry(mock.Object, 0); diagnoseViewModel.TotalDuration.Should().Be(4); }
public void ProcessNewDiagnoseOutputEntry_NewEntryWithStartBracketOutputEndBracketOutput_IsNotBracketOpen() { var mock1 = new Mock<IDiagnoseOutputEntry>(); mock1.Setup(x => x.Type).Returns(DiagnoseType.StartBracketOutput); mock1.Setup(x => x.Duration).Returns(1); mock1.Setup(x => x.Gap).Returns(2); var mock2 = new Mock<IDiagnoseOutputEntry>(); mock2.Setup(x => x.Type).Returns(DiagnoseType.EndBracketOutput); mock2.Setup(x => x.Duration).Returns(1); mock2.Setup(x => x.Gap).Returns(2); var diagnoseViewModel = new DiagnoseOutputViewModel(mock1.Object, 0); diagnoseViewModel.ProcessNewDiagnoseOutputEntry(mock2.Object, 0); diagnoseViewModel.IsBracketOpen.Should().Be(false); }