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); }
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); }