public void SwapCopiesTheCorrectPositionIntoAnotherInstance() { //Arrange var keeper = new StringKeeper("test"); var keeper2 = new StringKeeper(keeper); keeper.TakeAll(); //Act keeper.Swap(keeper2); //Assert keeper2.Finished.Should().BeTrue(); }
public void SwapImportsTheDetailsFromTheOtherInstance() { //Arrange var keeper = new StringKeeper("test"); var keeper2 = new StringKeeper(keeper); var takenData = keeper.TakeAll(); //keeper is now finished //Act keeper.Swap(keeper2); //Assert var result = keeper.TakeAll(); //if swap did not change keeper, this will return string.Empty result.Should().Be(takenData); }