Git Product home page Git Product logo

Comments (6)

1Cor125 avatar 1Cor125 commented on June 29, 2024 1

@nblumhardt Thank you.

from stateless.

nblumhardt avatar nblumhardt commented on June 29, 2024

Thanks for the report. This test case in StateMachineFixture.cs passes for me:

        [Test]
        [ExpectedException(typeof(InvalidOperationException), 
            ExpectedMessage = "No valid leaving transitions are permitted from state 'A' for trigger 'X'. Consider ignoring the trigger.")]
        public void ExceptionThrownForInvalidTransition()
        {
            var sm = new StateMachine<State, Trigger>(State.A);
            sm.Fire(Trigger.X);
        }

Which .NET version are you running tests on?

Thanks!

from stateless.

1Cor125 avatar 1Cor125 commented on June 29, 2024

I am referring to the Stateless library in PCL's with 4.5 and Profile 111 as well as in Xamarin Android 6.1 copying the dll locally in the Android project

from stateless.

roncanepa avatar roncanepa commented on June 29, 2024

I believe I'm getting the same error, or at least a very similar one. This is in a very tiny throw-away test project, so I could probably arrange to send it to you if it's helpful.

VS 2015 update 2
library project is .NET 4.5.2
Stateless version 2.5.79 (via NuGet reference in library project)
test framework is nUnit 2.6.4 (without the Stateless NuGet package installed)
with the R# 2016.1 test runner

my test:

        [Test]
        public void CarShouldNot_Move_WhenParked()
        {
            var c = new Car();
            c.Move();
        }

and all the move() function does is call fire, which I have NOT configured with Permit() because I wanted to see it throw the exception:

 _machine.Fire(Event.StepOnGas);

Exception from test runner:

System.Resources.MissingManifestResourceException : Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "Stateless.StateMachineResources.resources" was correctly embedded or linked into assembly "Stateless" at compile time, or that all the satellite assemblies required are loadable and fully signed.
   at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName)
   at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
   at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
   at Stateless.StateMachine`2.DefaultUnhandledTriggerAction(TState state, TTrigger trigger)
   at Stateless.StateMachine`2.InternalFire(TTrigger trigger, Object[] args)

from stateless.

nblumhardt avatar nblumhardt commented on June 29, 2024

Thanks, I have tracked down the cause; in #70 the secondary (profile 259) CSPROJ file wildcard-includes the C# files but not the associated RESX. Testing a fix now.

from stateless.

nblumhardt avatar nblumhardt commented on June 29, 2024

I've pushed a fix that should be coming through CI soon. I'd dearly love to get this project over to project.json so that we can do away with the kludgy second-CSPROJ setup.

from stateless.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.