public void Get_The_Correct_Starting_Position() { var indexMethod = new IndexMethod(); indexMethod.TimeTravelFacade = new TimeTravelFacadeBuilder() .WithFirstPosition(new Position(1, 1)) .Build(); indexMethod.GetStartingPosition(new IndexOptions()).Should().Be(new Position(1, 1)); indexMethod.GetStartingPosition(new IndexOptions { Start = new Position(2, 2) }).Should() .Be(new Position(2, 2)); }
public void Identify_Correct_Starting_Position() { // Arrange var options = new IndexOptions { Start = new Position(0x35, 0x1) }; var dbg = new DebugEngineProxyBuilder(); var indexMethod = new IndexMethod(); indexMethod.DebugEngineProxy = dbg.Build(); var builder = new TimeTravelFacadeBuilder(dbg); builder.WithGetStartingPosition(new Position(0x35, 0)); indexMethod.TimeTravelFacade = builder.Build(); // Act var startingPosition = indexMethod.GetStartingPosition(options); // Assert startingPosition.Should().Be(new Position(0x35, 1), "35:1 means that the high portion is 35 and the low portion is 1"); }