Ejemplo n.º 1
0
 public EndpointConsole(Stories.Interfaces.IEndpointPersistence endpointPersistence)
 {
     this.createEndpoint   = new CreateEndpoint(endpointPersistence);
     this.listAllEndpoints = new ListAllEndpoints(endpointPersistence);
     this.validateSerialNumberOfEndpoint = new ValidateSerialNumberOfEndpoint(endpointPersistence);
     this.searchBySerialNumber           = new SearchBySerialNumber(endpointPersistence);
     this.editStateEndpoint = new EditStateEndpoint(endpointPersistence);
     this.deleteEndpoint    = new DeleteEndpoint(endpointPersistence);
 }
Ejemplo n.º 2
0
        public void MustReturnAlistWith2enpoints()
        {
            //arrange
            PersistenceMock persistenceMock = new PersistenceMock();

            persistenceMock.SearchBySerialNumber();
            var listAllEndpoints = new ListAllEndpoints(persistenceMock.ListAll());

            //action
            var endpoints = listAllEndpoints.Execute();

            //assert
            Assert.Equal(ModelsMock.ListEndpointMock().Count, endpoints.Count);
            Assert.NotNull(endpoints);
        }