TestStack / TestStack.BDDfy

BDDfy is the simplest BDD framework EVER!
MIT License
419 stars 84 forks source link

Not Windows 8.1 and Windows Phone 8.1 compatible #154

Open Frikki opened 10 years ago

Frikki commented 10 years ago

Sadly!

robdmoore commented 10 years ago

Can you put the code you want to test in a portable class library and then reference that from a normal class library which has Bddfy in it?

Frikki commented 10 years ago

I downloaded the TestStack.BDDfy-master, opened the solution, changed the target framework for the TestStack.BDDfy class library project to .Net Framework 4.5.1 and ran Build Solution.

Then in my own portable class library targeting Windows 8.1 and Windows Phone 8.1, I am able to reference the newly built TestStack.BDDfy.dll successfully.

I have tested successfully with:

using NUnit.Framework;

namespace BDDfy.MethodNameConventions
{
    [TestFixture]
    public class BDDfyRocks
    {
        [Test]
        public void ShouldBeAbleToBDDfyMyTestsVeryEasily()
        {
            this.BDDfy();
        }

        void GivenIHaveNotUsedBDDfyBefore()
        {
        }

        void WhenIAmIntroducedToTheFramework()
        {
        }

        void ThenILikeItAndStartUsingIt()
        {
        }
    }
}
JakeGinnivan commented 10 years ago

Just had a quick look into this.

To support PCL with compatibility of .net 4.0, windows 8 and windows phone 8.1 we need to:

Those are the main problems I can see. I don't have time to do this before the 4.0.0 release, but if you want to take a look @Frikki and submit a pull request I can see no reason why it wouldn't be accepted.

We do not want to raise the minimum compatibility to 4.5.1, and have no idea why that is allowed anyways (PCL referencing a .net 451 library?). So the only way we will add this is to switch BDDfy to a PCL library itself.

The level of PCL will have to be kept quite high as well, to a profile which supports compiling expression trees.

Frikki commented 10 years ago

"have no idea why that is allowed anyways (PCL referencing a .net 451 library?)"

JakeGinnivan commented 10 years ago

Yeah, but why can a PCL reference a .net 451 library. The other way around sure, but you said you simply changed to .net 451 and it could be used/referenced?

Frikki commented 10 years ago

Yes, I changed the target framework for the TestStack.BDDfy class library project and rebuilt it. It now works flawlessly (still) with my win81 and wpa81 development.

MehdiK commented 10 years ago

Way back in V1, the framework (at the time called bddify) had support for SilverLight and Windows Phone 7. I basically had the same code with conditional compilation for each platform/framework and a multi-platform nuget. The problem with SL and WP (at least back then) was that they had next to zero support for expression trees which meant there was NO Fluent API for these platforms. FWIW at the time most of the reports were implemented using trace reporters; but still some of the reports didn't work. Admittedly I am completely clueless about anything XAMLy so I got a few SL experts to look at it and they said that was as far as I could go with it.

We could try to make this PCL which might result into a more tolerable outcome; but as @JakeGinnivan mentioned there are a few complications.