public void ShouldReturnFingerprintBasedOnLogFileDateAndTemplateDate()
        {
            const string TEST_TOKEN   = "test token";
            DateTime     logFileDate  = new DateTime(2006, 12, 2, 1, 4, 5);
            DateTime     templateDate = new DateTime(2005, 1, 2);

            DynamicMock requestMock = new DynamicMock(typeof(IRequest));

            requestMock.SetupResult("SubFolders", new string[] { "server", "testServer", "project", "testProject", "build", "testBuild" });

            ConditionalGetFingerprint expectedFingerprint = new ConditionalGetFingerprint(logFileDate, TEST_TOKEN);

            Assert.AreEqual(expectedFingerprint, buildLogAction.GetFingerprint((IRequest)requestMock.MockInstance));
        }
Beispiel #2
0
        public void ShouldReturnFingerprintBasedOnLogFileDateAndTemplateDate()
        {
            const string TEST_TOKEN   = "test token";
            DateTime     logFileDate  = new DateTime(2006, 12, 2, 1, 4, 5);
            DateTime     templateDate = new DateTime(2005, 1, 2);

            var requestMock = new Mock <IRequest>();

            requestMock.SetupGet(_request => _request.SubFolders).Returns(new string[] { "server", "testServer", "project", "testProject", "build", "testBuild" });

            ConditionalGetFingerprint expectedFingerprint = new ConditionalGetFingerprint(logFileDate, TEST_TOKEN);

            Assert.AreEqual(expectedFingerprint, buildLogAction.GetFingerprint((IRequest)requestMock.Object));
        }