public void CountDigits(int expected, string word)
        {
            var ml     = new GroupTwoFunctions();
            var result = ml.CountDigits(word);

            Assert.Equal(result, expected);
        }
        public void CheckWhiteSpace(Boolean expected, string word)
        {
            var ml     = new GroupTwoFunctions();
            var result = ml.CheckWhiteSpace(word);

            Assert.Equal(result, expected);
        }
        public void CamelString(string expected, string word)
        {
            var ml     = new GroupTwoFunctions();
            var result = ml.CamelString(word);

            Assert.Equal(result, expected);
        }
        public void IsTriangularNum(Boolean expected, int num)
        {
            var ml     = new GroupTwoFunctions();
            var result = ml.IsTriangularNum(num);

            Assert.Equal(result, expected);
        }
        public void FarenheitToCelcius(int expected, int farenheit)
        {
            var ml     = new GroupTwoFunctions();
            var result = ml.FarenheitToCelcius(farenheit);

            Assert.Equal(result, expected);
        }
Exemplo n.º 6
0
        public void IsTriangularNum_test(bool expected, int input)
        {
            GroupTwoFunctions G1 = new GroupTwoFunctions();
            var result           = G1.IsTriangularNum();

            Assert.Equal(expected, result);
        }
Exemplo n.º 7
0
        public void FarenheitToCelcius_test(int expected, int input)
        {
            GroupTwoFunctions G1 = new GroupTwoFunctions();

            ;
            Assert.Equal(expected, G1.FarenheitToCelcius());
        }
Exemplo n.º 8
0
        public void CamelString_test(string expected, string input)
        {
            GroupTwoFunctions G1 = new GroupTwoFunctions();

            ;
            Assert.Equal(expected, G1.CamelString());
        }
Exemplo n.º 9
0
        public void CountDigits_test(int expected, string input)
        {
            GroupTwoFunctions G1 = new GroupTwoFunctions();

            ;
            Assert.Equal(expected, G1.CountDigits());
        }
Exemplo n.º 10
0
        public void CalcRectPerimeter(int expected, int length, int width)
        {
            //construct if need to
            var ml     = new GroupTwoFunctions();
            var result = ml.CalcRectPerimeter(length, width);

            Assert.Equal(result, expected);
        }
Exemplo n.º 11
0
        public void CheckWhiteSpace_Test()
        {
            GroupTwoFunctions g2 = new GroupTwoFunctions();

            Assert.True(g2.CheckWhiteSpace("    Melbourne Victoria   "));
            Assert.True(g2.CheckWhiteSpace("    Melbourne"));
            Assert.True(g2.CheckWhiteSpace("Melbourne       "));
            Assert.False(g2.CheckWhiteSpace("Melbourne"));
        }
Exemplo n.º 12
0
        public void CalcRectPerimeter_Test()
        {
            GroupTwoFunctions g2 = new GroupTwoFunctions();

            Assert.Equal(18, g2.CalcRectPerimeter(4, 5));
            //Assert.Equal(6 ,  g2.CalcRectPerimeter(1 , 1)); This test fails the entire condition
            Assert.Equal(2240, g2.CalcRectPerimeter(800, 320));
            Assert.Equal(2002, g2.CalcRectPerimeter(1, 1000));
        }
Exemplo n.º 13
0
        public void CheckWhiteSpace_test(bool expected, int input)
        {
            GroupTwoFunctions G1 = new GroupTwoFunctions();

            ;
            var result = G1.CheckWhiteSpace();

            Assert.Equal(expected, result);
        }
Exemplo n.º 14
0
        public void CountDigits_Test()
        {
            GroupTwoFunctions g2 = new GroupTwoFunctions();

            Assert.Equal(5, g2.CountDigits("Sw1nbu2rne3 Un4iver5sity"));
            Assert.Equal(0, g2.CountDigits("melbourne victoria"));
            Assert.Equal(11, g2.CountDigits("12345678910"));
            Assert.Equal(6, g2.CountDigits("a1b2c3d4e5f6"));
        }
Exemplo n.º 15
0
        public void CamelString_Test()
        {
            GroupTwoFunctions g2 = new GroupTwoFunctions();

            Assert.Equal("aHlAm", g2.CamelString("ahlam"));
            Assert.Equal("mElBoUrNe", g2.CamelString("Melbourne"));
            Assert.Equal("mElBoUrNe vIc", g2.CamelString("Melbourne Vic"));
            Assert.Equal(" MeLbOuRnE ViC", g2.CamelString(" melbourne vic"));
            Assert.Equal("mElBoUrNe", g2.CamelString("MELBOURNE"));
        }
Exemplo n.º 16
0
        public void FarenheitToCelcius_Test()
        {
            GroupTwoFunctions g2 = new GroupTwoFunctions();

            //Assert.Equal(-18 , g2.FarenheitToCelcius(0) ); This test will always fail the implimentation fail the entire implimentation as it is the only one to round up (the rest round down even when above .5)
            Assert.Equal(-26, g2.FarenheitToCelcius(-15));
            Assert.Equal(37, g2.FarenheitToCelcius(100));
            Assert.Equal(65, g2.FarenheitToCelcius(150));
            Assert.Equal(537, g2.FarenheitToCelcius(1000));
        }
Exemplo n.º 17
0
        public void IsTriangularNum_Test()
        {
            GroupTwoFunctions g2 = new GroupTwoFunctions();
            int num1             = 3;
            int num2             = 0;
            int num3             = 1431;
            int num4             = 870;

            Assert.True(g2.IsTriangularNum(num1));
            Assert.True(g2.IsTriangularNum(num2));
            Assert.True(g2.IsTriangularNum(num3));
            Assert.False(g2.IsTriangularNum(num4));
        }
Exemplo n.º 18
0
        public void FarenheitToCelsius_Test(int expected, int input)
        {
            GroupTwoFunctions GTF = new GroupTwoFunctions();

            Assert.Equals(expected, GTF.FarenheitToCelsius(input));
        }
Exemplo n.º 19
0
        public void CalcRectPerimeter_Test(int expected, int input1, int input2)
        {
            GroupTwoFunctions GTF = new GroupTwoFunctions();

            Assert.Equal(expected, GTF.CalcRectPerimeter(input1, input2));
        }
Exemplo n.º 20
0
        public void CheckWhiteSpace_Test(bool expected, string input)
        {
            GroupTwoFunctions GTF = new GroupTwoFunctions();

            Assert.Equals(expected, GTF.CheckWhiteSpace(input));
        }
Exemplo n.º 21
0
        public void CamelString_Test(string expected, string input)
        {
            GroupTwoFunctions GTF = new GroupTwoFunctions();

            Assert.Equals(expected, GTF.CamelString(input));
        }
Exemplo n.º 22
0
        public void CountDigits_Test(int expected, string input)
        {
            GroupTwoFunctions GTF = new GroupTwoFunctions();

            Assert.Equals(expected, GTF.CountDigits(input));
        }
Exemplo n.º 23
0
        public void CalcRectPerimeter_test(int expection, int length, int width)
        {
            GroupTwoFunctions G1 = new GroupTwoFunctions();

            Assert.Equal(expection, G1.CalcRectPerimeter(length, width));
        }
Exemplo n.º 24
0
        public void IsTriangularNum_Test(bool expected, int input)
        {
            GroupTwoFunctions GTF = new GroupTwoFunctions();

            Assert.Equal(expected, GTF.IsTriangularNum(input));
        }