示例#1
0
        public void ReturnData()
        {
            var model = new ITraceMessage[0];
            var dataStoreMock = new Mock<IDataStore>();
            dataStoreMock.Setup(c => c.Get(typeof(IList<ITraceMessage>).AssemblyQualifiedName)).Returns(model);
            var contextMock = new Mock<ITabContext>();
            contextMock.SetupGet(c => c.TabStore).Returns(dataStoreMock.Object);

            var trace = new Trace();
            var result = trace.GetData(contextMock.Object);

            Assert.NotNull(result);
            Assert.Equal(model, result);
        }
示例#2
0
 public void UseDefaultLifeCycleSupport()
 {
     var trace = new Trace();
     Assert.Equal(RuntimeEvent.EndRequest, trace.ExecuteOn);
 }
示例#3
0
        public void HaveADocumentationUri()
        {
            var trace = new Trace();

            Assert.False(string.IsNullOrWhiteSpace(trace.DocumentationUri));
        }
示例#4
0
        public void HaveProperContextObjectType()
        {
            var trace = new Trace();

            Assert.Null(trace.RequestContextType);
        }
示例#5
0
 public void BeNamedTrace()
 {
     var trace = new Trace();
     Assert.Equal("Trace", trace.Name);
 }