Exemplo n.º 1
0
        public void Emails_With_Plus_And_Dots_Should_Handle_Properly()
        {
            // Arrange
            var solution = new UniqueEmailAddressesSolution();

            //act
            var result = solution.NumUniqueEmails(new string[] { "*****@*****.**", "*****@*****.**" });

            //Assert
            Assert.Equal(1, result);
        }
Exemplo n.º 2
0
        public void Empty_Collection_Should_Return_0()
        {
            // Arrange
            var solution = new UniqueEmailAddressesSolution();

            //act
            var result = solution.NumUniqueEmails(new string[] { });

            //Assert
            Assert.Equal(0, result);
        }
Exemplo n.º 3
0
        public void Different_Emails_Should_Handle_Properly()
        {
            // Arrange
            var solution = new UniqueEmailAddressesSolution();

            //act
            var result = solution.NumUniqueEmails(new string[]
                                                  { "*****@*****.**", "testemail@leet+code.com", "*****@*****.**" });

            //Assert
            Assert.Equal(2, result);
        }
Exemplo n.º 4
0
        public void All_Same_Emails_Should_Return_1()
        {
            // Arrange
            var solution = new UniqueEmailAddressesSolution();

            //act
            var result = solution.NumUniqueEmails(new string[]
                                                  { "*****@*****.**", "*****@*****.**", "*****@*****.**" });

            //Assert
            Assert.Equal(1, result);
        }