Sha256: 7baa145418740c5fb7df166a54c431dae04dafb59e3b78f6453fb8673b4d03d7

Contents?: true

Size: 1.22 KB

Versions: 1

Compression:

Stored size: 1.22 KB

Contents

#! /usr/bin/ruby
# encoding: utf-8

require 'minitest/autorun'
require 'sy'
require 'y_nelson' and include YNelson

describe :simple_cell_cycle do
  before do
    require './../lib/cell_cycle/simple'
  end

  it "should work" do
    CELL_CYCLE.must_be_kind_of YNelson::Net
    CELL_CYCLE.places.must_include A_phase
    CELL_CYCLE.places.must_include S_phase
    CELL_CYCLE.places.must_include Cdc20A
    S_phase_duration.must_equal 12.h
    S_phase_start.must_equal 5.h
    S_phase_end.must_equal 17.h
    A_phase_start.must_equal 3.h
    A_phase_end.must_equal 17.h
    Cdc20A_start.must_equal 22.h
    Cdc20A_end.must_equal 1.h
    CELL_CYCLE.A_tt.names.must_equal [ :A_phase_f, :S_phase_f, :Cdc20A_f ]
    # The simulation should look good
    sim = CELL_CYCLE.simulation time: 0..48.h.in( :s ),
                                step: 1.min.in( :s ),
                                sampling: 20.min.in( :s )
    sim.simulation_method.must_equal :basic
    sim.run!
    sim.recording.marking( S_phase, A_phase, Cdc20A )
      .plot title: "Test of the simple cell cycle simulated for " +
              "48 hours. Please visually inspect for correctness.",
            ylabel: "Marking of S_phase, A_phase and Cdc20A [0 or 1]"
    sleep 15
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cell_cycle-0.1.3 test/simple_test.rb