public void TryParse_TestInstanceWithUnknownAdded_EqualsTestInstance()
        {
            var act = EmailAddressCollection.Parse("[email protected],[email protected],?");
            var exp = GetTestInstance();

            CollectionAssert.AreEqual(exp, act);
        }
        public void FromJson_StringValue_AreEqual()
        {
            var act = JsonTester.Read <EmailAddressCollection>("[email protected],[email protected]");
            var exp = EmailAddressCollection.Parse("[email protected], [email protected]");

            CollectionAssert.AreEqual(exp, act);
        }
        public void ToJson_TestStruct_AreEqual()
        {
            var act = JsonTester.Write(EmailAddressCollection.Parse("[email protected], [email protected]"));
            var exp = "[email protected],[email protected]";

            Assert.AreEqual(exp, act);
        }
        public void ToCollection_EnumerartionOfEmailAddresses_EmailAddressCollection()
        {
            var collection = EmailAddressCollection.Parse("[email protected],[email protected],[email protected]").AsEnumerable();

            var act = collection.ToCollection();
            var exp = EmailAddressCollection.Parse("[email protected],[email protected],[email protected]");

            Assert.AreEqual(typeof(EmailAddressCollection), act.GetType(), "The outcome of to collection should be an email address collection.");
            CollectionAssert.AreEqual(exp, act);
        }
 public EmailAddressCollection GetTestInstance()
 {
     return(EmailAddressCollection.Parse("[email protected],[email protected]"));
 }