예제 #1
0
        public void ThrowAnErrorIfPasswordInPassword()
        {
            // arrange
            var loggerMock = new Mock <ILogger <OurProcessor> >();
            var sut        = new OurProcessor(loggerMock.Object);

            // act
            // assert
            Assert.Throws <Exception>(() => sut.GetHash("ThisStringContainsPasswordInIt!"));
        }
예제 #2
0
        public void ReturnAHashedStringGivenAValidInputString()
        {
            // arrange
            var loggerMock = new Mock <ILogger <OurProcessor> >();
            var sut        = new OurProcessor(loggerMock.Object);

            // act
            var response = sut.GetHash("ThisNeedsScrambling123!");

            // assert
            Assert.Equal("eb6dadbf06b64cfde0b4a412bcccbfa35e4dbe665e6200361558ca433186de23", response);
        }