Esempio n. 1
0
 private bool OpenBinaryFile()
 {
     if (Di.Exists == false)
     {
         Di.Create();
     }
     return(Di.Exists && BinaryOpenWrite(CreateFullFileName()));
 }
Esempio n. 2
0
 private bool OpenStreamFile()
 {
     if (Di.Exists == false)
     {
         Di.Create();
     }
     return(Di.Exists && OpenForWrite(CreateFullFileName()));
 }
Esempio n. 3
0
 private bool OpenBinaryFile()
 {
     if (Di.Exists == false)
     {
         Di.Create();
     }
     return(Di.Exists && BinaryOpenWrite(Di.FullName + "\\" + header + "_" + PingID.ToString() + "." + ext));
 }
Esempio n. 4
0
        public void GivenDi_WhenCreatingInstanceWithoutExplicitConstructors_ThenItIsNotNull()
        {
            // Arrange

            // Act
            var instance = Di.Create <PocoDep2>();

            // Assert
            Assert.That(instance, Is.Not.Null);
        }
Esempio n. 5
0
        public void GivenDi_WhenCreatingInstanceAndCanResolveDependency_ThenInstanceIsCreatedAndDependencyIsInjected()
        {
            // Arrange
            CreateContainerWith <SingleInstanceContainer_PocoDep2>();

            // Act
            var instance         = Di.Create <PocoDep1>();
            var resolvedPocoDep2 = Di.TryResolveGlobally <PocoDep2>(out var pocoDep2);

            // Assert
            Assert.That(instance, Is.Not.Null);
            Assert.That(resolvedPocoDep2);
            Assert.That(instance.Dep, Is.EqualTo(pocoDep2));
        }