This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Expression | |
{ | |
private Random _random = new Random(); | |
public ExpressionType NodeType | |
{ | |
get | |
{ | |
return (ExpressionType)_random.Next(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MongoAuthTest | |
{ | |
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Threading; | |
using Norm; | |
class Program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Parent<T> | |
{ | |
public virtual T Name { get; set; } | |
} | |
public class Child : Parent<string> | |
{ | |
public override string Name { get; set; } | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) | |
{ | |
$.fn.myPlugin = function(optionsOrCommand, commandOptions) | |
{ | |
if (optionsOrCommand == 'someCommand') | |
{ | |
return this.each(function() | |
{ | |
this.myPlugin.someOtherFunction(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Then /^I should see "([^\"]*)" before "([^\"]*)"$/ do |first, second| | |
assert_not_nil page.body.match(/#{first}.*#{second}/), "Should see #{first} before #{second}" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
OlderNewer