Question: How can I get the Operating System build number (Windows, Mac etc) from within a browser?

Can use Flash or Java if have to? or something else?

Answer: 
As of [FakeItEasy 2.0.0](https://github.com/FakeItEasy/FakeItEasy/releases/tag/2.0.0), this is now possible.

The [Raising Events documentation topic](http://fakeiteasy.readthedocs.io/en/stable/raising-events/) has the full story, but the gist is that you'd use 

```
fake.OnNameChanged += Raise.With<NameChanged>(newName);

```

As always, the event must be virtual.
You could always make `ChangeYourName` virtual and replace the method.

```
A.CallsTo(()=>fakeClass.ChangeyourName(A<string>._)).Invokes((x)=>invokeMockEvent(x));

```

If that isn't what you wanted, I suppose if `ChangeYourName` is public you could just create your fake class

```
var class = new Class();
class.OnNameChanged += (x)=>
{
    Assert.AreEqual(x,"tim");
};

class.ChangeYourName("tim");

```