Tutorial by Examples: al

Where a method to be tested uses information from one call to pass on to subsequent calls, one approach that can be used to ensure the methods are called in the expected order is to setup the expectations to reflect this flow of data. Given the method to test: public void MethodToTest() { va...
When you can't / don't want to use Strict Mocks, you can't use MockSequence to validate call order. An alternate approach is to use callbacks to validate that the Setup expectations are being invoked in the expected order. Given the following method to test: public void MethodToTest() { _ut...
Moq provides support for validating call order using MockSequence, however it only works when using Strict mocks. So, Given the following method to test: public void MethodToTest() { _utility.Operation1("1111"); _utility.Operation2("2222"); _utility.Operation3(&...
Sub Theloopofloops() Dim wbk As Workbook Dim Filename As String Dim path As String Dim rCell As Range Dim rRng As Range Dim wsO As Worksheet Dim sheet As Worksheet path = "pathtofile(s)" & "\" Filename = Dir(path & "*.xl??") Set wsO =...
from selenium import webdriver # Create a new webdriver driver = webdriver.Chrome() # Get a page that has a popup window (Use mouse to click "try it" button) driver.get("http://www.w3schools.com/js/tryit.asp?filename=tryjs_alert") # Accept the opened alert driver.switch_t...
function calculatorService() { const service = {}; service.add = function(a,b) { return a + b } return service; } angular.module('app').factory('calculatorService', calculatorService); Testing describe('calculator service', function() { var calcula...
The easiest way is to use pip and VirtualEnv. Selenium also requires python 3.*. Install virtualenv using: $: pip install virtualenv Create/enter a directory for your Selenium files: $: cd my_selenium_project Create a new VirtualEnv in the directory for your Selenium files: $: virtualenv -...
This examples shows how to build a JavaFX application, where the language can be switched dynamically while the application is running. These are the message bundle files used in the example: messages_en.properties: window.title=Dynamic language change button.english=English button.german=Germa...
Install MSI installers can be found here. This is the latest stable version. Download and execute to install. Verify Installation Use the WindowsKey + R, type cmd. Alternatively, navigate to the .sbt (for example, in C:\Users\Hopper) and type cmd in the address bar. Type sbt about t...
Full official instructions can be found here. MacPorts Install MacPorts. Then, in the terminal execute: port install sbt Homebrew Install Homebrew. Then, in the terminal execute: brew install sbt Sources Download sbt All platforms (tgz) installation from SBT. sudo su cd /opt mkdir sbt...
If you are a visually oriented person, this Venn diagram may help you understand the different types of JOINs that exist within MySQL.
Detailed instructions on getting anaconda set up or installed.
To quickly provide a matching color for links inside any alert, we can use the .alert-link utility class. <div class="alert alert-success"> You have won! Click <a href="#" class="alert-link">here</a> to claim your prize ... </div> <d...
If you've got multiple implementations of the same interface, Spring needs to know which one it should autowire into a class. I'm going to use a Validator pattern in this example.1 Foo Class: public class Foo { private String name; private String emailAddress; private String erro...
Create engaging user interfaces for Windows Desktop Applications with Blend for Visual Studio, the premier professional design tool for XAML applications. Build beautiful transitions and visualizations using Blend’s full suite of vector drawing tools, powerful template editing features, real-time an...
The Combined Call method allows you to use multiple AlchemyLanguage functions in one request. This example uses a Combined Call to get entities and keywords from the IBM website and returns sentiment information for each result. This example requires AlchemyLanguage service credentials and Node.j...
AlchemyLanguage's Targeted Sentiment feature can search your content for target phrases and return sentiment information for each result. This example requires AlchemyLanguage service credentials and Node.js Use a command-line interface to install the Watson Developer Cloud Node.js SDK: $...
A value_ptr is a smart pointer that behaves like a value. When copied, it copies its contents. When created, it creates its contents. // Like std::default_delete: template<class T> struct default_copier { // a copier must handle a null T const* in and return null: T* operator()(T co...
To create the serialVersionUID for a class in Kotlin you have a few options all involving adding a member to the companion object of the class. The most concise bytecode comes from a private const val which will become a private static variable on the containing class, in this case MySpecialCase: ...
// this function add custom interval (5 minutes) to the $schedules function five_minutes_interval( $schedules ) { $schedules['five_minutes'] = array( 'interval' => 60 * 5, 'display' => '5 minutes'; ); return $schedules; } // add a custom in...

Page 181 of 269