Exemple #1
0
        public void SetInvalidUriService(string uri)
        {
            Uri serviceName = new Uri(uri, UriKind.RelativeOrAbsolute);
            HttpServiceUriBuilder target = new HttpServiceUriBuilder();

            Assert.Throws <UriFormatException>(() => target.SetServiceName(serviceName));
        }
Exemple #2
0
        public void SetNullUriServiceAndBuild()
        {
            Uri serviceName = null;

            HttpServiceUriBuilder target = new HttpServiceUriBuilder()
                                           .SetServiceName("fabric:/my/app");

            target.SetServiceName(serviceName);

            Assert.Null(target.ServiceName);
            Assert.Throws <UriFormatException>(() => target.Build());
        }