예제 #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);
 }