Beispiel #1
0
        public void AuthenticationTestForValidCredentials()
        {
            Credentials credentials = new Credentials()
            {
                Email    = "*****@*****.**",
                Password = "******"
            };
            var result = (OkObjectResult)controller.Authenticate(credentials);

            Assert.IsInstanceOfType(result, typeof(OkObjectResult));
        }
        public void LoginTestMethod()

        {
            Credentials cre = new Credentials()
            {
                Email    = "*****@*****.**",
                Password = "******"
            };

            var result = controllerservice.Authenticate(cre);

            Assert.IsInstanceOfType(result, typeof(OkObjectResult));
        }
Beispiel #3
0
        public void TestForLoginNullRefError()
        {
            Credentials obj = new Credentials()
            {
                Email    = "*****@*****.**",
                Password = "******"
            };
            var result = controller1.Authenticate(obj);

            Assert.IsInstanceOfType(result, typeof(OkObjectResult));

            obj.Email    = "*****@*****.**";
            obj.Password = "******";

            result = controller1.Authenticate(obj);
            Assert.IsInstanceOfType(result, typeof(NotFoundResult));
        }