Example #1
0
        public void DomainName_Unit_Equals3_OtherIsUnequivalentString()
        {
            String firstLevelLabel = "com";
            String secondLevelLabel = "vizistata";
            String subDomainLabel = "www";
            DomainName target = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabel);
            String other = new String[] { subDomainLabel, secondLevelLabel, firstLevelLabel }.Join(String.Empty);

            Boolean actual = target.Equals(other);
            Assert.IsFalse(actual);
        }
Example #2
0
        public void DomainName_Unit_Equals2_OtherIsUnequivalentDomainName4()
        {
            String firstLevelLabel = "com";
            String secondLevelLabel = "vizistata";
            DomainName target = new DomainName(firstLevelLabel, secondLevelLabel, "www");
            DomainName other = new DomainName(firstLevelLabel, secondLevelLabel, "deepblue", "something");

            Boolean actual = target.Equals(other);
            Assert.IsFalse(actual);
        }
Example #3
0
        public void DomainName_Unit_Equals3_OtherIsNull()
        {
            String firstLevelLabel = "com";
            String secondLevelLabel = "vizistata";
            String subDomainLabel = "www";
            DomainName target = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabel);
            String other = null;

            Boolean actual = target.Equals(other);
            Assert.IsFalse(actual);
        }
Example #4
0
        public void DomainName_Unit_Equals2_OtherIsUnequivalentDomainName1()
        {
            String secondLevelLabel = "vizistata";
            String subDomainLabel = "www";
            DomainName target = new DomainName("com", secondLevelLabel, subDomainLabel);
            DomainName other = new DomainName("net", secondLevelLabel, subDomainLabel);

            Boolean actual = target.Equals(other);
            Assert.IsFalse(actual);
        }
Example #5
0
        public void DomainName_Unit_Equals2_OtherIsUnequivalentDomainName2()
        {
            String firstLevelLabel = "com";
            String subDomainLabel = "www";
            DomainName target = new DomainName(firstLevelLabel, "vizistata", subDomainLabel);
            DomainName other = new DomainName(firstLevelLabel, "google", subDomainLabel);

            Boolean actual = target.Equals(other);
            Assert.IsFalse(actual);
        }
Example #6
0
        public void DomainName_Unit_Equals2_OtherIsSameAsObject()
        {
            String firstLevelLabel = "com";
            String secondLevelLabel = "vizistata";
            String subDomainLabel = "www";
            DomainName target = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabel);
            DomainName other = target;

            Boolean actual = target.Equals(other);
            Assert.IsTrue(actual);
        }
Example #7
0
        public void DomainName_Unit_Equals2_OtherIsEquivalentDomainName()
        {
            String firstLevelLabel = "com";
            String secondLevelLabel = "vizistata";
            String subDomainLabel = "www";
            DomainName target = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabel);
            DomainName other = new DomainName(firstLevelLabel.ToUpperInvariant(), secondLevelLabel.ToLowerInvariant(), subDomainLabel.ToUpperInvariant());

            Boolean actual = target.Equals(other);
            Assert.IsTrue(actual);
        }
Example #8
0
        public void DomainName_Unit_Equals1_ObjIsUnequivalentDomainName4()
        {
            String firstLevelLabel = "com";
            String secondLevelLabel = "vizistata";
            String subDomainLabel = "www";
            DomainName target = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabel);
            String [] subDomainLabels = {"deepblue", "something"};
            Object obj = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabels);

            Boolean actual = target.Equals(obj);
            Assert.IsFalse(actual);
        }
Example #9
0
        public void DomainName_Unit_Equals1_ObjIsUnequivalentDomainName2()
        {
            String firstLevelLabel = "com";
            String secondLevelLabel = "vizistata";
            String subDomainLabel = "www";
            DomainName target = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabel);
            secondLevelLabel = "google";
            Object obj = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabel);

            Boolean actual = target.Equals(obj);
            Assert.IsFalse(actual);
        }
Example #10
0
        public void DomainName_Unit_Equals1_ObjIsEquivalentString()
        {
            String firstLevelLabel = "com";
            String secondLevelLabel = "vizistata";
            String subDomainLabel = "www";
            DomainName target = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabel);
            Object obj = new String[] { subDomainLabel, secondLevelLabel, firstLevelLabel }.Join('.');

            Boolean actual = target.Equals(obj);
            Assert.IsTrue(actual);
        }