Beispiel #1
0
        public void SaveButton_InvalidData_Test(string name, string address, string city)
        {
            // Arrange
            var customersVM = new CustomersViewModel(_container, _windowManager, _customerAccess);

            customersVM.NewCustomer.Name    = name;
            customersVM.NewCustomer.Address = address;
            customersVM.NewCustomer.City    = city;

            // Act
            customersVM.SaveButton();

            // Assert
            Assert.False(customersVM.CustomerValidationResult);
            Assert.False(customersVM.CustomerAddResult);
        }
Beispiel #2
0
        public void SaveButton_Test()
        {
            // Arrange
            var customersVM = new CustomersViewModel(_container, _windowManager, _customerAccess);

            customersVM.NewCustomer.Name    = "sampleName";
            customersVM.NewCustomer.Address = "sampleAddress";
            customersVM.NewCustomer.City    = "sampleCity";

            // Act
            customersVM.SaveButton();

            // Assert
            Assert.True(customersVM.CustomerValidationResult);
            Assert.True(customersVM.CustomerAddResult);
        }