CSharp examples for Microsoft.VisualStudio.TestTools.UnitTesting:Assert
Assert Is True bool value
using System.Threading.Tasks; using System.Text; using System.Linq; using System.Collections.Generic; using System;/*from w ww .j a v a 2 s. c o m*/ public class Main{ public static void IsTrue(bool value, string name) { if (!value) { name = name ?? "argument"; throw new ArgumentException(String.Format("{0} is not true", name)); } } }