public void Delete_DefaultValues()
        {
            // Arrange
            MockWrapperFactory.Instance.WithProcessInstanceSmartObject();

            var serviceTypeSettings     = Mock.Of <ServiceTypeSettings>();
            var serviceTypeCreator      = new Mock <ServiceTypeManager>(serviceTypeSettings);
            var serviceInstanceSettings = Mock.Of <ServiceInstanceSettings>();

            var serviceInstanceManager = new ServiceInstanceManager(serviceTypeCreator.Object, serviceInstanceSettings);

            // Action
            serviceInstanceManager.Delete();
        }
コード例 #2
0
        public App()
        {
            InitializeComponent();

            // In production mode or a buisiness project, avoid Experimental mode and only use stable components

            Device.SetFlags(new[] {
                "CarouselView_Experimental",
                "IndicatorView_Experimental"
            });

            instanceManager = new ServiceInstanceManager();

            MainPage = new AppShell();
        }
コード例 #3
0
        public static ServiceInstanceManager WithExistingServiceInstance(Mock <ServiceInstanceSettings> serviceInstanceSettings = null, Dictionary <string, string> configurationSettings = null)
        {
            var serviceTypeSettings = Mock.Of <ServiceTypeSettings>();
            var serviceTypeCreator  = new Mock <ServiceTypeManager>(serviceTypeSettings);

            if (serviceInstanceSettings == null)
            {
                serviceInstanceSettings = new Mock <ServiceInstanceSettings>();
            }

            serviceInstanceSettings
            .SetupGet(i => i.Name)
            .Returns("URMService");

            serviceInstanceSettings
            .SetupGet(i => i.Description)
            .Returns("URMService Description");

            serviceInstanceSettings
            .SetupGet(i => i.Guid)
            .Returns(new Guid("4C2F62EA-BE8D-4600-A2B5-185902BDD20A"));

            serviceInstanceSettings
            .SetupGet(i => i.ServiceAuthentication)
            .Returns(new ServiceAuthenticationInfo());

            if (configurationSettings == null)
            {
                configurationSettings = new Dictionary <string, string>();
            }

            configurationSettings["HostServerConnectionString"] = Guid.NewGuid().ToString();

            serviceInstanceSettings
            .SetupGet(i => i.ConfigurationSettings)
            .Returns(configurationSettings);

            var serviceInstanceManager = new ServiceInstanceManager(serviceTypeCreator.Object, serviceInstanceSettings.Object);

            return(serviceInstanceManager);
        }