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] // using NSubstitute, NUnit and Fluent Assertions | |
public class TypedGlassControllerTests | |
{ | |
[Test] | |
public void GlassController_can_set_and_get_context() | |
{ | |
// Arrange | |
StubClass classToReturn = new StubClass(); | |
var testHarness = new SingleTypedGlassControllerTestHarness(); | |
testHarness.SitecoreContext.GetCurrentItem<StubClass>().Returns(classToReturn); |
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] // using NSubstitute, NUnit and Fluent Assertions | |
public class GlassControllerContextItemTests | |
{ | |
[Test] | |
public void GlassController_can_set_and_get_datasource() | |
{ | |
// Arrange | |
ID expectedId = new ID(Guid.NewGuid()); | |
DataSourceStubClass classToReturn = new DataSourceStubClass(); | |
var testHarness = new DifferentTypedGlassControllerTestHarness(); |
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 Glass.Mapper.Sc; | |
using Glass.Mapper.Sc.Pipelines.Response; | |
using XXX.Common.IoC; | |
using XXX.Core.Sc.Abstractions.Context; | |
using Sitecore.Mvc.Pipelines.Response.GetModel; | |
namespace XXX.Web | |
{ | |
public class LanguageAgnosticGetModelFromView : GetModelFromView | |
{ |
OlderNewer