public void PluginMustEnsureValidAddressesEvenAnInvalidLocalPartIsProvided()
        {
            var referenceValue = "ka rl";
            var fake           = new FakeRandomizerPlugin <string>(referenceValue);

            var sut = new EmailAddresses(fake);

            var result = sut.GetValue();

            StringAssert.Matches(result, RFC5322RegEx, StandardAssertMessage);
        }
        public void PluginMustEnsureValidAddressesEvenAnInvalidLocalPartIsProvided()
        {
            var referenceValue = "ka rl";
            var fake           = new FakeRandomizerPlugin <string>(referenceValue);

            var sut = new EmailAddresses(fake);

            var result = sut.GetValue();

            Assert.True(RFC5322RegEx.IsMatch(result));
        }
        public void PluginMustEnsureValidAddressesEvenAnInvalidDomainNameIsProvided()
        {
            var referenceValue = "googlecom";
            var fake           = new FakeRandomizerPlugin <string>(referenceValue);

            var sut = new EmailAddresses(fake, fake);

            var result = sut.GetValue();

            Assert.IsTrue(RFC5322RegEx.IsMatch(result));
        }
        public void LocalPathMustBeUsedFromRandomData()
        {
            var referenceValue = "karl";
            var fake           = new FakeRandomizerPlugin <string>(referenceValue);

            var sut = new EmailAddresses(fake);

            var result = sut.GetValue();

            Assert.StartsWith(referenceValue, result);
            Assert.True(RFC5322RegEx.IsMatch(result));
        }
        public void DomainNamesAreUsedFromRandomData()
        {
            var referenceValue = "google.com";
            var fake           = new FakeRandomizerPlugin <string>(referenceValue);

            var sut = new EmailAddresses(fake, fake);

            var result = sut.GetValue();

            Assert.EndsWith(referenceValue, result);
            Assert.True(RFC5322RegEx.IsMatch(result));
        }
        public void LocalPathMustBeUsedFromRandomData()
        {
            var referenceValue = "karl";
            var fake           = new FakeRandomizerPlugin <string>(referenceValue);

            var sut = new EmailAddresses(fake);

            var result = sut.GetValue();

            StringAssert.StartsWith(result, referenceValue);
            StringAssert.Matches(result, RFC5322RegEx, StandardAssertMessage);
        }
        public void DomainNamesAreUsedFromRandomData()
        {
            var referenceValue = "google.com";
            var fake           = new FakeRandomizerPlugin <string>(referenceValue);

            var sut = new EmailAddresses(fake, fake);

            var result = sut.GetValue();

            StringAssert.EndsWith(result, referenceValue);
            StringAssert.Matches(result, RFC5322RegEx, StandardAssertMessage);
        }