Exemplo n.º 1
0
 public void Can_localize_string_resource_mixed_builder() {
     var resourceManagerMock = new Mock<IPlainTextResourceManager>();
     var resources = new DekiResources(resourceManagerMock.Object, CultureInfo.InvariantCulture);
     resourceManagerMock.Setup(x => x.GetString("x", CultureInfo.InvariantCulture, null))
         .Returns("abc").AtMostOnce().Verifiable();
     resourceManagerMock.Setup(x => x.GetString("y", CultureInfo.InvariantCulture, null))
         .Returns("xyz").AtMostOnce().Verifiable();
     var b = new DekiResourceBuilder();
     b.Append(new DekiResource("x"));
     b.Append("+");
     b.Append(new DekiResource("y"));
     b.Append("-");
     Assert.AreEqual("abc+xyz-",b.Localize(resources));
     resourceManagerMock.VerifyAll();
 }
Exemplo n.º 2
0
 //--- Constructors ---
 protected AttachmentBL() {
     _dekiContext = DekiContext.Current;
     _session = DbUtils.CurrentSession;
     _resources = _dekiContext.Resources;
     _resourceBL = ResourceBL.Instance;
 }
Exemplo n.º 3
0
 public void Setup() {
     _resourceManagerMock = new Mock<IPlainTextResourceManager>();
     _resources = new DekiResources(_resourceManagerMock.Object, CultureInfo.InvariantCulture);
 }