Example #1
0
        public void UpdateChallengeAdapter_Success()
        {
            // Arrange
            var requestBuilder = new ChallengeBuilder().FavoratePassTime();
            var mokAdapter     = new ChallengeAdapter();

            // Act
            var response = mokAdapter.Update(Guid.NewGuid(), requestBuilder.Build());
            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");
        }
Example #2
0
        public void GetChallengeProvider_Success()
        {
            // Arrange
            var requestBuilder = new ChallengeBuilder().FavoratePassTime();
            var mokAdapter     = new AdapterBuilder().AddGetStub(requestBuilder.Build()).Build();
            var provider       = new ChallengeProvider(mokAdapter);

            // Act
            var response = provider.Get(requestBuilder.Id);
            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");
        }