﻿// Copyright (c) 2015 Roland Halbaksz. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the project root for license information.
// Project URL: https://github.com/redcoreit/FScope

using FunctionScope.Core;
using FunctionScope.Mock.Implementation;
using FunctionScope.WinForms;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace FunctionScope.Tests
{
    [TestClass]
    public class WinFormsUseCases
    {
        [TestMethod]
        public void Delete_window()
        {
            var testService = new TestService();
            var selectedItem = new TestEntity();

            FScope.Def(() => testService.Delete(selectedItem))
                .Confirm("Are you sure?")
                .Required(selectedItem)
                .Try()
                .DoWait();
        }
    }
}
