Exemplo n.º 1
0
        public void GetAuthorizationContextForService_ShouldReturnContext()
        {
            //------------Setup for test--------------------------
            var serverVersion = new GetServerVersion();

            //------------Execute Test---------------------------
            var resId = serverVersion.GetAuthorizationContextForService();

            //------------Assert Results-------------------------
            Assert.AreEqual(AuthorizationContext.Any, resId);
        }
Exemplo n.º 2
0
        public void GetResourceID_ShouldReturnEmptyGuid()
        {
            //------------Setup for test--------------------------
            var serverVersion = new GetServerVersion();

            //------------Execute Test---------------------------
            var resId = serverVersion.GetResourceID(new Dictionary <string, StringBuilder>());

            //------------Assert Results-------------------------
            Assert.AreEqual(Guid.Empty, resId);
        }
Exemplo n.º 3
0
        public void GetVersions_Execute_NullValuesParameter_ErrorResult()
        {
            //------------Setup for test--------------------------
            var getVersions = new GetServerVersion();
            var serializer  = new Dev2JsonSerializer();
            //------------Execute Test---------------------------
            var jsonResult = getVersions.Execute(null, null);
            var result     = serializer.Deserialize <string>(jsonResult);

            //------------Assert Results-------------------------
            Assert.IsNotNull(result);
        }
Exemplo n.º 4
0
        public void GetVersions_HandlesType_ExpectName()

        {
            //------------Setup for test--------------------------
            var getVersions = new GetServerVersion();


            //------------Execute Test---------------------------

            //------------Assert Results-------------------------
            Assert.AreEqual("GetServerVersion", getVersions.HandlesType());
        }
Exemplo n.º 5
0
        public void GetVersions_CreateServiceEntry_ExpectProperlyFormedDynamicService()
        {
            //------------Setup for test--------------------------
            var getVersions = new GetServerVersion();


            //------------Execute Test---------------------------
            var a = getVersions.CreateServiceEntry();
            //------------Assert Results-------------------------
            var b = a.DataListSpecification.ToString();

            Assert.AreEqual("<DataList><Dev2System.ManagmentServicePayload ColumnIODirection=\"Both\"></Dev2System.ManagmentServicePayload></DataList>", b);
        }
Exemplo n.º 6
0
 public string GetWareWolfVersion()
 {
     return(GetServerVersion.GetVersion());
 }
 public string GetWareWolfVersion() => GetServerVersion.GetVersion();