コード例 #1
0
        public void ToObservableValue_WithValidBool_ShouldReturnCorrectObservedValue()
        {
            // Setup
            var expected = true;

            // Perform
            IObservedValue <bool> actual = expected
                                           .AsObservedValue();

            // Assert
            Assert.Equal(expected, actual.Value);
        }
コード例 #2
0
        public void ToObservabeValue_WithValidNumber_ShouldReturnCorrectObservedValue()
        {
            // Setup
            var expected = 10;

            // Perform
            IObservedValue <int> actual = expected
                                          .AsObservedValue();

            // Assert
            Assert.Equal(expected, actual.Value);
        }
コード例 #3
0
        public void ToObservedValue_WithValidString_ShouldReturnCorrectObservedValue()
        {
            // Setup
            var expected = "test";

            // Perform
            IObservedValue <string> actual = expected
                                             .AsObservedValue();

            // Assert
            Assert.Equal(expected, actual.Value);
        }
コード例 #4
0
        public void ToObservableValue_WithValidObject_ShouldReturnCorrectObservedValue()
        {
            // Setup
            var expected = new TestObject {
                Test = "test"
            };

            // Perform
            IObservedValue <TestObject> actual = expected
                                                 .AsObservedValue();

            // Assert
            Assert.Equal(expected.Test, actual.Value.Test);
        }