test/pnml/spec_pnml-element.rb in pione-0.4.2 vs test/pnml/spec_pnml-element.rb in pione-0.5.0.alpha.1
- old
+ new
@@ -307,22 +307,46 @@
end
end
describe Pione::PNML::Place do
it "should distinguish empty names" do
- PNML::Place.new(PNML::Net.new, Util::UUID.generate, "a").should.not.empty_name
- PNML::Place.new(PNML::Net.new, Util::UUID.generate, "").should.empty_name
- PNML::Place.new(PNML::Net.new, Util::UUID.generate, " ").should.empty_name
- PNML::Place.new(PNML::Net.new, Util::UUID.generate, " #abc").should.empty_name
+ PNML::Perspective.empty_place?(
+ Lang::Environment.new,
+ PNML::Place.new(PNML::Net.new, Util::UUID.generate, "a")
+ ).should.not.be.true
+ PNML::Perspective.empty_place?(
+ Lang::Environment.new,
+ PNML::Place.new(PNML::Net.new, Util::UUID.generate, "")
+ ).should.be.true
+ PNML::Perspective.empty_place?(
+ Lang::Environment.new,
+ PNML::Place.new(PNML::Net.new, Util::UUID.generate, " ")
+ ).should.be.true
+ PNML::Perspective.empty_place?(
+ Lang::Environment.new,
+ PNML::Place.new(PNML::Net.new, Util::UUID.generate, " #abc")
+ ).should.be.true
end
end
describe Pione::PNML::Transition do
it "should distinguish empty names" do
- PNML::Transition.new(PNML::Net.new, Util::UUID.generate, "a").should.not.empty_name
- PNML::Transition.new(PNML::Net.new, Util::UUID.generate, "").should.empty_name
- PNML::Transition.new(PNML::Net.new, Util::UUID.generate, " ").should.empty_name
- PNML::Transition.new(PNML::Net.new, Util::UUID.generate, " #abc").should.empty_name
+ PNML::Perspective.empty_transition?(
+ Lang::Environment.new,
+ PNML::Transition.new(PNML::Net.new, Util::UUID.generate, "a")
+ ).should.not.be.true
+ PNML::Perspective.empty_transition?(
+ Lang::Environment.new,
+ PNML::Transition.new(PNML::Net.new, Util::UUID.generate, "")
+ ).should.be.true
+ PNML::Perspective.empty_transition?(
+ Lang::Environment.new,
+ PNML::Transition.new(PNML::Net.new, Util::UUID.generate, " ")
+ ).should.be.true
+ PNML::Perspective.empty_transition?(
+ Lang::Environment.new,
+ PNML::Transition.new(PNML::Net.new, Util::UUID.generate, " #abc")
+ ).should.be.true
end
end
TestHelper.scope do |this|
this::SAMPLE_NET = Location[__FILE__].dirname + "data" + "SampleNet.pnml"