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
[TestFixture] | |
public class PortfolioInboundRouteTests | |
{ | |
[SetUp] | |
public void SetUp() { | |
RouteTable.Routes.Clear(); | |
new PublicRouteRegistry().RegisterRoutes(RouteTable.Routes); | |
} | |
// Project Routes |
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 static string PreviousUrl(this UrlHelper url, string defaultUrl, RouteValueDictionary[] validRoutes) | |
{ | |
var previousUrl = url.GetPreviousUrl(false); | |
if (previousUrl == null) | |
return defaultUrl; | |
var request = url.RequestContext.HttpContext.Request; | |
var stubContext = new StubHttpContextForRouting(request.ApplicationPath, | |
VirtualPathUtility.ToAppRelative(previousUrl.AbsolutePath)); |
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 BDDDemo | |
{ | |
//Story: Account Holder withdraws cash | |
//As an Account Holder | |
//I want to withdraw cash from an ATM | |
//So that I can get money when the bank is closed | |
//Scenario 1: Account has sufficient funds | |
//Given the account balance is \$100 |
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
[Subject("Domain Events: Raising an event")] | |
public class Raising_an_event | |
{ | |
public class When_an_event_publisher_is_not_defined | |
{ | |
Because of = () | |
=> new TestDomainObject().Start(); | |
It Should_do_nothing = () => { }; | |
} |
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 VacancyStateTransitions | |
{ | |
public class When_Submitting_a_new_vacancy : WithDomainEvents | |
{ | |
static Vacancy vacancy; | |
Because of = () | |
=> vacancy = new Vacancy(1); | |
It Should_be_unapproved = () |
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
Filling a vacancy, When it is open with appointed candidates and no running campaigns | |
¯ Should be filled | |
¯ Should send me a notification (FAIL) | |
Machine.Specifications.SpecificationException: Should contain elements conforming to: e => (e.GetType() == Fabrik.Recruit.Domain.Events.VacancyFilledEvent) | |
entire list: { | |
Fabrik.Recruit.Domain.Events.VacancySubmittedEvent, | |
Fabrik.Recruit.Domain.Events.VacancySubmittedEvent, | |
Fabrik.Recruit.Domain.Events.VacancySubmittedEvent, | |
Fabrik.Recruit.Domain.Events.VacancySubmittedEvent, |
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
IAuthenticationService | |
bool IsValidLogin(string username, string password); | |
bool CreateLogin(string username, string password); | |
string GeneratePasswordResetToken(string username, int lifeInMinutes); | |
bool ResetPassword(string username, string token, string newPassword); | |
IMembershipService | |
UserProfile FindUserWithLogin(string provider, string providerId); | |
UserProfile Register(string name, string email, string provider, string providerId); |
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
[HttpPost] | |
public void OAuth(string provider, string returnUrl) | |
{ | |
var client = OAuthHelper.GetOAuthClient(provider); | |
client.RequestAuthentication( | |
HttpContext, | |
new Uri(Url.QualifyAction("OAuthCallback", "Auth", new { provider = provider, returnUrl = returnUrl })) | |
); | |
} |
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 Vacancies_SummaryWithApplicationCount : AbstractMultiMapIndexCreationTask<VacancySummary> | |
{ | |
public Vacancies_SummaryWithApplicationCount() | |
{ | |
AddMap<Vacancy>(vacancies => from v in vacancies | |
select new | |
{ | |
Id = v.Id, | |
Position = v.Position, | |
StateId = v.StateId, |
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
@{ | |
ViewBag.Title = "Index"; | |
var builder = new ImageBuilder() | |
.Resize(img => img.Width(400).Height(300).Crop()) | |
.Transform(img => img.FlipAfter(FlipType.X)) | |
.Style(img => img.PaddingWidth(10).PaddingColor("FF0066").Margin(20).BackgroundColor("000000")) | |
.Output(img => img.Quality(90).Format(OutputFormat.Png)); | |
} |
OlderNewer