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: Creating a message with a name greater than 75 characters should fail | |
And I fill in "Name" with "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN" | |
And I press "Create Message" | |
Then I should see "Message was not successfully created." | |
And I should see "Name can't be more than 75 characters." |
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
main () { | |
// get today's date | |
var now = new DateTime.now(); | |
// set it to feb 10th for testing | |
//now = now.add(new Duration(days:7)); | |
int today = now.weekday; |
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
/* | |
* Password Hashing With PBKDF2 (http://crackstation.net/hashing-security.htm). | |
* Copyright (c) 2013, Taylor Hornby | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* 1. Redistributions of source code must retain the above copyright notice, | |
* this list of conditions and the following disclaimer. |
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
// get the password from the user | |
var clearTextPassword = "Passw0rd"; | |
// create the password hash | |
var passwordHash = PasswordHash.CreateHash(clearTextPassword); | |
// store the password hash in a data store | |
// ... | |
// (later when the user tries to login) |
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 abstract class UiControllerBase : Controller | |
{ | |
private readonly ILog _log; | |
protected UiControllerBase(ILog log) | |
{ | |
_log = log; | |
} | |
internal string LoggedInUsername |
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
using System.Runtime.CompilerServices; | |
namespace Insiders.Web.Infrastructure.Logging.Interfaces | |
{ | |
public interface ILog | |
{ | |
void Debug(string message, [CallerMemberName] string memberName = ""); | |
void Debug(object data, [CallerMemberName] string memberName = ""); |
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
using Insiders.Web.Infrastructure.Logging.Interfaces; | |
using Insiders.Web.Infrastructure.Stats.Interfaces; | |
using Newtonsoft.Json; | |
using RollbarSharp; | |
using System.Runtime.CompilerServices; | |
namespace Insiders.Web.Infrastructure.Logging.Implementation | |
{ | |
public class RollbarLogger : ILog | |
{ |
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
using System.Configuration; | |
using Insiders.Web.Infrastructure.Logging.Implementation; | |
using Insiders.Web.Infrastructure.Logging.Interfaces; | |
using Insiders.Web.Infrastructure.Stats.Implementation; | |
using Insiders.Web.Infrastructure.Stats.Interfaces; | |
using StructureMap; | |
using StructureMap.Graph; | |
namespace Insiders.Web.Infrastructure.IoC | |
{ |
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
using Microsoft.Practices.ServiceLocation; | |
using StructureMap; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
namespace Insiders.Web.Infrastructure.IoC | |
{ | |
public class StructureMapDependencyResolver : ServiceLocatorImplBase |
OlderNewer