Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 45 lines (34 sloc) 1.244 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
#include <igloo/igloo_alt.h>
using namespace igloo;

#include "Project.h"
using namespace WTS;

Describe ( A_Project_constructed_witout_a_file ) {
    Project _project;
    Project& project() { return _project; }

    It ( should_be_invalid ) {
        Assert::That( project().videoFile() == NULL );
        Assert::That( !project().isValid() );
    }

    Describe ( Invalid_Project ) {
        Project& project() { return Parent().project(); }

        It ( should_throw_when_accessed ) {
            AssertThrows( Project::InvalidProject, project().addMarker(Project::EVENT, 0, 0.5) );
            AssertThrows( Project::InvalidProject, project().getMarkers() );
            AssertThrows( Project::InvalidProject, project().tensionCurve(100.0f) );
            AssertThrows( Project::InvalidProject, project().duration() );
            // etc ...
        }
    };

    When(duration_is_set) {
        Project& project() { Parent().project(); }

        void SetUp() {
            project().setDuration(1000);
        }

        It ( should_become_valid ) {
            Assert::That( project().isValid() );
        }

        It ( should_return_set_duration ) {
            AssertThat(project().duration(), Equals(1000));
        }

    };
};
Something went wrong with that request. Please try again.