def test_builder_13(self): c = Require(self.prop3) & Require(self.prop2) self.assertEqual('[[1], [2]]', str(c.cnf())) self.assertDictEqual({ 1: url_by_name('BAZ'), 2: url_by_name('BAR') }, c.props)
def test_builder_12(self): c = Require(self.prop3) & Forbid(self.prop1) self.assertEqual('[[-2], [1]]', str(c.cnf())) self.assertDictEqual({ 1: url_by_name('BAZ'), 2: url_by_name('FOO') }, c.props)
def requirements(self) -> ConjunctionBuilder: # Declare the requirements of this train. The station needs to provide: # * The endpoint type (either 'FHIR' or 'SPARQL' # * The endpoint url # * The endpoint token return Require(self.endpoint_type) & Require( self.endpoint_url) & Require(self.endpoint_token)
def test_builder_23(self): c = Forbid(self.prop3) & Require(self.prop2) & Require(self.prop1) self.assertEqual('[[-1], [2], [3]]', str(c.cnf())) self.assertDictEqual( { 1: url_by_name('BAZ'), 2: url_by_name('BAR'), 3: url_by_name('FOO') }, c.props)
def test_builder_2(self): c = Any( Require(self.prop1) | Require(self.prop2) | Require(self.prop3)) self.assertEqual('[[1, 2, 3]]', str(c.cnf())) self.assertDictEqual( { 1: url_by_name('FOO'), 2: url_by_name('BAR'), 3: url_by_name('BAZ') }, c.props)
def requirements(self): return Require( self.source1) & Any(Require(self.source2) | Require(self.source3)) & Forbid( self.forbidden)
def requirements(self) -> ConjunctionBuilder: return Any( Forbid(url_by_name('BAZ')) | Require(url_by_name('BAR')) | Forbid(url_by_name('BAM'))) & Any( Require(url_by_name('FOO')) | Forbid(url_by_name('CAT')))
def requirements(self) -> ConjunctionBuilder: return Require(url_by_name('FOO')) & Require(url_by_name('BAR'))
def requirements(self) -> ConjunctionBuilder: return Require(self.data_source)
def requirements(self): return Require(self.terminology_server) & Require( self.cql_engine) & Require(self.data_service)
def test_builder_1(self): c = Require(self.prop1) self.assertEqual('[[1]]', str(c.cnf())) self.assertDictEqual({1: url_by_name('FOO')}, c.props)