Ejemplo n.º 1
0
        public void Add_ValidUserToSlaveService_ExceptionThrown()
        {
            // Arrange
            var userStorageService = new UserStorageServiceSlave(new UserMemoryRepository());
            var user = GetValidUser();

            // Assert
            Assert.Throws <NotSupportedException>(() => userStorageService.Add(user));
        }
Ejemplo n.º 2
0
        public void SlaveMethodAdd_AnyUser_NotSupportedException()
        {
            User user = new User()
            {
                FirstName = "Alex", LastName = "Black", Age = 22
            };
            UserStorageServiceSlave slaveService1 = new UserStorageServiceSlave(new UserRepositoryWithState());

            Assert.Catch <NotSupportedException>(() => slaveService1.Add(user));
        }