These are chat archives for akkadotnet/akka.net

4th
Feb 2015
Aaron Stannard
@Aaronontheweb
Feb 04 2015 00:03
@rogeralsing added Faker as a dependency to some unit tests I'm working on for the multi-node test runner. It's a stateless tool for automatically generating Fake test data for any POCO class. I mostly wanted to use it to get access to its helpers for randomizing selections from lists and arrays and its random datetime / string functions.
wanted to mention it just in case another contributor wonders what the heck this new package is for on the PR I'll be submitting tomorrow
Roger Johansson
@rogeralsing
Feb 04 2015 01:28
@aaronontheweb have you seen https://github.com/AutoFixture/AutoFixture ?
Aaron Stannard
@Aaronontheweb
Feb 04 2015 01:48
so is the AutoData property something that AutoFixture does?
i.e. basically injects test arguments into a Fact, almost like dependency injection for unit tests?
Roger Johansson
@rogeralsing
Feb 04 2015 01:49
Yepp
Aaron Stannard
@Aaronontheweb
Feb 04 2015 01:50
that's pretty cool
does a lot more than what Faker does
like the idea of just decorating a test with attributes
seems pretty neat - you ever used it on a project?
btw, they should change their tagline to read "Dependency Injection for unit tests"
I would understand that immediately
took me a while to grok it, even after going over the readme
Roger Johansson
@rogeralsing
Feb 04 2015 01:52
Yes i have, on my last work gig, works great
Aaron Stannard
@Aaronontheweb
Feb 04 2015 01:52
cool - I might see how well it plays with the Akka.TestKit
starting to use the TestKit more often in some of my own work now
Roger Johansson
@rogeralsing
Feb 04 2015 01:54
The Idea behind autofixture is that you should never hardcode random constants that doesnt mean anything on your tests.
Using af shows that you just want some value, not a specific one
Aaron Stannard
@Aaronontheweb
Feb 04 2015 01:58
yeah, that makes sense
that's why I use Faker
which is a port of the Ruby gem by the same name
wanted to have some entropy inside the things I'm testing
but I like AutoFixture's approach for the DI stuff
that's super cool
Bartosz Sypytkowski
@Horusiath
Feb 04 2015 18:02
@Aaronontheweb @rogeralsing I like AutoFixture, but preparing good object generator was a pretty big effort from my experiences. I'm using Faker (for basic datastructures) with NBuilder (for complex ones)
Aaron Stannard
@Aaronontheweb
Feb 04 2015 18:03
I really need to write some documentation for Faker :\
Bartosz Sypytkowski
@Horusiath
Feb 04 2015 18:03
and FsCheck has build-in incredible test data generator
Aaron Stannard
@Aaronontheweb
Feb 04 2015 18:03
basically anything I open sourced when I was working at MarkedUp went straight to production use internally and I never tried to promote it
@Horusiath dude, I am loving F# btw
writing quicksort in 4 lines of code blew my mind
Bartosz Sypytkowski
@Horusiath
Feb 04 2015 18:06
yes, it's very expressive... and hard to get used to, at least for me ;)
I gave up learning it about 2-3 times before
Aaron Stannard
@Aaronontheweb
Feb 04 2015 18:08
after reading so much scala code from canonical Akka
Bartosz Sypytkowski
@Horusiath
Feb 04 2015 18:08
maybe because no one in my college was ever trying to teach us some functional programming
Aaron Stannard
@Aaronontheweb
Feb 04 2015 18:19
@Horusiath btw, can we close akkadotnet/akka.net#556 ? Sounds like we don't need it anymore?
Bartosz Sypytkowski
@Horusiath
Feb 04 2015 18:38
dunno, I'll check it in a sec
Bartosz Sypytkowski
@Horusiath
Feb 04 2015 18:49
var uri = "akka.tcp://sys@localhost:9000/user/actor";
var actorPath = ActorPath.Parse(uri);

var serializer = Sys.Serialization.FindSerializerFor(actorPath);
var serialized = serializer.ToBinary(actorPath);
var deserialized = (ActorPath) serializer.FromBinary(serialized, typeof (ActorPath));

Assert.Same(actorPath, deserialized);
still failing
I need to work on this
Aaron Stannard
@Aaronontheweb
Feb 04 2015 18:51
kk
Roger Johansson
@rogeralsing
Feb 04 2015 19:16
I cant run the freaking unit tests... :angry:
Aaron Stannard
@Aaronontheweb
Feb 04 2015 19:17
(╯°□°)╯︵ ┻━┻
Bartosz Sypytkowski
@Horusiath
Feb 04 2015 20:12
akkadotnet/akka.net#589 pull request should solve ActorPath serialization issue
Aaron Stannard
@Aaronontheweb
Feb 04 2015 20:12
ah cool, just saw that come in
Bartosz Sypytkowski
@Horusiath
Feb 04 2015 20:12
#556 should be discarded
Aaron Stannard
@Aaronontheweb
Feb 04 2015 20:13
done