Наследование: Dev2.Runtime.ServiceModel.PluginServices
Пример #1
0
        public void PluginServicesDeserializeServiceWithNullXmlExpectedReturnsNewPluginService()
        {
            var services = new PluginServicesMock();
            var result   = services.DeserializeService(null, "PluginService");

            Assert.AreEqual(result.ResourceID, Guid.Empty);
        }
        public void PluginServicesDeserializeServiceWithNullXmlExpectedReturnsNewPluginService()
        {
            var services = new PluginServicesMock();
            var result = services.DeserializeService(null, ResourceType.PluginService);

            Assert.AreEqual(result.ResourceID, Guid.Empty);
        }
Пример #3
0
        public void PluginServicesDeserializeServiceWithInvalidJsonExpectedReturnsNewPluginService()
        {
            var services = new PluginServicesMock();
            var result   = services.DeserializeService("{'root' : 'hello' }");

            Assert.AreEqual(result.ResourceID, Guid.Empty);
        }
Пример #4
0
        public void PluginServicesDeserializeServiceWithValidXmlExpectedReturnsPluginService()
        {
            var xml = XmlResource.Fetch("PluginService");

            var services = new PluginServicesMock();
            var result   = services.DeserializeService(xml, "PluginService");

            PluginServiceTests.VerifyEmbeddedPluginService(result as PluginService);
        }
Пример #5
0
        public void PluginServicesTestWithInvalidArgsExpectedReturnsRecordsetWithError()
        {
            //------------Setup for test--------------------------
            var services = new PluginServicesMock();
            //------------Execute Test---------------------------
            var result = services.Test("xxx", out string serializedResult);

            //------------Assert Results-------------------------
            Assert.IsTrue(result[0].HasErrors);
        }
Пример #6
0
        public void PluginServicesTestWithNullArgsExpectedReturnsRecordsetWithError()
        {
            //------------Setup for test--------------------------
            var services = new PluginServicesMock();
            //------------Execute Test---------------------------
            var result = services.Test(null, Guid.Empty, Guid.Empty);

            //------------Assert Results-------------------------
            Assert.IsTrue(result[0].HasErrors);
        }
        public void PluginServicesDeserializeServiceWithValidJsonExpectedReturnsPluginService()
        {
            var xml = XmlResource.Fetch("PluginService");
            var service = new PluginService(xml);

            var services = new PluginServicesMock();
            var result = services.DeserializeService(service.ToString());

            PluginServiceTests.VerifyEmbeddedPluginService(result as PluginService);
        }
Пример #8
0
        public void PluginServicesTestWithValidArgsExpectedFetchesRecordset()
        {
            //------------Setup for test--------------------------
            var svc         = CreatePluginService();
            var args        = svc.ToString();
            var workspaceID = Guid.NewGuid();
            //------------Execute Test---------------------------
            var services = new PluginServicesMock();
            var result   = services.Test(args, workspaceID, Guid.Empty);

            //------------Assert Results-------------------------
            Assert.AreEqual(1, services.FetchRecordsetHitCount);
            Assert.AreEqual(1, result.Count);
        }
Пример #9
0
        public void PluginServicesDeserializeServiceWithNullJsonExpectedThrowsArgumentNullException()
        {
            var services = new PluginServicesMock();

            services.DeserializeService(null);
        }
 public void PluginServicesDeserializeServiceWithInvalidJsonExpectedReturnsNewPluginService()
 {
     var services = new PluginServicesMock();
     var result = services.DeserializeService("{'root' : 'hello' }");
     Assert.AreEqual(result.ResourceID, Guid.Empty);
 }
 public void PluginServicesDeserializeServiceWithNullJsonExpectedThrowsArgumentNullException()
 {
     var services = new PluginServicesMock();
     services.DeserializeService(null);
 }
 public void PluginServicesTestWithValidArgsExpectedFetchesRecordset()
 {
     //------------Setup for test--------------------------
     var svc = CreatePluginService();
     var args = svc.ToString();
     var workspaceID = Guid.NewGuid();
     //------------Execute Test---------------------------
     var services = new PluginServicesMock();
     var result = services.Test(args, workspaceID, Guid.Empty);
     //------------Assert Results-------------------------
     Assert.AreEqual(1, services.FetchRecordsetHitCount);
     Assert.AreEqual(1, result.Count);
 }
 public void PluginServicesTestWithInvalidArgsExpectedReturnsRecordsetWithError()
 {
     //------------Setup for test--------------------------
     var services = new PluginServicesMock();
     //------------Execute Test---------------------------
     var result = services.Test("xxx", Guid.Empty, Guid.Empty);
     //------------Assert Results-------------------------
     Assert.IsTrue(result[0].HasErrors);
 }