Skip to content

Instantly share code, notes, and snippets.

Bootstrap.DefineConnection(c => c.ConnectTo("192.168.10.151", 9160)
.KeySpaceIs("ApolloSandbox")
.WithName("Primary")
.ReadConsistency(ReadConsistencyLevel.One)
.WriteConsistency(WriteConsistencyLevel.One));
using (var c = new Client("Primary"))
{
c.Insert(new ColumnPath { Family = "ColumnFamily", Column = "Column" }, "Key", "Value");
Bootstrap.DefineConnection(c => c.ConnectTo("192.168.10.151", 9160)
.KeySpaceIs("ApolloSandbox")
.WithName("Primary")
.ReadConsistency(ReadConsistencyLevel.One)
.WriteConsistency(WriteConsistencyLevel.One));
var path = new ColumnPath { Family = "ColumnFamily", Column = "Column" };
using (var c = new Client("Primary"))
{
public class Expression
{
private Random _random = new Random();
public ExpressionType NodeType
{
get
{
return (ExpressionType)_random.Next();
}
namespace MongoAuthTest
{
using System;
using System.Diagnostics;
using System.IO;
using System.Threading;
using Norm;
class Program
public class Step3Validator : ClassValidator<Step3>
{
public Step3Validator()
{
RuleFor(s => s.MessageGroup).Required().WithMessage("This field is required");
RuleFor(s => s.MessageGroup).Length(5, 5).Pattern(ValidationPattern.Number).WithMessage("Please enter a 5 digit number");
}
}
[Fact]
public void DeserializeArrayListOfObjects()
{
var guid = Guid.NewGuid();
var input = Serializer.Serialize(new object[] { 1, "abc", guid });
var output = Deserializer.Deserialize<ArrayList>(input);
Assert.Equal(3, output.Count);
Assert.Equal(1, (int)output[0]);
Assert.Equal("abc", (string)output[1]);
Assert.Equal(guid, (Guid)output[2]);
public class Parent<T>
{
public virtual T Name { get; set; }
}
public class Child : Parent<string>
{
public override string Name { get; set; }
}
(function($)
{
$.fn.myPlugin = function(optionsOrCommand, commandOptions)
{
if (optionsOrCommand == 'someCommand')
{
return this.each(function()
{
this.myPlugin.someOtherFunction();
});
Then /^I should see "([^\"]*)" before "([^\"]*)"$/ do |first, second|
assert_not_nil page.body.match(/#{first}.*#{second}/), "Should see #{first} before #{second}"
end
Scenario: Reverse view of results
Given the following results exists
| title | created_at |
| TipA | 2010-01-20 |
| TipB | 2010-02-10 |
When I am on the "result view" page
And I follow "Reverse Order"
Then I should see "TipB" before "TipA"