﻿// Copyright (c) Narvalo.Org. All rights reserved. See LICENSE.txt in the project root for license information.

namespace Narvalo.Tap.Sdk
{
    using System;

    public sealed class TodoTestCase : ITestCase
    {
        private readonly TestCase _testCase;

        private string _reason;

        public TodoTestCase(TestCase testCase)
        {
            Require.NotNull(testCase, nameof(testCase));

            _testCase = testCase;
        }

        public string Description => _testCase.Description;

        public bool Passed => _testCase.Passed;

        public TestDirective Directive => TestDirective.Todo;

        public string Reason
        {
            get { return _reason; }
            set { _reason = value ?? String.Empty; }
        }

        public DiagnosticData DiagnosticData => _testCase.DiagnosticData;

        public override string ToString() => (Passed ? "ok (TODO)" : "not ok (TODO)");
    }
}
