示例#1
0
        public void GetMessageCodeArgsDefaultsToCurrentUICulture()
        {
            Expect.Call(mockMsgSource.GetMessage(MSGCODE, CultureInfo.CurrentUICulture, MSGARGS)).Return(MSGRESULT);
            mocks.ReplayAll();

            MessageSourceAccessor msgSourceAccessor = new MessageSourceAccessor(mockMsgSource);

            Assert.AreEqual(MSGRESULT, msgSourceAccessor.GetMessage(MSGCODE, MSGARGS));
        }
示例#2
0
        public void GetMessageResolvableDefaultsToCurrentUICulture()
        {
            Expect.Call(mockMsgSource.GetMessage(mockMsgSourceResolvable, CultureInfo.CurrentUICulture)).Return(MSGRESULT);
            mocks.ReplayAll();

            MessageSourceAccessor msgSourceAccessor = new MessageSourceAccessor(mockMsgSource);

            Assert.AreEqual(MSGRESULT, msgSourceAccessor.GetMessage(mockMsgSourceResolvable));
        }
示例#3
0
        public void GetMessageCodeArgs()
        {
            Expect.Call(mockMsgSource.GetMessage(MSGCODE, MSGCULTURE, MSGARGS)).Return(MSGRESULT);
            mocks.ReplayAll();

            MessageSourceAccessor msgSourceAccessor = new MessageSourceAccessor(mockMsgSource, MSGCULTURE);

            Assert.AreEqual(MSGRESULT, msgSourceAccessor.GetMessage(MSGCODE, MSGARGS));
        }
示例#4
0
        public void GetMessageResolvableCulture()
        {
            Expect.Call(mockMsgSource.GetMessage(mockMsgSourceResolvable, MSGCULTURE)).Return(MSGRESULT);
            mocks.ReplayAll();

            MessageSourceAccessor msgSourceAccessor = new MessageSourceAccessor(mockMsgSource);

            Assert.AreEqual(MSGRESULT, msgSourceAccessor.GetMessage(mockMsgSourceResolvable, MSGCULTURE));
        }