BloomTests.WebLibraryIntegration.BookTransferTests.UploadBooks_SimilarIds_DoNotOverwrite C# (CSharp) Method

UploadBooks_SimilarIds_DoNotOverwrite() private method

private UploadBooks_SimilarIds_DoNotOverwrite ( ) : void
return void
        public void UploadBooks_SimilarIds_DoNotOverwrite()
        {
            var firstPair = UploadAndDownLoadNewBook("first", "book1", "Jack", "Jack's data");
            var secondPair = UploadAndDownLoadNewBook("second", "book1", "Jill", "Jill's data");
            var thirdPair = UploadAndDownLoadNewBook("third", "book2", "Jack", "Jack's other data");

            // Data uploaded with the same id but a different uploader should form a distinct book; the Jill data
            // should not overwrite the Jack data. Likewise, data uploaded with a distinct Id by the same uploader should be separate.
            var jacksFirstData = File.ReadAllText(firstPair.Item2.CombineForPath("one.htm"));
            // We use stringContaining here because upload does make some changes...for example connected with marking the
            // book as lockedDown.
            Assert.That(jacksFirstData, Is.StringContaining("Jack's data"));
            var jillsData = File.ReadAllText(secondPair.Item2.CombineForPath("one.htm"));
            Assert.That(jillsData, Is.StringContaining("Jill's data"));
            var jacksSecondData = File.ReadAllText(thirdPair.Item2.CombineForPath("one.htm"));
            Assert.That(jacksSecondData, Is.StringContaining("Jack's other data"));

            // Todo: verify that we got three distinct book records in parse.com
        }