Can I add a message to NUnit assertion using PostSharp - nunit

How can I change my Assert statement behaviour from:
Assert.That(User.HasOrderInvoice, Is.True)
to
Assert.That(User.HasOrderInvoice, Is.True, "Assert.That(User.HasOrderInvoice, Is.True)")
using PostSharp.
I know that Fody has an addin AssertMessage.Fody that can do this. I use PostSharp and I am not able to figure this out. Can someone please help?

You cannot do that with PostSharp (you would need an add-in, but PostSharp's add-in API is not documented and not supported).

Related

Use older version of Office.js for Word add-in?

Microsoft updated Office.js this week, and a bug in the latest version is causing serious issues for users of my Word add-in.
Is it possible to specify an older version of Office.js? This seems like basic functionality that should be provided.
I see that it is possible to self host Office.js but Microsoft says that you can't do this for add-ins on App Source and my add-in is available there.
Could you please provide details about the bug that you are facing after the update was made? If there is a regression we can make the patch/update to address the issue. So far we have not received any other issues - so any information you can share around which API is failing with error info would be great.
Someone associated with Microsoft posted an answer, but the answer was downvoted and deleted. :(
I have enough rep to see the deleted answer so I will repeat it:
The Office.js version cannot be specified.
So you are stuck with the latest version of Office.js and cannot change that.

Is there a way to automatically create doc for classes and Methods in OpenEdge Developer Studio?

OpenEdge Developer Studio is built on Eclipse where usually the shortcut Ctrl+Alt+J can be used to create JavaDoc for classes and methods.
For Progress however I am unable to figure out how this should work.
Could someone help me out here?
To create an html documentation (like http://help.consultingwerkcloud.com/smartcomponent_library/release/) use this here:
https://github.com/Riverside-Software/pct/wiki/ClassDocumentation
https://github.com/Riverside-Software/pct/wiki/HtmlDocumentation
For documentation comments in PDSOE, I'd suggest you have a look at:
https://www.hh-berlin.de/oedt/features/editor
It's going to be commercial. I'm beta-testing it since a while. And it's working really, really nice.

VSCode Not able to edit the code during runtime

I am not able to edit my NodeJS code during the program run-time. HTML and client side JavaScript files are my main goals. Please let me know if there is edit and continue feature available in Visual Studio code
This feature is not yet implemented. But I have already heard requests for it, so you should vote for it here https://visualstudio.uservoice.com/forums/293070-visual-studio-code

postsharp MethodInterceptionAspect can't be applied on interface method

I've updated my project from 2.x version to 3.x version of Postsharp.
Now, VS are dumping me that:
MethodInterceptionAspect can't be applied on a interface method...
Could you help me about that...?
My aspect wants to intercep Isession.Close method of NHibernate.Isession.
In postsharp 2.x all runs very fine, however, on 3.x version, postsharp warning me a error compiler.
I'll appreciate a lot your help.
Thanks for all.
This incompatibility was fixed in PostSharp versions 3.1.52 and 4.0.32 and should be now possible.
Please visit this page... [http://doc.postsharp.net/composition][1]
Thanks

Compiler warning "Missing optimization information" OnEntry and OnExit with NullGuard.PostSharp

Just installed Postsharp 2.1 from the nuget package and then installed Phil Haack's NullGuard package.
As I add the [EnsureNonNullAspect] aspect at either the class or method level I immediately get the following compiler warnings:
Warning 1 Missing optimization information on method'
NullGuard.PostSharp.EnsureNonNullAspect.OnEntry(
PostSharp.Aspects.MethodExecutionArgs)'.
This information is computed automatically by PostSharp.
Make sure that assembly NullGuard.PostSharp is processed by PostSharp
Warning 2 Missing optimization information on method
'NullGuard.PostSharp.EnsureNonNullAspect.OnExit(
PostSharp.Aspects.MethodExecutionArgs)'.
This information is computed automatically by PostSharp.
Make sure that assembly NullGuard.PostSharp is processed by PostSharp
It could be that this is nothing to worry about, but:
a) I don't like compiler warnings that I can't find the answer to anywhere on Google.
b) it could be something to worry about.
Any help would be most appreciated.
Cheers!
Tod.
It's because you're using the free version of PostSharp, which doesn't include the aspect optimization feature. See the comparison of features on PostSharp.net.
https://github.com/Haacked/NullGuard/issues/3
A bit late but I might have found a solution. I added the following tag in the project files that were raising the warnings:
<PropertyGroup>
<UsePostSharp>true</UsePostSharp>
</PropertyGroup>
This solved the issue to me.
This is because the library included in that NuGet package has not been processed by PostSharp.