Example #1
0
        public void Delete()
        {
            var addRequest = new ApplicationService.AddInstituteRequest()
            {
                IsActive = false,
                Title    = Guid.NewGuid().ToString(),
                Code     = Guid.NewGuid().ToString(),
                Address  = new ApplicationService.AddressDto()
                {
                    City    = Guid.NewGuid().ToString(),
                    ZipCode = Guid.NewGuid().ToString(),
                    Country = Guid.NewGuid().ToString(),
                    State   = Guid.NewGuid().ToString(),
                    Street  = Guid.NewGuid().ToString()
                },
                WebsiteUrl = "www." + Guid.NewGuid().ToString() + ".com"
            };
            var addResult = sysAdminHttpClient.CallPostService <AddInstituteResponse>(ConstantsUrl.AddInstituteApiUrl, addRequest);

            Assert.True(addResult.IsSuccess);
            Assert.NotEqual(addResult.NewRecordedId, Guid.Empty);

            var request = new ApplicationService.DeleteInstituteRequest
            {
                Id = addResult.NewRecordedId
            };
            var result = sysAdminHttpClient.CallPostService <DeleteInstituteResponse>(ConstantsUrl.DeleteInstituteApiUrl, request);

            Assert.True(result.IsSuccess);
        }
Example #2
0
        public void Add()
        {
            var request = new ApplicationService.AddInstituteRequest()
            {
                IsActive = false,
                Title    = Guid.NewGuid().ToString(),
                Code     = Guid.NewGuid().ToString(),
                Address  = new ApplicationService.AddressDto()
                {
                    City    = Guid.NewGuid().ToString(),
                    ZipCode = Guid.NewGuid().ToString(),
                    Country = Guid.NewGuid().ToString(),
                    State   = Guid.NewGuid().ToString(),
                    Street  = Guid.NewGuid().ToString()
                },
                WebsiteUrl = "www." + Guid.NewGuid().ToString() + ".com"
            };

            var result = sysAdminHttpClient.CallPostService <Messages.AddInstituteResponse>(ConstantsUrl.AddInstituteApiUrl, request);

            Assert.True(result.IsSuccess);
        }