Instantly share code, notes, and snippets.

@bpatra /gist:9518403
Last active Aug 29, 2015

Embed
What would you like to do?
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
//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