Exemplo n.º 1
0
        public void SettingFacadeIntPropertyUpdatesDependencyIntProperty()
        {
            var expectedResult = 999;
            var facade         = new FacadeModel(new BaseModel());

            facade.IntProperty = expectedResult;

            Assert.Equal(expectedResult, facade.Dependency.IntProperty);
        }
Exemplo n.º 2
0
        public void SettingAnotherStringPropertyUpdatesTheDependencyStringProperty()
        {
            var expectedResult = "New String Value";
            var facade         = new FacadeModel(new BaseModel());

            facade.AnotherStringProperty = expectedResult;

            Assert.Equal(expectedResult, facade.Dependency.StringProperty);
        }
Exemplo n.º 3
0
        public void AnotherStringPropertyOnFacadeReturnsBaseModelStringPropertyDefaultValueTest()
        {
            var model          = new BaseModel();
            var expectedResult = model.StringProperty;

            var facade = new FacadeModel(model);

            Assert.Equal(expectedResult, facade.AnotherStringProperty);
        }
Exemplo n.º 4
0
        public void IntPropertyOnWeavedFacadeReturnsBaseModelIntPropertyDefaultValueTest()
        {
            var model          = new BaseModel();
            var expectedResult = model.IntProperty;

            var facade = new FacadeModel(model);

            Assert.Equal(expectedResult, facade.IntProperty);
        }
Exemplo n.º 5
0
        public void FacadeAnotherStringPropertyChangedEventFiresOnAssignementTest()
        {
            var expectedPropertyChanged = "AnotherStringProperty";
            var resultPropertyChanged   = string.Empty;

            var facade = new FacadeModel(new BaseModel());

            var obj = (INotifyPropertyChanged)facade;

            obj.PropertyChanged += (sender, args) => resultPropertyChanged = args.PropertyName;

            facade.AnotherStringProperty = "Some New Value";

            Assert.Equal(expectedPropertyChanged, resultPropertyChanged);
        }
Exemplo n.º 6
0
        public void FacadeIntPropertyChangedEventFiresOnAssignmentTest()
        {
            var expectedPropertyChanged = "IntProperty";
            var resultPropertyChanged   = string.Empty;

            var facade = new FacadeModel(new BaseModel());

            var obj = (INotifyPropertyChanged)facade;

            obj.PropertyChanged += (sender, args) => resultPropertyChanged = args.PropertyName;

            facade.IntProperty = 999;

            Assert.Equal(expectedPropertyChanged, resultPropertyChanged);
        }