Пример #1
0
        public void TestValidationsRule()
        {
            GlobalInitalization.Initialize();
            SignalGo.Client.ClientProvider client = GlobalInitalization.InitializeAndConnecteClient();
            ITestServerModel service = client.RegisterServerServiceInterfaceWrapper <ITestServerModel>();
            ArticleInfo      result  = service.AddArticle(new ArticleInfo()
            {
                Name = "ali", Detail = "rezxa"
            });

            Assert.IsTrue(result.CreatedDateTime.HasValue);
            MessageContract <ArticleInfo> resultMessage = service.AddArticleMessage(new ArticleInfo());

            Assert.IsTrue(resultMessage.Errors.Count == 2);
            Assert.IsFalse(resultMessage.IsSuccess);
        }