public void GetChallengeAdapter_Success() { // Arrange var requestBuilder = new ChallengeBuilder().FavoratePassTime(); var mokAdapter = new ChallengeAdapter(); // Act var response = mokAdapter.Get(Guid.NewGuid()); var expected = requestBuilder.UpdateId(response.Id).Build(); // Assert Assert.IsNotNull(response); var compareDetails = Comparer.Compare(expected, response); compareDetails.DisplayDifferences(); Assert.IsTrue(compareDetails.AreEqual, "The initative comparison failed"); }
public void EditChallengeProvider_Success() { // Arrange var requestBuilder = new ChallengeBuilder().FavoratePassTime().UpdateQuestion("Custom question"); var mokAdapter = new AdapterBuilder().AddUpdateStub(requestBuilder.Build()).Build(); var provider = new ChallengeProvider(mokAdapter); // Act var response = provider.Update(requestBuilder.Id, requestBuilder.BuildRequest()); var expected = requestBuilder.UpdateId(response.Id).Build(); // Assert Assert.IsNotNull(response); var compareDetails = Comparer.Compare(expected, response); compareDetails.DisplayDifferences(); Assert.IsTrue(compareDetails.AreEqual, "The initative comparison failed"); }