public void ReadXElement_Empty_ThrowsSyncDocumentException()
        {
            WebServiceDataProvider provider = new WebServiceDataProvider();

            XElement element = XElement.Parse("<NotWebServiceDataProvider />");
            provider.ReadXElement(element);
        }
        public void GetXElement_SetUrl_ReturnsCorrectXml()
        {
            WebServiceDataProvider provider = new WebServiceDataProvider();
            provider.MethodName = "testMethod";
            provider.Password = "******";
            provider.Url = "http://site.com/testServices.asmx";
            provider.UserName = "******";

            var element = provider.GetXElement();

            var attribute = element.Attribute(WebServiceDataProvider.CN_URL);

            Assert.IsNotNull(attribute);
            Assert.IsTrue(attribute.Value == "http://site.com/testServices.asmx");
        }
        public void TestDatabaseDataProvider_Empty_HasSerializer()
        {
            WebServiceDataProvider provider = new WebServiceDataProvider();

            Assert.IsNotNull(provider.Serializer);
        }
        public void ReadXelement_SetPasswordValue_ReturnsCorrectValue()
        {
            WebServiceDataProvider provider = new WebServiceDataProvider();
            provider.ReadXElement(XElement.Parse(
@"<WebServiceDataProvider 
    url=""http://service.com/testServices.asmx"" 
    methodName=""testMethod"" 
    userName=""incognito"" 
    password=""qwerty"" />"));

            Assert.IsTrue(provider.Password == "testMethod");
        }