Beispiel #1
0
        public void BreakdownPhoneNumber_InvalidInput_Throws(string phoneNumber)
        {
            var driverMock = new Mock <IWebDriver>();
            var loggerMock = new Mock <ILogger>();
            var humanizer  = new Humanizer.Humanizer(driverMock.Object);

            var sut = new QueueProcessor(driverMock.Object, humanizer);

            Assert.Throws <ArgumentException>(() =>
            {
                sut.Breakdown(phoneNumber);
            });
        }
Beispiel #2
0
        public void BreakdownPhoneNumber_ValidInput_DoesNotThrows(string phoneNumber)
        {
            var driverMock = new Mock <IWebDriver>();
            var loggerMock = new Mock <ILogger>();
            var humanizer  = new Humanizer.Humanizer(driverMock.Object);

            var sut = new QueueProcessor(driverMock.Object, humanizer);

            Assert.DoesNotThrow(() =>
            {
                sut.Breakdown(phoneNumber);
            });
        }
Beispiel #3
0
        public void BreakdownPhoneNumber_RealCaseTest()
        {
            var driverMock = new Mock <IWebDriver>();
            var loggerMock = new Mock <ILogger>();
            var humanizer  = new Humanizer.Humanizer(driverMock.Object);

            var           sut         = new QueueProcessor(driverMock.Object, humanizer);
            string        phoneNumber = "0887059096";
            List <string> expected    = new List <string>()
            {
                "0887 059 096",
                "0887 05 90 96",
                "088 705 9096",
                "0887059096"
            };

            List <string> actual = sut.Breakdown(phoneNumber);

            CollectionAssert.AreEquivalent(expected, actual);
        }