Beispiel #1
0
        public void addSubscriberTest()
        {
            User         us = new User();
            Subscription sc = new Subscription();

            us.name     = "Test";
            us.email    = "email1";
            sc.keywords = "fjale,fjale";
            var mock = new Mock <IDataManager>();

            mock.Setup(x => x.kontrolloValid(It.IsAny <string>())).Returns(true);
            mock.Setup(x => x.kontrolloEmail(It.IsAny <string>())).Returns(false);
            UserRegister userRegister = new UserRegister();
            var          rez          = userRegister.addSuscriber(us, sc, mock.Object);

            Assert.AreEqual("Shtimi u krye me sukses", rez);
        }