second example of unit test: when the source is the block containing the two last rows and the target is the second one then the order should not be changed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//same class as before constructor and fields remain the same | |
[TestMethod] | |
public void When_Source_Is_Block_LastTwoRows_And_Target_The_Second_Row_Then_Drop_ShouldNot_Modify_Order() | |
{ | |
var dropInfo = new Mock<IDropInfo>(); | |
dropInfo.SetupGet(m => m.Data).Returns(new[] { _club3, _club4 }); | |
dropInfo.SetupGet(m => m.InsertIndex).Returns(2); | |
_championshipBetViewModel.Drop(dropInfo.Object); | |
var resultClubs = _championshipBetViewModel.FootballClubs.Select(x => x.FullName).ToArray(); | |
CollectionAssert.AreEqual(new[] { "Club1", "Club2", "Club3", "Club4" }, resultClubs); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment