Example #1
0
        public void MefParametersDTO_Constructor_CorrectInitialValues__SomeValue()
        {
            var expected   = new Uri("http://example.org");
            var configMock = new StubIConfig().BoxUrl_Get(() => expected);

            var target = new MefParametersDTO(configMock);

            var actual = target.BoxUrl;

            Assert.AreEqual(expected, actual);
        }
Example #2
0
        public void MefParametersDTO_EventSubscription__OtherValue()
        {
            var url1        = new Uri("https://outlook.com");
            var configMock  = new StubIConfig().BoxUrl_Get(() => url1);
            var target      = new MefParametersDTO(configMock);
            var expectedUrl = new Uri("ftp://localhost/");

            configMock.BoxUrl_Get(() => expectedUrl, overwrite: true);
            configMock.PropertyChanged_Raise(configMock);

            Assert.AreEqual(expectedUrl, target.BoxUrl);
        }
Example #3
0
        public void MefParametersDTO_EventSubscription__SomeValue()
        {
            var url1        = new Uri("http://www.heute.de");
            var configMock  = new StubIConfig().BoxUrl_Get(() => url1);
            var target      = new MefParametersDTO(configMock);
            var expectedUrl = new Uri("http://www.sportschau.de");

            configMock.BoxUrl_Get(() => expectedUrl, overwrite: true);
            configMock.PropertyChanged_Raise(null);

            Assert.AreEqual(expectedUrl, target.BoxUrl);
        }