/// <summary> /// Creates operations, that describe behaviour of this class. /// </summary> /// <remarks> /// This method is used for cases when we want o put external private objects /// in the operation itself, having operations initialized on the field level /// passing external types would be impossible. /// </remarks> private void CreateOperations() { run_on_type = (@it, @do) => { @it("Runs all of the operations contained in a type"); @do.RunTestOnType(myClassSpec.GetType()); @do.Passed.Should(@be => 3); @do.Failed.Should(@be => 0); }; }
private void CreateOperations() { describe_write_info_custom = (@it, @do) => { formatter.InfoColor.Foreground = ConsoleColor.Green; @it("Writes a info message to the console with custom color green"); @it("The color should be then reset to its default state"); @do.WriteInfo(dummyMessage); Console.ForegroundColor.Should(@be => ConsoleColor.Gray); }; }