Exemple #1
0
        public void JsonLoginObjectToJsonTest()
        {
            TemplateJson tl   = new JsonLogin();
            var          json = tl.GetJson(new Login("*****@*****.**", "Password"));

            Assert.AreEqual(correctJson, json);
        }
Exemple #2
0
        public void JsonLoginObjectToJsonInvalidTest()
        {
            bool         exception = false;
            TemplateJson tl        = new JsonLogin();

            try
            {
                var json = tl.GetJson("I am the wrong object");
            }
            catch (InvalidLoginObjectException)
            {
                exception = true;
            }

            Assert.IsTrue(exception);
        }